Viewing file: clsDocCommentSign.php (2.61 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php //--Class doccommentsign-------------------------- //--PK of doccommentsign :: // 1. dCsID include_once "../link/keyThai.php"; class doccommentsign extends clsDB{
var $result;
var $dCsID; var $commentS; var $orderS; var $commentUse;
function doccommentsign(&$c){ $this->c=$c->c; $this->DB=$c->db; }
function Save(){ if ($this->status==1){ $sql = "insert into doccommentsign values( '".th2a($this->dCsID)."', '".th2a($this->commentS)."', '".th2a($this->orderS)."', '".th2a($this->commentUse)."' )"; }else { $sql = "update doccommentsign set commentS='".th2a($this->commentS)."', orderS='".th2a($this->orderS)."', commentUse='".th2a($this->commentUse)."' where dCsID='".th2a($this->dCsID)."'"; } return $this->Dml($sql); }
function Delete(){ return $this->Dml("delete from doccommentsign where dCsID='$this->dCsID'"); }
function GetNextCode(){ $this->SetQuery("select max(dCsID) as num from doccommentsign"); if ($result=$this->GetResult()) { return $result['num']+1; } }
function RSdoccommentsign(){ $this->SetQuery("select * from doccommentsign where commentUse='Y' order by orderS asc"); } function NumRow(){ return $this->GetRowSelected(); } 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)."'];"); } 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 doccommentsign where dCsID= '$xKey'")){ return 1; }else { return 0; } } function GetMinOrderS(){ $this->SetQuery("select min(orderS) as num from doccommentsign"); if ($result=$this->GetResult()) { return $result['num']; } } function GetMaxOrderS(){ $this->SetQuery("select max(orderS) as num from doccommentsign"); if ($result=$this->GetResult()) { return $result['num']; } } function RSdoccommentsignAll(){ $this->SetQuery("select * from doccommentsign order by orderS asc"); } function SearchBydCsIDlimitPreSeq($yKey){ if ($this->SetQuery("select * from doccommentsign where orderS < '$yKey' order by orderS desc limit 1")){ return 1; }else { return 0; } } function SearchBydCsIDlimitNextSeq($yKey){ if ($this->SetQuery("select * from doccommentsign where orderS > '$yKey' order by orderS asc limit 1")){ return 1; }else { return 0; } } //****************** You can add new functions below **********************//
} //--End class doccommentsign--
?>
|