function ProcessRequest() { $GtfwModule = new GtfwModule(); $this->aktif = $GtfwModule->aktif; if ($GtfwModule->aktif == 'bo') { $path_module = Configuration::Instance()->GetValue('application', 'docroot') . 'module/'; $AppId = Configuration::Instance()->GetValue('application', 'application_id'); } else { $path_module = str_replace("bo", "fo", Configuration::Instance()->GetValue('application', 'docroot')) . 'module/'; $AppId = Configuration::Instance()->GetValue('application', 'application_portal_id'); } $dir = dir($path_module); $i = 0; while (false !== ($entry = $dir->read())) { if ($entry != '..' && $entry != '.') { $path_submodule = $path_module . $entry . '/response/'; $j = 0; $jj = 0; if (file_exists($path_submodule)) { $dir2 = dir($path_submodule); while (false !== ($entry2 = $dir2->read())) { if ($entry2 != '..' && $entry2 != '.') { $Temp = $GtfwModule->PecahFile($entry2); $ActionList = array("Do", "View", "Popup", "Input", "Combo"); if (in_array($Temp['Action'], $ActionList)) { $j++; } $GetModule = $GtfwModule->GetModuleByFile($entry, $Temp['SubModuleName'], $Temp['Action'], $Temp['Type'], $AppId); if (sizeof($GetModule) > 0) { $jj++; } } } } $listFile[$i]['module'] = $entry; $listFile[$i]['jumlah_submodule'] = $j; $listFile[$i]['terdaftar'] = $jj; $listFile[$i]['belum_terdaftar'] = $j - $jj; $i++; } } $return['dataSheet'] = $listFile; return $return; }
function ProcessRequest() { $GtfwModule = new GtfwModule(); $cfg_hak_akses_per_aksi = Configuration::Instance()->GetValue('application', 'cfg_hak_akses_per_aksi'); if ($cfg_hak_akses_per_aksi) { $settingShowAksesPerAksi = 1; } else { $settingShowAksesPerAksi = 0; } $return['setting_aksi'] = $settingShowAksesPerAksi; $this->POST = $_POST->AsArray(); $this->modulName = $_GET['moduleName']; if ($GtfwModule->aktif == 'bo') { $path_module = Configuration::Instance()->GetValue('application', 'docroot') . 'module/' . $this->modulName . '/response/'; $AppId = Configuration::Instance()->GetValue('application', 'application_id'); } else { $path_module = str_replace("bo", "fo", Configuration::Instance()->GetValue('application', 'docroot')) . 'module/' . $this->modulName . '/response/'; $AppId = Configuration::Instance()->GetValue('application', 'application_portal_id'); } if (isset($this->POST['btnsimpan'])) { $result = $this->Register(); if ($result === true) { $this->Pesan = $this->POST['btnsimpan'] . ' Module dan ' . $this->POST['btnsimpan'] . ' Menu Berhasil'; $this->css = 'success'; } else { $this->Pesan = $this->POST['btnsimpan'] . ' Module dan ' . $this->POST['btnsimpan'] . ' Menu Gagal'; $this->css = 'danger'; } } $i = 0; if (file_exists($path_module)) { $dir = dir($path_module); while (false !== ($entry = $dir->read())) { if ($entry != '..' && $entry != '.') { $Temp = $GtfwModule->PecahFile($entry); $ActionList = array("Do", "View", "Popup", "Input", "Combo"); if (in_array($Temp['Action'], $ActionList)) { $listFile[$i] = $Temp; $GetModule = $GtfwModule->GetModuleByFile($this->modulName, $Temp['SubModuleName'], $Temp['Action'], $Temp['Type'], $AppId); if (!empty($GetModule)) { $labelAksi = $GtfwModule->GetLabelAksi($GetModule[0]['AksiId']); } $listFile[$i]['name_checkbox'] = $this->modulName . "-" . $Temp['SubModuleName'] . "-" . $Temp['Action'] . "-" . $Temp['Type']; if (sizeof($GetModule) == 0) { $listFile[$i]['checkbox'] = '<input type=checkbox name="' . $listFile[$i]['name_checkbox'] . '" checked>'; $listFile[$i]['combobox'] = '<select name="Access-' . $listFile[$i]['name_checkbox'] . '"><option value="Exclusive">Exclusive</option><option value="All">All</option></select>'; $listFile[$i]['aksiLabel'] = ''; $this->RegisterStatus = true; } else { $listFile[$i]['checkbox'] = 'Sudah'; $listFile[$i]['combobox'] = $GetModule[0]['Access']; if (!empty($labelAksi)) { $listFile[$i]['aksiLabel'] = $labelAksi[0]['aksiLabel']; } else { $listFile[$i]['aksiLabel'] = ''; } $this->MenuId = $GetModule[0]['MenuId']; } if ($GetModule) { if ($GetModule[0]['ModuleId'] == $GetModule[0]['MenuDefaultModuleId'] && sizeof($GetModule) > 0) { $listFile[$i]["default"] = 'checked'; } else { $listFile[$i]["default"] = ''; } } $i++; } } } } if (!empty($this->MenuId)) { $readonly = 'readonly=true'; $return['dataMenu'] = $GtfwModule->GetMenuById($this->MenuId); } else { $readonly = ''; $return['dataMenu'] = null; } $IsShow = array(0 => array('ID' => 'Yes', 'NAME' => 'Yes'), 1 => array('ID' => 'No', 'NAME' => 'No')); Messenger::Instance()->SendToComponent('combobox', 'Combobox', 'view', 'html', 'IsShow', array('IsShow', $IsShow, $return['dataMenu'][0]['IsShow'], '', ' style="width:100px;" ' . $readonly, '', '', ''), Messenger::CurrentRequest); $MenuParentId = $GtfwModule->GetParentMenu($AppId); Messenger::Instance()->SendToComponent('combobox', 'Combobox', 'view', 'html', 'MenuParentId', array('MenuParentId', $MenuParentId, $return['dataMenu'][0]['MenuParentId'], '', ' style="width:300px;" ' . $readonly, '', '', ''), Messenger::CurrentRequest); $return['dataSheet'] = $listFile; return $return; }