function ParseTemplate($data = NULL)
 {
     if ($this->Pesan) {
         $this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
         $this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $this->Pesan);
         $this->mrTemplate->AddVar('warning_box', 'CLASS_PESAN', $this->css);
     }
     //tentukan value judul, button dll sesuai pilihan bahasa
     $this->mrTemplate->AddVar('content', 'TITLE', 'REGISTER MODULE');
     $this->mrTemplate->AddVar('content', 'JUDUL_DATA', 'Email Template Data');
     $this->mrTemplate->AddVar('content', strtoupper($this->aktif) . '_SELECTED', 'selected');
     $this->mrTemplate->AddVar('content', 'LABEL_ACTION', isset($_GET['dataId']) ? 'Update' : 'Add');
     if (empty($data['dataSheet'])) {
         $this->mrTemplate->AddVar('data', 'DATA_EMPTY', 'YES');
         return NULL;
     } else {
         $this->mrTemplate->AddVar('data', 'DATA_EMPTY', 'NO');
     }
     $i = 1;
     foreach ($data['dataSheet'] as $value) {
         $data = $value;
         $data['number'] = $i;
         $data['class_name'] = $i % 2 == 0 ? '' : 'table-common-even';
         $data['url_detail'] = Dispatcher::Instance()->GetUrl('gtfw_module', 'gtfwSubModule', 'view', 'html') . "&moduleName=" . $data['module'] . "";
         $this->mrTemplate->AddVars('data_item', $data, '');
         $this->mrTemplate->parseTemplate('data_item', 'a');
         $i++;
     }
 }
 function ParseTemplate($data = NULL)
 {
     extract($data);
     $url_search = Dispatcher::Instance()->GetUrl('kelompok', 'Kelompok', 'view', 'html');
     ////////ADD/////////////////////////////////////////////////////////////////////
     $url_add = Dispatcher::Instance()->GetUrl('kelompok', 'AddKelompok', 'view', 'html');
     // parse string ke dalam template dengan nama URL_ADD
     $this->mrTemplate->AddVar('content', 'URL_ADD', $url_add);
     ////////EDIT/////////////////////////////////////////////////////////////////////
     $url_edit = Dispatcher::Instance()->GetUrl('kelompok', 'EditKelompok', 'view', 'html');
     ////////DELETE/////////////////////////////////////////////////////////////////////
     $urlAccept = 'kelompok|DeleteKelompok|do|json';
     $urlReturn = 'kelompok|Kelompok|view|html';
     $label_delete = 'Kelompok';
     $message_delete = 'Penghapusan Data ini akan menghapus Data secara permanen.';
     $this->mrTemplate->AddVar('content', 'URL_SEARCH', $url_search);
     $this->mrTemplate->AddVars('content', $request_data);
     if (empty($data_list)) {
         $this->mrTemplate->AddVar('data_grid', 'DATA_EMPTY', 'YES');
     } else {
         $this->mrTemplate->AddVar('data_grid', 'DATA_EMPTY', 'NO');
         foreach ($data_list as $list) {
             $list['url_delete'] = Dispatcher::Instance()->GetUrl('confirm', 'confirmDelete', 'do', 'html') . '&urlDelete=' . $urlAccept . '&urlReturn=' . $urlReturn . '&id=' . $list['id'] . '&label=' . $label_delete . '&dataName=' . $list['nama'] . '&message=' . $message_delete;
             $list['nomor'] = $start;
             $list['url_edit'] = $url_edit . '&data_id=' . Dispatcher::Instance()->Encrypt($list['id']);
             $this->mrTemplate->AddVars('data_list', $list);
             $this->mrTemplate->parseTemplate('data_list', 'a');
             $start++;
         }
     }
 }
 function ParseTemplate($data = NULL)
 {
     $cur_mod = $dispt->mModule;
     $cur_sub_mod = $dispt->mSubmodule;
     if (empty($data)) {
         $this->mrTemplate->addVar('menulist', 'MENU_DESC', 'No demo is available!');
         $this->mrTemplate->addVar('menulist', 'MENU_URL', '#');
     } else {
         foreach ($data as $key => $value) {
             if (Security::Instance()->mSecurityEnabled) {
                 $allow = Security::Instance()->AllowedToAccess($value['Module'], $value['SubModule'], 'view', $value['Type']);
             } else {
                 $allow = true;
             }
             if ($value['Module'] == $cur_mod && $value['SubModule'] == $cur_sub_mod) {
                 $this->mrTemplate->addVar('menulist', 'STRONG_OPEN', '<strong>');
                 $this->mrTemplate->addVar('menulist', 'STRONG_CLOSE', '</strong>');
             } else {
                 $this->mrTemplate->addVar('menulist', 'STRONG_OPEN', '');
                 $this->mrTemplate->addVar('menulist', 'STRONG_CLOSE', '');
             }
             if ($allow) {
                 $this->mrTemplate->addVar('menulist', 'MENU_NAME', $value['MenuName']);
                 $this->mrTemplate->addVar('menulist', 'MENU_DESC', $value['Description']);
                 $this->mrTemplate->addVar('menulist', 'MENU_URL', Configuration::Instance()->GetValue('application', 'baseaddress') . Dispatcher::Instance()->GetUrl($value['Module'], $value['SubModule'], 'view', $value['Type']));
                 $this->mrTemplate->parseTemplate('menulist', 'a');
             }
         }
     }
 }
 function NusoapResponse()
 {
     // force to set global variable $debug
     // before calling parent constructor
     $GLOBALS['debug'] = $this->mDebugMode;
     parent::soap_server();
     $this->configureWsdl(__CLASS__ . 'Service', FALSE, $this->mEndpoint);
     $this->mrDispatcher = Dispatcher::Instance();
     $this->mrSecurity = Security::Instance();
     $this->mrSession = Session::Instance();
     if (!empty($this->mRegisteredFunctions)) {
         foreach ($this->mRegisteredFunctions as $func_name => $params) {
             if (is_array($params) && $params != NULL) {
                 $this->register($func_name, $params['in'], $params['out'], $params['namespace'], $params['soapaction'], $params['style'], $params['use'], $params['documentation'], $params['encodingStyle']);
             } else {
                 $this->register($func_name);
             }
         }
     }
     if (!empty($this->mRegisteredTypes)) {
         foreach ($this->mRegisteredTypes as $type_name => $params) {
             if (is_array($params) && count($params) > 0) {
                 if ($params['type'] == 'complexType' && $params['phptype'] != 'scalar') {
                     $this->wsdl->addComplexType($type_name, $params['type'], $params['phptype'], $params['compositor'], $params['restrictionBase'], $params['elements'], $params['attrs'], $params['arraytype']);
                 } else {
                     $this->wsdl->addSimpleType($type_name, $params['type'], $params['phptype'], $params['compositor'], $params['restrictionBase'], $params['elements'], $params['attrs'], $params['arraytype']);
                 }
             } else {
                 $this->register($func_name);
             }
         }
     }
     $this->wsdl->addComplexType('ListType', 'complexType', 'array');
     $this->wsdl->addComplexType('AgmListType', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:integer[]')), 'xsd:integer');
 }
 function __construct($connectionNumber = 0)
 {
     $this->mObj = new Anggota($connectionNumber);
     $this->url_view = Dispatcher::Instance()->GetUrl('anggota', 'Anggota', 'view', 'html');
     $this->url_add = Dispatcher::Instance()->GetUrl('anggota', 'AddAnggota', 'view', 'html');
     $this->url_edit = Dispatcher::Instance()->GetUrl('anggota', 'EditAnggota', 'view', 'html');
 }
 function ParseTemplate($data = null)
 {
     extract($data);
     $url_search = Dispatcher::Instance()->GetUrl('anggota', 'Anggota', 'view', 'html');
     $url_add = Dispatcher::Instance()->GetUrl('anggota', 'AddAnggota', 'view', 'html');
     $url_edit = Dispatcher::Instance()->GetUrl('anggota', 'EditAnggota', 'view', 'html');
     $this->mrTemplate->AddVar('content', 'URL_SEARCH', $url_search);
     $this->mrTemplate->AddVar('content', 'URL_ADD', $url_add);
     $this->mrTemplate->AddVars('content', $request_data);
     if (empty($data_list)) {
         $this->mrTemplate->AddVar('data_grid', 'DATA_EMPTY', 'YES');
     } else {
         $urlAccept = 'anggota|DeleteAnggota|do|json';
         $urlReturn = 'anggota|Anggota|view|html';
         $label_delete = 'Anggota';
         $message_delete = 'Penghapusan Data ini akan menghapus Data secara permanen.';
         $this->mrTemplate->AddVar('data_grid', 'DATA_EMPTY', 'NO');
         foreach ($data_list as $list) {
             $list['url_delete'] = Dispatcher::Instance()->GetUrl('confirm', 'confirmDelete', 'do', 'html') . '&urlDelete=' . $urlAccept . '&urlReturn=' . $urlReturn . '&id=' . $list['id'] . '&label=' . $label_delete . '&dataName=' . $list['nama'] . ' | ' . $list['kelompok_nama'] . '&message=' . $message_delete;
             $list['nomor'] = $start;
             $list['url_edit'] = $url_edit . '&data_id=' . Dispatcher::Instance()->Encrypt($list['id']);
             $this->mrTemplate->AddVars('data_list', $list);
             $this->mrTemplate->parseTemplate('data_list', 'a');
             $start += 1;
         }
     }
     if ($message) {
         $this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
         $this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $message);
         $this->mrTemplate->AddVar('warning_box', 'CLASS_PESAN', $style);
     }
 }
 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');
 }
 function ParseTemplate($data = NULL)
 {
     if (is_array($data)) {
         extract($data);
     }
     $this->mrTemplate->addVar('content', 'URL', Dispatcher::Instance()->GetCurrentUrl());
 }
 function ParseTemplate($data = NULL)
 {
     $this->mrTemplate->AddVar('content', 'URL_SEARCH', Dispatcher::Instance()->GetUrl('gtfw_group', 'group', 'view', 'html'));
     $this->mrTemplate->AddVar('content', 'GROUP_URL_ADD', Dispatcher::Instance()->GetUrl('gtfw_group', 'inputGroup', 'view', 'html'));
     if ($data['Pesan']) {
         $this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
         $this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $data['Pesan']);
         $this->mrTemplate->AddVar('warning_box', 'CLASS_PESAN', $data['css']);
     }
     if (empty($data['dataGroup'])) {
         $this->mrTemplate->AddVar('data_group', 'GROUP_EMPTY', 'YES');
     } else {
         $this->mrTemplate->AddVar('data_group', 'GROUP_EMPTY', 'NO');
         $dataGroup = $data['dataGroup'];
         $len = sizeof($dataGroup);
         $menuName = '';
         $idGroup = '';
         $no = 0;
         for ($i = 0; $i < $len; $i++) {
             if ($idGroup != $dataGroup[$i]['group_id']) {
                 $no++;
                 $menuBaru[$no]['no'] = $no;
                 $menuBaru[$no]['group_id'] = $dataGroup[$i]['group_id'];
                 $menuBaru[$no]['group_name'] = $dataGroup[$i]['group_name'];
                 $menuBaru[$no]['group_description'] = $dataGroup[$i]['group_description'];
                 $menuBaru[$no]['unit_kerja'] = $dataGroup[$i]['unit_kerja'];
                 $menuBaru[$no]['hak_akses'] = '';
                 $idGroup = $dataGroup[$i]['group_id'];
                 $menuName = '';
             }
             if ($dataGroup[$i]['menu_name'] != $menuName) {
                 $menuBaru[$no]['hak_akses'] .= '<strong>' . $dataGroup[$i]['menu_name'] . '</strong><br>' . '&nbsp;&nbsp;&#45;&nbsp;' . $dataGroup[$i]['sub_menu'] . '<br>';
                 $menuName = $dataGroup[$i]['menu_name'];
             } else {
                 $menuBaru[$no]['hak_akses'] .= '&nbsp;&nbsp;&#45;&nbsp;' . $dataGroup[$i]['sub_menu'] . '<br>';
             }
         }
         $no = 1;
         for ($i = 1; $i < count($menuBaru) + 1; $i++) {
             $menuBaru[$i]['number'] = $no;
             if ($no % 2 != 0) {
                 $dataGroup[$i]['class_name'] = 'table-common-even';
             } else {
                 $dataGroup[$i]['class_name'] = '';
             }
             $no++;
             $idEnc = Dispatcher::Instance()->Encrypt($menuBaru[$i]['group_id']);
             $menuBaru[$i]['url_edit'] = Dispatcher::Instance()->GetUrl('gtfw_group', 'inputGroup', 'view', 'html') . '&grp=' . $idEnc;
             $idEnc = Dispatcher::Instance()->Encrypt($menuBaru[$i]['group_id']);
             $urlAccept = 'gtfw_group|deleteGroup|do|html-cari-';
             $urlReturn = 'gtfw_group|group|view|html-cari-';
             $label = 'Group';
             $dataName = $menuBaru[$i]['group_name'];
             $menuBaru[$i]['url_delete'] = Dispatcher::Instance()->GetUrl('confirm', 'confirmDelete', 'do', 'html') . '&urlDelete=' . $urlAccept . '&urlReturn=' . $urlReturn . '&id=' . $idEnc . '&label=' . $label . '&dataName=' . $dataName;
             $this->mrTemplate->AddVars('data_group_item', $menuBaru[$i], 'GROUP_');
             $this->mrTemplate->parseTemplate('data_group_item', 'a');
         }
     }
 }
