function upload_for_ijin($nama, $kode, $tipe, $path_upload) { $text_data = $_POST["text_{$nama}"]; if ($text_data == "") { $index_image = $kode; $path_upload_data = "{$path_upload}" . "{$index_image}"; $ekstensi = $_FILES["{$nama}"]["name"]; $end = end(explode(".", $ekstensi)); $text_data = "{$nama}-" . $index_image . ".{$end}"; $UTILITY = new utilityCode(); $result_data = $UTILITY->upload_gambar("{$nama}", $path_upload_data, $tipe, $text_data); //echo $path_upload_data; } return $text_data; }
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING)); ob_clean(); // ======== TAMBAHKAN UTILITY & LIBRARY DISINI ======== require_once __DIR__ . '/config.php'; require_once __DIR__ . '/../utility/database/mysql_db.php'; require_once __DIR__ . '/../utility/utilityCode.php'; require_once __DIR__ . "/../library/security/HTMLPurifier.auto.php"; // ==================================================== // ============== TAMBAHKAN MODEL DISINI ============== require_once __DIR__ . '/../model/modelPengguna.php'; // ==================================================== // ============== TAMBAHKAN CLASS DISINI ============== $CONFIG = new config(); $DB = new mysql_db(); $UTILITY = new utilityCode(); $PENGGUNA = new modelPengguna(); // ==================================================== $config_security = HTMLPurifier_Config::createDefault(); $config_security->set('URI.HostBlacklist', array('google.com')); $purifier = new HTMLPurifier($config_security); $cek = $_SERVER['SCRIPT_NAME']; $temp = explode("/", $cek); $file = end($temp); if ($_SESSION["user_name"] == "") { if (isset($_COOKIE[$cookie_name])) { include 'autologin.php'; } else { if ($file != "index.php") { session_destroy(); $UTILITY->popup_message("Maaf anda harus login terlebih dahulu");
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ #This code provided by: #Andreas Hadiyono (andre.hadiyono@gmail.com) #Gunadarma University require_once __DIR__ . '/../config/config.php'; require_once __DIR__ . '/../utility/database/mysql_db.php'; require_once __DIR__ . '/../utility/utilityCode.php'; //Untuk Model require_once __DIR__ . '/../model/modelPengguna.php'; //Akhir Model $CONFIG = new config(); $DB = new mysql_db(); $UTILITY = new utilityCode(); $PENGGUNA = new modelPengguna(); $id = $_POST['Login']; //echo "ID=$id"; if (isset($id)) { $user_name1 = $_POST['username']; $user_pass1 = $UTILITY->sha512($_POST['password']); $pass = $_POST['password']; if (!$user_pass1 || !$user_name1) { $UTILITY->popup_message("Maaf anda harus login terlebih dahulu!"); $UTILITY->location_goto("."); } else { //$data = array("username" => "$user_name1", "status_user" => 1); $data = array("username" => "{$user_name1}"); $hasil = $PENGGUNA->readPengguna($data); $panjang = count($hasil);
require_once __DIR__ . '/../utility/PHPExcel.php'; require_once __DIR__ . '/../utility/PHPExcel/IOFactory.php'; require_once __DIR__ . '/../utility/datatable.php'; require_once __DIR__ . '/../library/security/HTMLPurifier.auto.php'; // ==================================================== // ============== TAMBAHKAN MODEL DISINI ============== require_once __DIR__ . '/../model/modelPengguna.php'; require_once __DIR__ . '/../model/modelLogin.php'; require_once __DIR__ . '/../model/modelReport.php'; require_once __DIR__ . '/../model/modelRkakl.php'; require_once __DIR__ . '/../model/modelRab.php'; // ==================================================== // ============== TAMBAHKAN CLASS DISINI ============== $config = new config(); $db = new mysql_db(); $utility = new utilityCode(); $objectExcel = new PHPExcel(); $datatable = new datatable(); $login = new modelLogin(); $pengguna = new modelPengguna(); $report = new modelReport(); $rkakl = new modelRkakl(); $mdl_rab = new modelRab(); // ==================================================== $config_security = HTMLPurifier_Config::createDefault(); $config_security->set('URI.HostBlacklist', array('google.com')); $purifier = new HTMLPurifier($config_security); // ================ CEK SESSION EXPIRE ================ if (isset($_SESSION['expire'])) { $sessiontime_now = time(); if ($sessiontime_now > $_SESSION['expire']) {
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ #This code provided by: #Andreas Hadiyono (andre.hadiyono@gmail.com) #Gunadarma University require_once __DIR__ . '/config.php'; require_once __DIR__ . '/../utility/database/mysql_db.php'; require_once __DIR__ . '/../utility/utilityCode.php'; //Untuk Model require_once __DIR__ . '/../model/modelPengguna.php'; //Akhir Model $CONFIG = new config(); $DB = new mysql_db(); $UTILITY = new utilityCode(); $PENGGUNA = new modelPengguna(); if (isset($cookie_name)) { // Check if the cookie exists $UTILITY->show_data("asdasd"); if (isset($_COOKIE[$cookie_name])) { parse_str($_COOKIE[$cookie_name]); //list($iv,$hash)= explode (";", $hash); //$fileplain= $UTILITY->dekripsi($algoritma, $mode, $iv, $secretkey, $fileplain, $hash); // $hash=$fileplain; $data = array("username" => "{$usr}", "user_id" => $hash); $hasil = $PENGGUNA->readPengguna($data); $panjang = count($hasil); $UTILITY->show_data($hasil); echo "Panjangg {$panjang}"; if ($panjang < 1) {
<?php error_reporting(E_ALL ^ (E_NOTICE | E_WARNING)); require_once __DIR__ . '/../config/config.php'; require_once __DIR__ . '/../utility/database/mysql_db.php'; require_once __DIR__ . '/../utility/utilityCode.php'; require_once __DIR__ . '/../model/modelPengguna.php'; $CONFIG = new config(); $DB = new mysql_db(); $UTILITY = new utilityCode(); $PENGGUNA = new modelPengguna(); $id = $_POST['Login']; if (isset($id)) { $user_name1 = $_POST['username']; $user_pass1 = $_POST['password']; $pass = $_POST['password']; if (!$user_pass1 || !$user_name1) { $UTILITY->popup_message("Maaf anda harus login terlebih dahulu!"); $UTILITY->location_goto("."); } else { $data = array("username" => "{$user_name1}"); $hasil = $PENGGUNA->readPengguna($data); $panjang = count($hasil); if ($panjang < 1) { session_destroy(); $UTILITY->location_goto("."); } else { $pass = $hasil->password; $nam = $hasil->username; $user_id = $hasil->user_id; $level = $hasil->level;