This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// file ssp.class.php | |
// https://raw.githubusercontent.com/DataTables/DataTables/master/examples/server_side/scripts/ssp.class.php | |
/* | |
* Helper functions for building a DataTables server-side processing SQL query | |
* | |
* The static functions in this class are just helper functions to help build | |
* the SQL used in the DataTables demo server-side processing scripts. These |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// file connection.php | |
$con = mysqli_connect("localhost", "username", "password", "dbname"); | |
// file login.php | |
require_once(__DIR__ . '/connection.php'); | |
session_start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// file connection.php | |
$con = mysqli_connect("localhost", "username", "password", "dbname"); | |
// file login.php | |
require_once(__DIR__ . '/connection.php'); | |
session_start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// store result to file | |
$file_output = [ | |
'unique_jabatan' => 'INSERT_MASTER_JABATAN', | |
'unique_subbidang' => 'INSERT_MASTER_SUBBIDANG', | |
'unique_bidang' => 'INSERT_MASTER_BIDANG', | |
'unique_unitkerja' => 'INSERT_MASTER_UNITKERJA', | |
]; | |
foreach ($result as $_key => $_item) { | |
$f = fopen(base_path($file_output[$_key]), 'w'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function csv_to_array($filename, $delimiter = "\t") | |
{ | |
$header = null; | |
$data = []; | |
if (($handle = fopen($filename, 'r')) !== FALSE) { | |
while (($row = fgetcsv($handle, 1000, $delimiter)) !== FALSE) { | |
if(!$header) | |
$header = $row; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('memory_limit', '512M'); | |
$inputFileName = public_path('mutasi.xlsx'); | |
/** Identify the type of $inputFileName **/ | |
$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName); | |
/** Create a new Reader of the type that has been identified **/ | |
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$username = "blabla"; | |
$pass = "3CVzq8MmV8U3TXDL"; | |
$host = "localhost"; | |
$db = "db_arsip"; | |
$connect = mysqli_connect($host, $username, $pass, $db) or die(mysqli_error($connect)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<main> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$eror = false; | |
$pesan = 'Maaf'; | |
//type file yang bisa diupload | |
$file_type = [ | |
'jpg', | |
'jpeg', | |
'gif', | |
'bmp', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$eror = false; | |
$pesan = 'Maaf'; | |
//type file yang bisa diupload | |
$file_type = [ | |
'jpg', | |
'jpeg', | |
'gif', | |
'bmp', |