Exemplo n.º 10
0
 function __construct($connectionNumber = 0)
 {
     $db_type = Configuration::Instance()->GetValue('application', 'db_conn', 0, 'db_type');
     $this->mSqlFile = 'module/' . Dispatcher::Instance()->mModule . '/business/' . $db_type . '/anggota.sql.php';
     $this->_POST = is_object($_POST) ? $_POST->AsArray() : $_POST;
     $this->_GET = is_object($_GET) ? $_GET->AsArray() : $_GET;
     parent::__construct($connectionNumber);
 }
 function ProcessRequest()
 {
     $links = array(array('label' => 'XlsResponse', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'excel', 'view', 'xls')), array('label' => 'XlsxResponse', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'excelNew', 'view', 'xlsx')), array('label' => 'PdfxResponse Sample 1', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 2', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx2', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 3', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx3', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 4', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx4', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 5', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx5', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 33', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx33', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 65', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx65', 'view', 'pdfx')));
     // $key = Dispatcher::Instance()->mStartKey;
     // $ori = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~!@#$%^&*()-_=+`,<.>/?'\";:[{]}\|";
     // $enc = Dispatcher::Instance()->Encrypt($ori);
     // $dec = Dispatcher::Instance()->Decrypt($enc);
     // echo '<pre>'; print_r(compact('key', 'ori', 'enc', 'dec')); echo '</pre>';
     return compact('links');
 }
 function ProcessRequest()
 {
     //var_dump($_SESSION['logged_in']);
     //die('ViewAnchor');
     if ($_SESSION['logged_in']) {
         return array('Logout', Dispatcher::Instance()->GetUrl('login_default', 'logout', 'do', 'html'), 'image/header-upload.png');
     } else {
         return array('Login', Dispatcher::Instance()->GetUrl('login_default', 'login', 'view', 'html'), 'image/header-download.png');
     }
 }
 function GetDefaultEndpoint()
 {
     $tmpEndPoint = Configuration::Instance()->GetValue('application', 'app_service_endpoint');
     if (isset($tmpEndPoint)) {
         $endpoint = Configuration::Instance()->GetValue('application', 'app_service_endpoint');
     } else {
         $endpoint = Configuration::Instance()->GetValue('application', 'baseaddress') . Dispatcher::Instance()->GetUrl('soap_gateway', 'Gateway', 'Soap', 'soap') . "&wsdl";
     }
     return $endpoint;
 }
 function ProcessRequest()
 {
     Security::Instance()->Logout(TRUE);
     //$this->RedirectTo($this->mrDispatcher->GetUrl('login_default', 'session', 'destroy', 'html'));
     $module = Configuration::Instance()->GetValue('application', 'default_module');
     $submodule = Configuration::Instance()->GetValue('application', 'default_submodule');
     $action = Configuration::Instance()->GetValue('application', 'default_action');
     $type = Configuration::Instance()->GetValue('application', 'default_type');
     $this->RedirectTo(Dispatcher::Instance()->GetUrl($module, $submodule, $action, $type));
 }
 function ParseTemplate($data = NULL)
 {
     $this->mrTemplate->AddVar('content', 'USER_ID', $data['usr']);
     if ($data['Pesan']) {
         $this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
         $this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $data['Pesan']);
         $this->mrTemplate->AddVar('content', 'USER_ID', $data['Data'][0]['usr']);
     }
     $this->mrTemplate->AddVar('content', 'URL_ACTION', Dispatcher::Instance()->GetUrl('gtfw_user', 'updatePassword', 'do', 'html'));
     $this->mrTemplate->addVar('content', 'URL_CANCEL', Dispatcher::Instance()->GetUrl(Dispatcher::Instance()->mModule, 'user', 'view', 'html'));
 }
 function ProcessRequest()
 {
     Security::Instance()->Logout(TRUE);
     //$this->RedirectTo($this->mrDispatcher->GetUrl('login_default', 'session', 'destroy', 'html'));
     $module = Configuration::Instance()->GetValue('application', 'default_module');
     $submodule = Configuration::Instance()->GetValue('application', 'default_submodule');
     $action = Configuration::Instance()->GetValue('application', 'default_action');
     $type = Configuration::Instance()->GetValue('application', 'default_type');
     $urlRedirect = Dispatcher::Instance()->GetUrl($module, $submodule, $action, $type);
     return array('exec' => 'GtfwAjax.replaceContentWithUrl("body-application","' . $urlRedirect . '&ascomponent=1")');
 }
 function __construct()
 {
     $this->userObj = new AppUser();
     $this->applicationId = Configuration::Instance()->GetValue('application', 'application_id');
     $this->_POST = $_POST->AsArray();
     $this->decUsr = Dispatcher::Instance()->Decrypt($_REQUEST['usr']);
     $this->encId = Dispatcher::Instance()->Encrypt($this->decUsr);
     $this->pageView = Dispatcher::Instance()->GetUrl('gtfw_user', 'user', 'view', 'html');
     $this->pageInput = Dispatcher::Instance()->GetUrl('gtfw_user', 'inputUser', 'view', 'html');
     $this->pageInputPassword = Dispatcher::Instance()->GetUrl('gtfw_user', 'changePassword', 'view', 'html');
 }
 function ParseTemplate($data = null)
 {
     extract($data);
     $url_action = Dispatcher::Instance()->GetUrl('anggota', 'AddAnggota', 'do', 'json');
     $this->mrTemplate->AddVar('content', 'URL_ACTION', $url_action);
     $this->mrTemplate->AddVars('content', $request_data);
     if ($message) {
         $this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
         $this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $message);
         $this->mrTemplate->AddVar('warning_box', 'CLASS_PESAN', $style);
     }
 }
 function ParseTemplate($data = NULL)
 {
     if (!empty($data['ID_MHS'])) {
         $this->mrTemplate->AddVar('content', 'URL_ACTION', Dispatcher::Instance()->GetUrl('latihan_sembilan', 'UpdateMahasiswa', 'do', 'json'));
         $this->mrTemplate->AddVar('content', 'NAMA_MHS', $data['dataMahasiswa'][0]['NAMA_MHS']);
         $this->mrTemplate->AddVar('content', 'ALAMAT_MHS', $data['dataMahasiswa'][0]['ALAMAT_MHS']);
         $this->mrTemplate->AddVar('content', 'ID_MHS', $data['ID_MHS']);
         $this->mrTemplate->addVar('content', 'URL_CANCEL', Dispatcher::Instance()->GetUrl(Dispatcher::Instance()->mModule, 'ListMahasiswa', 'view', 'html'));
     } else {
         $this->mrTemplate->AddVar('content', 'URL_ACTION', Dispatcher::Instance()->GetUrl('latihan_sembilan', 'ListMahasiswa', 'do', 'json'));
     }
 }
 /** 
  * This is simply a matter of listing extensions
  * indexed by the dispatcher.
  * 
  * */
 public function listListeners($hook = '')
 {
     $dc = Dispatcher::Instance();
     $listeners = $dc->getListeners($hook);
     $output = array();
     foreach ($listeners as $hook => $lstnr) {
         foreach ($lstnr as $class) {
             $final = array_keys($class);
             $output[] = array('hook' => $hook, 'listener' => $final[0]);
         }
     }
     return $output;
 }
