dec($task);}} switch($task) { case "default": $this->fn_default_user(); break; case $task: $task="fn_".$task; if(method_exists($this,$task)){$this->$task();} break; default: $this->fn_default_user(); break; } } public function fn_default_user() { echo $this->FN_CREATEHEADER(); echo ""; echo ""; echo $this->FN_CLOSEHEADER(); echo $this->FN_CREATEBODY("e8f1ff"); echo "
"; $qry="select filepdf from ".DB_APORTIL.".tbl_manualbook where isdeleted=0 and filepdf='employee_information.pdf'"; $filepdf=$this->fn_get_fieldvalue("filepdf",$qry); $urlmanualbook=" MANUAL BOOK"; $url="location.reload();"; $myuri=array("EMPLOYEE INFORMATION"=>"$url|id='a_newticket'","$urlmanualbook"=>"|id='a_manualbook'"); echo $this->MULTIPLE_LINK($myuri); echo "
".$this->CREATE_IMAGE("loadergrid.gif")."
Notes : - Click Row For Edit
"; echo $this->FN_CREATEFOOTER(); } public function fn_grdrecord() { $keyword=$_REQUEST["keyword"]; header("Content-type: text/xml"); echo(''); echo ""; $qry="select id,nik,employeename,employeetitle,msisdn,email,sectionname from ".DB_APORTIL.".tbl_employee where (nik like '%$keyword%' or employeename like '%$keyword%') and isdeleted=0 order by id asc limit ".TBL_PAGE_LIMIT; $rs=$this->selectquery($qry); if($rs) { $i=1; while($row=$this->data_row_array($rs)) { echo (""); print(""); print(""); print(""); print(""); print(""); print(""); print(""); print(""); echo (""); $i+=1; } } else { echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file
"; } echo "
"; } public function fn_saverecord($isupdate=null) { if($isupdate){$id=$_REQUEST['txt_id'];} $nik=$_REQUEST['txt_nik']; $employeename=$_REQUEST['txt_employeename']; $employeetitle=$_REQUEST['txt_employeetitle']; $msisdn=$_REQUEST['txt_msisdn']; $email=$_REQUEST['txt_email']; $idsection=$_REQUEST['cbo_idsection']; $spsec=$this->fn_get_fieldsvalues("sectionname,iddept,departmentname","select id,sectionname,iddept,departmentname from ".DB_APORTIL.".tbl_employee_section where id='".$idsection."'"); $sectionname=$spsec[0];$iddept=$spsec[1];$departmentname=$spsec[2]; $qry="insert into ".DB_APORTIL.".tbl_employee set nik='$nik',employeename='$employeename',employeetitle='$employeetitle',msisdn='$msisdn',email='$email',idsection='$idsection', sectionname='$sectionname',iddept='$iddept',deptname='$departmentname',iby='".$_SESSION['nik']."',idt=now()"; if($isupdate) { $qry="update ".DB_APORTIL.".tbl_employee set nik='$nik',employeename='$employeename',employeetitle='$employeetitle',msisdn='$msisdn',email='$email',idsection='$idsection', sectionname='$sectionname',iddept='$iddept',deptname='$departmentname',uby='".$_SESSION['nik']."',udt=now() where id='$id'"; } if($this->executequery($qry)){echo "ok|";return true;} } public function fn_updrecord(){$this->fn_saverecord(true);} public function fn_delrecord() { $id=$_REQUEST['txt_id']; $remark=$_REQUEST['txtremark']; $qry="update ".DB_APORTIL.".tbl_employee set isdeleted=1,remark='$remark',dby='".$_SESSION['nik']."',ddt=now() where id='$id'"; if($this->executequery($qry)){echo "ok|";return true;} else { echo "failed|".$this->getErrorQuery(); } } } ?>