Viewing file: clsSysConfig.php (4.95 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php //--Class sysconfig-------------------------- //--PK of sysconfig :: include_once "../link/keyThai.php"; class sysConfig extends clsDB{
var $result;
var $sysYear; var $sysDocNo; var $editRunningPsId; var $OutputThai; var $InputThai; var $filesizebyte; var $pbriHost; var $collegeName; var $collegeNameArr; var $sendAllDeptDown; var $sendAllDeptUp; var $sendAllNode; var $useDocNoCenter; var $useDocTypeNoMix; var $useReceiveAll; var $useProposeAll; var $useSendAll; var $downloadPpdf; var $acceptDoc; var $showDocRegisAll; var $sendAllDeptUpLevel1; var $closeSystem; var $useDlcIDSecond; var $docforsignname; var $canDelDocPs; var $useTHeGIF;
function sysConfig(&$c){ $this->c=$c->c; $this->DB=$c->db; }
function Save(){ if ($this->status==1){ $sql = "insert into SysConfig values( '".th2a($this->sysYear)."', '".th2a($this->sysDocNo)."', '".th2a($this->editRunningPsId)."', '".th2a($this->OutputThai)."', '".th2a($this->InputThai)."', '".$this->filesizebyte."', '".$this->pbriHost."', '".$this->collegeName."', '".$this->collegeNameArr."', '".$this->sendAllDeptDown."', '".$this->sendAllDeptUp."', '".$this->sendAllNode."', '".$this->useDocNoCenter."', '".$this->useDocTypeNoMix."', '".$this->useReceiveAll."', '".$this->useProposeAll."', '".$this->useSendAll."', '".$this->downloadPpdf."', '".$this->acceptDoc."', '".$this->showDocRegisAll."', '".$this->sendAllDeptUpLevel1."', '".$this->closeSystem."', '".$this->useDlcIDSecond."', '".$this->docforsignname."', '".$this->canDelDocPs."', '".$this->useTHeGIF."' )"; }else { $sql = "update SysConfig set sysYear='".th2a($this->sysYear)."', sysDocNo='".th2a($this->sysDocNo)."', editRunningPsId='".th2a($this->editRunningPsId)."', OutputThai='".th2a($this->OutputThai)."', InputThai='".th2a($this->InputThai)."', filesizebyte='".$this->filesizebyte."', pbriHost='".$this->pbriHost."', collegeName='".$this->collegeName."', collegeNameArr='".$this->collegeNameArr."', sendAllDeptDown='".$this->sendAllDeptDown."', sendAllDeptUp='".$this->sendAllDeptUp."', sendAllNode='".$this->sendAllNode."', useDocNoCenter='".$this->useDocNoCenter."', useDocTypeNoMix='".$this->useDocTypeNoMix."', useReceiveAll='".$this->useReceiveAll."', useProposeAll='".$this->useProposeAll."', useSendAll='".$this->useSendAll."', downloadPpdf='".$this->downloadPpdf."', acceptDoc='".$this->acceptDoc."', showDocRegisAll='".$this->showDocRegisAll."', sendAllDeptUpLevel1='".$this->sendAllDeptUpLevel1."', closeSystem='".$this->closeSystem."', docforsignname='".$this->docforsignname."', useDlcIDSecond='".$this->useDlcIDSecond."', canDelDocPs='".$this->canDelDocPs."', useTHeGIF='".$this->useTHeGIF."'"; } return $this->Dml($sql); }
function Delete(){ return $this->Dml("delete from SysConfig"); }
function RSsysConfig(){ $this->SetQuery("select * from SysConfig"); }
function GetRecord(){ $numFields = $this->NumField(); $row = $this->GetResult(); if ($row){ for ($i=0; $i<$numFields; $i++){ eval("\$this->".mysql_field_name($this->rs, $i)."=\$row['".mysql_field_name($this->rs, $i)."'];"); $this->sysDocNo=a2th($this->sysDocNo); } return true; }else{ // clear value of Member; for ($i=0; $i<$numFields; $i++){ eval("\$this->".mysql_field_name($this->rs, $i)."='';"); } return false; } } function SearchByKey($xKey){ if ($this->SetQuery("select * from SysConfig")){ return 1; }else { return 0; } } //****************** You can add new functions below **********************// function SearchBysysYear(){ $this->SetQuery("select sysYear as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } function SearchByeditRunningPsId(){ $this->SetQuery("select editRunningPsId as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } function SearchByInputThai(){ $this->SetQuery("select InputThai as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } function SearchByKeyName($name){ $this->SetQuery("select $name as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } function SearchuseReceiveAll(){ $this->SetQuery("select useReceiveAll as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } function SearchuseProposeAll(){ $this->SetQuery("select useProposeAll as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } function SearchuseSendAll(){ $this->SetQuery("select useSendAll as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } function SearchacceptDoc(){ $this->SetQuery("select acceptDoc as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } function SearchshowDocRegisAll(){ $this->SetQuery("select showDocRegisAll as num from SysConfig"); if ($result=$this->GetResult()) { return $result['num']; } } } //--End class person--
?>
|