Exemplo n.º 21
0
 function call($params, $content)
 {
     $parameters = '';
     // pattemplate content style
     // warning: value is always trimmed!!
     if (trim($content) != '') {
         $temp = explode("\n", $content);
         foreach ($temp as $k => $v) {
             if (trim($v) != '') {
                 list($var, $val) = explode(':=', $v);
                 $parameters .= '&' . trim($var) . '=' . urlencode(trim($val));
             }
         }
     }
     // http get style (via 'params' attribute)
     if (isset($params['params']) && trim($params['params']) != '') {
         $parameters .= '&' . trim($params['params']);
     }
     // html tag attribute style
     // ie. not name, module, submodule, action, params
     foreach ($params as $k => $v) {
         if ($k != 'module' && $k != 'submodule' && $k != 'sub' && $k != 'action' && $k != 'params' && $k != 'type' && $k != 'htmlentities') {
             $parameters .= '&' . $k . '=' . urlencode($v);
         }
     }
     //$parameters = urlencode($parameters);
     // preferred to be 'submodule'
     // but for compatibility with older version, 'sub' attribute is still supported
     $submodule = isset($params['sub']) ? $params['sub'] : '';
     $submodule = isset($params['submodule']) ? $params['submodule'] : $submodule;
     $htmlentities = isset($params['htmlentities']) ? $params['htmlentities'] : TRUE;
     if ($htmlentities !== TRUE) {
         if (trim(strtolower($htmlentities)) == 'yes') {
             $htmlentities = TRUE;
         } elseif (trim(strtolower($htmlentities)) == 'no') {
             $htmlentities = FALSE;
         } else {
             $htmlentities = TRUE;
         }
     }
     // always $htmlEntityEncoded, since we want to embed url(s) in an XHTML document
     // but now isn't always $htmlEntityEncoded, since we can embed it in JavaScript :D
     // use htmlentities="yes|no", defaults to "yes"
     $url = Dispatcher::Instance()->GetUrl($params['module'], $submodule, $params['action'], $params['type'], $htmlentities) . htmlentities($parameters);
     if ($htmlentities) {
         $url .= htmlentities($parameters);
     } else {
         $url .= $parameters;
     }
     return $url;
 }
 function ProcessRequest()
 {
     $objMenu = new Menu();
     $objMenu->LoadSql('module/menu/business/mysqlt/menu.sql.php');
     $arrMenu = $objMenu->GetDhtmlxMenu();
     for ($i = 0; $i < count($arrMenu); $i++) {
         $arrMenu[$i]['url'] = Dispatcher::Instance()->GetUrl($arrMenu[$i]['Module'], $arrMenu[$i]['SubModule'], $arrMenu[$i]['Action'], $arrMenu[$i]['Type']);
         unset($arrMenu[$i]['Module']);
         unset($arrMenu[$i]['SubModule']);
         unset($arrMenu[$i]['Action']);
         unset($arrMenu[$i]['Type']);
     }
     return array("exec" => "setMenu(" . json_encode($arrMenu) . ")");
 }
 function ParseTemplate($data = NULL)
 {
     $this->mrTemplate->Addvar('content', 'URL_ADD', Dispatcher::Instance()->GetUrl('latihan_lima', 'AddMahasiswa', 'View', 'html'));
     if (!empty($data['dataMahasiswa'])) {
         $this->mrTemplate->AddVar('data_mahasiswa', 'DATA_EMPTY', 'YES');
         foreach ($data['dataMahasiswa'] as $key => $value) {
             $no = $key + 1;
             $value['no'] = $no;
             $this->mrTemplate->AddVars('data_mahasiswa_item', $value);
             $this->mrTemplate->parseTemplate('data_mahasiswa_item', 'a');
         }
     } else {
         $this->mrTemplate->AddVar('data_mahasiswa', 'DATA_EMPTY', 'NO');
     }
 }
