function ProcessRequest() { // $Obj = new Test; // $data = $Obj->getPengguna(); set_time_limit(0); for ($i = 0; $i < 200; $i++) { $data[$i]['realname'] = 'Prima Noor'; $data[$i]['username'] = '******'; $data[$i]['desc'] = 'Prima Noor'; $data[$i]['active'] = 'Yes'; $data[$i]['forcelogout'] = 'no'; } if (empty($data)) { $this->mWorksheets['Data']->write(0, 0, 'Data kosong'); } else { $fTitle = $this->mrWorkbook->add_format(); $fTitle->set_bold(); $fTitle->set_size(12); $fTitle->set_align('vcenter'); $fTitleSmall = $this->mrWorkbook->add_format(); $fTitleSmall->set_size(10); $fTitleSmall->set_align('vcenter'); $header = $this->mrWorkbook->add_format(); $header->set_bold(); $header->set_size(14); $header->set_align('vcenter'); $fTableTitle = $this->mrWorkbook->add_format(); $fTableTitle->set_border(1); $fTableTitle->set_bold(); $fTableTitle->set_size(10); $fTableTitle->set_align('center'); $fColData = $this->mrWorkbook->add_format(); $fColData->set_border(1); $this->mWorksheets['Data']->write(0, 0, GTFWConfiguration::GetValue('organization', 'company_name'), $header); $this->mWorksheets['Data']->write(2, 0, 'Laporan Pengguna', $fTitle); $no = 5; $this->mWorksheets['Data']->write($no, 0, 'No', $fTableTitle); $this->mWorksheets['Data']->write($no, 1, 'Nama Asli', $fTableTitle); $this->mWorksheets['Data']->write($no, 2, 'Nama Pengguna', $fTableTitle); $this->mWorksheets['Data']->write($no, 3, 'Keterangan', $fTableTitle); $this->mWorksheets['Data']->write($no, 4, 'Aktif', $fTableTitle); $this->mWorksheets['Data']->write($no, 5, 'Force Logout', $fTableTitle); $no = 6; $data = $data; for ($i = 0; $i < sizeof($data); $i++) { $this->mWorksheets['Data']->write($no, 0, $i + 1, $fColData); $this->mWorksheets['Data']->write($no, 1, $data[$i]['realname'], $fColData); $this->mWorksheets['Data']->write($no, 2, $data[$i]['username'], $fColData); $this->mWorksheets['Data']->write($no, 3, $data[$i]['desc'], $fColData); $this->mWorksheets['Data']->write($no, 4, $data[$i]['active'], $fColData); $this->mWorksheets['Data']->write($no, 5, $data[$i]['forcelogout'], $fColData); $no++; } } }
public function SendLog($log) { if (class_exists('Security')) { $user = Security::Instance()->mAuthentication->GetCurrentUser()->GetUserName(); } if (empty($user)) { $user = GTFWConfiguration::GetValue('application', 'default_user'); } $ip = $_SERVER['REMOTE_ADDR']; $result = $this->SendLogDb($user, $ip, $log); return $result; }
function GetModule($module) { if ($module == '') { $mod = (string) $_GET['mod']; $sub = (string) $_GET['sub']; $act = (string) $_GET['act']; $type = (string) $_GET['typ']; } else { $modul = explode("|", $module); $mod = $modul[0]; $sub = $modul[1]; $act = $modul[2]; $type = $modul[3]; } $appId = GTFWConfiguration::GetValue('application', 'application_id'); $result = $this->GetModuleId($mod, $sub, $act, $type, $appId); return $result[0]['modId']; }
<?php require_once GTFWConfiguration::GetValue('application', 'docroot') . 'module/latihan_sembilan/response/ProcessMahasiswa.proc.class.php'; class DoUpdateMahasiswa extends JsonResponse { function TemplateModule() { } function ProcessRequest() { $Obj = new ProcessMahasiswa(); $urlRedirect = $Obj->Update(); return array('exec' => 'GtfwAjax.replaceContentWithUrl("subcontent-element","' . $urlRedirect . '&ascomponent=1")'); } function ParseTemplate($data = NULL) { } }
<?php require_once GTFWConfiguration::GetValue('application', 'docroot') . 'module/' . Dispatcher::Instance()->mModule . '/business/ProcessAnggota.proc.class.php'; class DoUpdateAnggota extends JsonResponse { public function ProcessRequest() { $mProcess = new ProcessAnggota(); $url_redirect = $mProcess->Update(); return array('exec' => 'GtfwAjax.replaceContentWithUrl("subcontent-element","' . $url_redirect . '&ascomponent=1")'); } }
<?php require_once GTFWConfiguration::GetValue('application', 'gtfw_base') . 'main/lib/gtfw/response/html/extension/pat_template/Gtfwindonesiandate.class.php';
function TemplateModule() { $this->SetTemplateBasedir(GTFWConfiguration::GetValue('application', 'docroot') . 'module/' . Dispatcher::Instance()->mModule . '/template/'); $this->SetTemplateFile('view_add_anggota.html'); }
<?php require_once GTFWConfiguration::GetValue('application', 'docroot') . 'module/latihan_enam/business/mysqlt/Mhs.class.php'; class ProcessMahasiswa { var $_POST; var $Obj; var $pageInput; var $pageView; var $cssDone = "alert-success"; var $cssFail = "alert-danger"; function __construct() { $this->Obj = new Mahasiswa(); $this->_POST = $_POST->AsArray(); $this->pageView = Dispatcher::Instance()->GetUrl('latihan_enam', 'ListMahasiswa', 'View', 'html'); } function Add() { if (isset($this->_POST['btnsimpan'])) { $add = $this->Obj->DoAddMahasiswa($this->_POST['nama_mhs'], $this->_POST['alamat_mhs']); if ($add == true) { Messenger::Instance()->Send('latihan_enam', 'ListMahasiswa', 'view', 'html', array($this->_POST, 'Penambahan data berhasil dilakukan', $this->cssDone), Messenger::NextRequest); } else { Messenger::Instance()->Send('latihan_enam', 'ListMahasiswa', 'view', 'html', array($this->_POST, 'Penambahan data gagal dilakukan', $this->cssFail), Messenger::NextRequest); } return $this->pageView; } } }
<?php require_once GTFWConfiguration::GetValue('application', 'docroot') . 'module/' . Dispatcher::Instance()->mModule . '/response/ProcessKelompok.proc.class.php'; class DoUpdateKelompok extends JsonResponse { public function ProcessRequest() { $mProcess = new ProcessKelompok(); $url_redirect = $mProcess->Update(); return array('exec' => 'GtfwAjax.replaceContentWithUrl("subcontent-element","' . $url_redirect . '&ascomponent=1")'); } }
<?php $db_type = Configuration::Instance()->GetValue('application', 'db_conn', 0, 'db_type'); require_once GTFWConfiguration::GetValue('application', 'docroot') . 'module/' . Dispatcher::Instance()->mModule . '/business/' . $db_type . '/Kelompok.class.php'; class ProcessKelompok { private $mObj; protected $mData = array(); private $url_add; private $url_view; private $url_edit; function __construct($connectionNumber = 0) { $this->mObj = new Kelompok(); $this->url_add = Dispatcher::Instance()->GetUrl('kelompok', 'AddKelompok', 'view', 'html'); $this->url_edit = Dispatcher::Instance()->GetUrl('kelompok', 'EditKelompok', 'view', 'html'); $this->url_view = Dispatcher::Instance()->GetUrl('kelompok', 'Kelompok', 'view', 'html'); } private function setData() { $request_data = array(); if (isset($this->mObj->_POST['btnsimpan'])) { $request_data['id'] = $this->mObj->_POST['data_id']; $request_data['nama'] = trim($this->mObj->_POST['nama']); } $this->mData = $request_data; } public function getData() { $this->setData(); return (array) $this->mData;
<?php require_once GTFWConfiguration::GetValue('application', 'gtfw_base') . 'main/lib/patError/patError.php'; require_once GTFWConfiguration::GetValue('application', 'gtfw_base') . 'main/lib/patError/patErrorManager.php'; require_once GTFWConfiguration::GetValue('application', 'gtfw_base') . 'main/lib/pat_template/patTemplate.php';
function TemplateModule() { $this->SetTemplateBasedir(GTFWConfiguration::GetValue('application', 'docroot') . 'module/akd_module_filter/template'); $this->SetTemplateFile('view_module_filter.html'); }
<?php require_once GTFWConfiguration::GetValue('application', 'docroot') . 'main/function/warning.php'; class Request { var $POST; function Request() { $this->POST = $_POST->AsArray(); } public static function DecodeSanitization($value) { $pattern[0] = '/&/'; $pattern[1] = '/</'; $pattern[2] = '/>/'; $pattern[3] = '/\\<br\\>/'; $pattern[4] = '/\\"/'; $pattern[5] = '/'/'; $pattern[6] = '/%/'; $pattern[7] = '/(/'; $pattern[8] = '/)/'; $pattern[9] = '/+/'; $pattern[10] = '/-/'; $replacement[0] = '&'; $replacement[1] = '<'; $replacement[2] = '>'; $replacement[3] = "\n"; $replacement[4] = '"'; $replacement[5] = "'"; $replacement[6] = '%'; $replacement[7] = '(';