168 lines
5.8 KiB
PHP
168 lines
5.8 KiB
PHP
<?php
|
|
//echo $_SESSION['branch_group'];
|
|
//echo "<br/><br/>GGGGGG<br/>";
|
|
require_once($pg.".html.php");
|
|
//echo "xxx<br/><br/>xxx$pg<br/>";
|
|
class MENUCONFIG extends MENUCONFIG_HTML
|
|
{
|
|
//function fn_token_lokasi()
|
|
// {
|
|
// $keyword=$_POST['keyword'];
|
|
// $qry="select id,nama_kota from ".DB_INVOICE.".tbl_kota where nama_kota like '%$keyword%' order by nama_kota asc";
|
|
// $rskota=$this->selectquery($qry);
|
|
// if($rskota)
|
|
// {
|
|
// if($this->REC_ROWS_COUNT($rskota)>0)
|
|
// {
|
|
// $p="";
|
|
// while($rw=$this->data_row_object($rskota))
|
|
// {
|
|
// $p.="{\"id\":\"".$rw->id."\",\"label\":\"".$rw->nama_kota."\"},";
|
|
// }
|
|
// $p="[".substr($p,0,strlen($p)-1)."]";
|
|
//$p="[\"$keyword\"]";
|
|
// }
|
|
// else
|
|
// {
|
|
// $p="[\"Record Not Found\"]";
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// $p="[\"RecordSet Error\"]";
|
|
// }
|
|
// $this->clearrecordset($rskota);
|
|
// echo $p;
|
|
//echo json_encode($arr);
|
|
// }
|
|
//
|
|
// function fn_token_ygmenugaskan()
|
|
// {
|
|
// $keyword=$_POST['keyword'];
|
|
// $qry="select nik,nama_employee from ".DB_INVOICE.".tbl_employee
|
|
// where nama_employee like '%$keyword%' and userlevel>=2 and length(nik)=5 and activated='Y' order by nama_employee asc";
|
|
// $rsemp=$this->selectquery($qry);
|
|
// if($rsemp)
|
|
// {
|
|
// if($this->REC_ROWS_COUNT($rsemp)>0)
|
|
// {
|
|
// $p="";
|
|
// while($rw=$this->data_row_object($rsemp))
|
|
// {
|
|
// $p.="{\"id\":\"".$rw->nik."\",\"label\":\"".$rw->nama_employee."\"},";
|
|
// }
|
|
// $p="[".substr($p,0,strlen($p)-1)."]";
|
|
//$p="[\"$keyword\"]";
|
|
// }
|
|
// else
|
|
// {
|
|
// $p="[\"Record Not Found\"]";
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// $p="[\"RecordSet Error\"]";
|
|
// }
|
|
// $this->clearrecordset($rsemp);
|
|
// echo $p;
|
|
//echo json_encode($arr);
|
|
// }
|
|
//
|
|
// function fn_token_ygmenyetujui()
|
|
// {
|
|
// $keyword=$_POST['keyword'];
|
|
// $qry="select nik,nama_employee from ".DB_INVOICE.".tbl_employee
|
|
// where (nama_employee like '%$keyword%') and userlevel>=3 and length(nik)=5 and activated='Y' order by nama_employee asc";
|
|
// $rsemp=$this->selectquery($qry);
|
|
// if($rsemp)
|
|
// {
|
|
// if($this->REC_ROWS_COUNT($rsemp)>0)
|
|
// {
|
|
// $p="";
|
|
// while($rw=$this->data_row_object($rsemp))
|
|
// {
|
|
// $p.="{\"id\":\"".$rw->nik."\",\"label\":\"".$rw->nama_employee."\"},";
|
|
// }
|
|
// $p="[".substr($p,0,strlen($p)-1)."]";
|
|
//$p="[\"$keyword\"]";
|
|
// }
|
|
// else
|
|
// {
|
|
// $p="[\"Record Not Found\"]";
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// $p="[\"RecordSet Error\"]";
|
|
// }
|
|
// $this->clearrecordset($rsemp);
|
|
// echo $p;
|
|
//echo json_encode($arr);
|
|
// }
|
|
|
|
}
|
|
|
|
$cl=new MENUCONFIG();
|
|
if(isset($_REQUEST['task'])){$case=$_REQUEST['task'];}
|
|
if(isset($_POST['task'])){$case=$_POST['task'];}
|
|
if(isset($_REQUEST['obj'])){$obj=$_REQUEST['obj'];}
|
|
if(isset($_POST['obj'])){$obj=$_POST['obj'];}
|
|
|
|
if($_REQUEST){if($_REQUEST['sec']){$case=$cl->dec($case);$obj=$cl->dec($obj);}}
|
|
//if($_POST){if($_POST['sec']){$case=$cl->dec($case);$obj=$cl->dec($obj);}}
|
|
//if($_POST['sec']){$case=$cl->dec($case);$obj=$cl->dec($obj);}
|
|
|
|
//echo $option.' '.$obj.' '.$case;return false;
|
|
//echo $option.' '.$obj;
|
|
//echo $case;return false;
|
|
//$obj=trim(strtolower($_REQUEST['obj']));
|
|
//$case=trim(strtolower($_REQUEST['task']));
|
|
//$option=trim(strtolower($_REQUEST['option']));
|
|
//if($_REQUEST['sec']||$sec){$obj=$cl->dec($obj);$case=$cl->dec($case);}
|
|
|
|
if(file_exists(PATH_OBJECT."/$option/$obj.php"))
|
|
{
|
|
require_once("$obj.php");
|
|
$className=strtoupper($obj);
|
|
$clfile=new $className();
|
|
$fn_init_java=strtolower($className)."_javainit";
|
|
$init_java=trim(strtolower($_REQUEST['init_java']));if($init_java){$clfile->$fn_init_java();}
|
|
$case=$obj;
|
|
}
|
|
//else
|
|
//{
|
|
//if($obj){echo "<i>Still under construction</i>";return false;}
|
|
//}
|
|
if(!$case){$case=$obj;if(!file_exists(PATH_OBJECT."/$option/$obj.php")){$cl->under_construction();}}
|
|
$sptask=explode("_",$case);$modulename=$sptask[1];$fn_module_init="fn_".$modulename."_init";
|
|
//echo "<label style=\"color:white;margin-top:200px;\">$fn_module_init</label>";return false;
|
|
//echo $case.' '.$modulename;return false;
|
|
//echo $option.' '.$obj.' '.$case;return false;
|
|
switch($case)
|
|
{
|
|
case "menuconfig_$modulename":
|
|
$clfile->$fn_module_init();
|
|
break;
|
|
|
|
case "pagehome":
|
|
$cl->fn_page_home();
|
|
break;
|
|
|
|
case "contxmnu":
|
|
$cl->FN_DHTMLXGRIDCONTEXTMENU();
|
|
break;
|
|
|
|
case "treemenu":
|
|
$cl->fn_treemenu();
|
|
break;
|
|
//case "loadtree":
|
|
// $cl->fn_menuconfig_tree();
|
|
//break;
|
|
|
|
case "default":
|
|
$cl->fn_page_default();
|
|
break;
|
|
|
|
}
|
|
?>
|