Exemplo n.º 24
0
 function ProcessRequest()
 {
     require_once GTFW_APP_DIR . 'module/gtfw_menu/response/Process.proc.class.php';
     $Proc = new Process();
     $post = $_POST->AsArray();
     $result = $Proc->input();
     if ($result == true) {
         Messenger::Instance()->Send('gtfw_menu', 'menu', 'view', 'html', array(NULL, 'Penambahan data berhasil', 'notebox-done'), Messenger::NextRequest);
         $redirect = Dispatcher::Instance()->GetUrl('gtfw_menu', 'menu', 'view', 'html') . '&display';
     } else {
         Messenger::Instance()->Send('gtfw_menu', 'input', 'view', 'html', array($post, implode('<br/>', $Proc->err_msg), 'notebox-warning'), Messenger::NextRequest);
         $redirect = Dispatcher::Instance()->GetUrl('gtfw_menu', 'add', 'view', 'html');
     }
     $this->RedirectTo($redirect);
 }
 function ParseTemplate($data = NULL)
 {
     if (!empty($data)) {
         for ($i = 0; $i < sizeof($data); $i++) {
             $url = '';
             if ($data[$i]['ParentMenuId'] == '0') {
                 $url = '&dmmid=' . $data[$i]['MenuId'] . '&mid=' . $data[$i]['MenuId'];
                 $this->mrTemplate->addVar('icon_menu', 'MOUSE_UP', 'onMouseUp="ShowMenu(' . $data[$i]['MenuId'] . ')"');
             }
             $this->mrTemplate->addVar('icon_menu', 'LINK_URL', Dispatcher::Instance()->GetUrl($data[$i]['Module'], $data[$i]['SubModule'], $data[$i]['Action'], $data[$i]['Type']) . $url);
             $this->mrTemplate->addVar('icon_menu', 'ICON_NAME', $data[$i]['IconPath']);
             $this->mrTemplate->addVar('icon_menu', 'LINK_NAME', $data[$i]['MenuName']);
             $this->mrTemplate->parseTemplate('icon_menu', 'a');
         }
     }
 }
 function ProcessRequest()
 {
     if (Security::Instance()->IsLoggedIn()) {
         // redirect to proper place
         $module = 'home';
         $submodule = 'home';
         $action = 'view';
         $type = 'html';
         $this->RedirectTo(Dispatcher::Instance()->GetUrl($module, $submodule, $action, $type));
         return NULL;
     }
     echo '<pre>';
     print_r(Security::Instance()->IsLoggedIn());
     echo '</pre>';
     return Security::Instance()->RequestSalt();
 }
Exemplo n.º 27
0
 public static function RedirectToModule($module, $subModule, $action, $type, $params = '', $replace = FALSE, $code = NULL)
 {
     if (self::$mRedirected && !$replace) {
         return;
     }
     /*
      * modified by galih galih@gmail.com
      * add ascomponent paramater when first request from html send ascomponent parameter too
      */
     if (isset($_GET['ascomponent'])) {
         $location .= '&ascomponent=1';
     }
     self::$mRedirected = TRUE;
     self::$mRedirectedTo = Dispatcher::Instance()->GetUrl($module, $subModule, $action, $type) . '&' . $params;
     header('Location: ' . self::$mRedirectedTo, $replace, $code);
 }
 public function __construct($module, $subModule, $action, $processId = NULL)
 {
     list($this->mModule, $this->mSubModule, $this->mAct) = array($module, $subModule, $action);
     if (!$processId) {
         // new process
         SysLog::Log('Creating new child process...', 'BgProcess');
     } else {
         // resume
         SysLog::Log('Resuming child process, PID: ' . $processId, 'BgProcess');
         $this->mProcessId = $processId;
         $this->Resume();
     }
     // we use Dispatcher class here
     $this->mIsRunable = (bool) current(Dispatcher::Instance()->GetModule($this->mModule, $this->mSubModule, $this->mAct, $this->mType));
     $this->mStatus = $this->GetStatus();
     $this->mProcessSavePath = Configuration::Instance()->GetValue('background_process', 'process_save_path') != '' ? Configuration::Instance()->GetValue('background_process', 'process_save_path') : Configuration::Instance()->GetTempDir() . '/';
 }
 function ProcessRequest()
 {
     $page = false;
     $itemsViewed = 10;
     $totItems = 0;
     $url = '';
     // By default fetch param from gtfw-render module
     $itemsViewed = $this->mComponentParameters['itemviewed'];
     $totItems = $this->mComponentParameters['totitems'];
     $url = $this->mComponentParameters['pagingurl'];
     if (isset($this->mComponentParameters['page'])) {
         $page = $this->mComponentParameters['page'];
     } else {
         $page = false;
     }
     if (isset($this->mComponentParameters['nav_class'])) {
         $nav_class = $this->mComponentParameters['nav_class'];
     } else {
         $nav_class = '';
     }
     // support component messenger
     $msg = Messenger::Instance()->Receive(__FILE__, $this->mComponentName);
     if (!empty($msg)) {
         //SysLog::Log(print_r($msg, true), 'paging');
         $itemsViewed = $msg[0][0];
         $totItems = $msg[0][1];
         $url = $msg[0][2];
         if (isset($msg[0][3])) {
             $page = $msg[0][3][0];
             $keyword = $msg[0][3][1];
             $combo = $msg[0][3][2];
         } else {
             $page = false;
             $keyword = false;
             $combo = false;
         }
     }
     //SysLog::Log('nav_class: '.$nav_class, 'paging');
     $arrayMsg = array("totItems" => $totItems, "itemsViewed" => $itemsViewed, "url" => $url, "page" => $page, "nav_class" => $nav_class);
     if (empty($nav_class)) {
         $nav_class = 'subcontent-element';
     }
     Messenger::Instance()->Send('paging', 'Paging', 'view', 'html', $arrayMsg, Messenger::NextRequest);
     return array('exec' => 'GtfwAjax.replaceContentWithUrl("' . $nav_class . '"," ' . Dispatcher::Instance()->GetUrl('paging', 'Paging', 'view', 'html') . '&ascomponent=1")');
 }
 function ProcessRequest()
 {
     $objNotify = new Notify();
     if (isset($_GET['notifId'])) {
         $arrModule = $objNotify->GetModuleFromNotify($_GET['notifId']);
         $urlRedirect = Dispatcher::Instance()->GetUrl($arrModule['module'], $arrModule['submodule'], $arrModule['action'], $arrModule['type']) . $arrModule['notifyUrl'];
         return array('exec' => 'GtfwAjax.replaceContentWithUrl("subcontent-element","' . $urlRedirect . '&ascomponent=1")');
     }
     if (isset($_GET['readNotifyId'])) {
         $objNotify->setReadNotify($_GET['readNotifyId']);
     }
     if (isset($_GET['statusMessage'])) {
         $message = $objNotify->GetAllNotify();
     } else {
         $message = $objNotify->GetUnloadNotify();
     }
     return array("exec" => "setNotify(" . json_encode($message) . ")");
 }