Viewing file: processSelectDocPost.php (2.64 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../link/function.php"; include_once "../link/functionshow.php"; include_once "../class/clsDocuments.php"; include_once "funct.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDoc = new Documents($oC);
if($method=="selectdoc"){ for($k=0;$k<$i;$k++){ $oDoc->SearchByKey($check[$k]); $oDoc->GetRecord(); $oDoc->Edit(); //echo 'DocID='.$oDoc->DocID.'AnIDselect=='.$AnIDselect[$k].'oDoc->AnID=='.$oDoc->AnID.'<br>'; if($AnIDselect[$k]!=$oDoc->AnID){ //echo 'editcase1'; $edit=1; updateAnIDdocumentDocPID0($oDoc->DocID,$AnIDselect[$k]); updateAnIDdocumentDocPID($oDoc->DocID,$AnIDselect[$k]); }
if($selectPost[$k]!=$oDoc->DocGetPost){ updateDocGetPostdocumentDocPID0($oDoc->DocID,$selectPost[$k]); $edit=1; }
if($DocShowInOut[$k]!=$oDoc->DocShowInOut){ //echo 'editcase3'; updateDocShowInOutdocumentDocPID0($oDoc->DocID,$DocShowInOut[$k]); updateDocShowInOutdocumentDocPID($oDoc->DocID,$DocShowInOut[$k]); $edit=1; } if($edit==1){ updateDocDateGetPostdocumentDocPID0($oDoc->DocID,getNowDateTh()." ".date('H:i:s')); } } echo "<meta http-equiv='refresh' content='0; URL=selectDocPost.php?AnID=$AnID'>"; }else if($method=="changeSelectDoc"){ $oDoc->SearchByKey($DocID); $oDoc->GetRecord(); $oDoc->Edit(); //echo 'DocID='.$oDoc->DocID.'AnIDselect=='.$AnIDselect[$DocID].'oDoc->AnID=='.$oDoc->AnID.'<br>'; if($AnIDselect[$DocID]!=$oDoc->AnID){ //echo 'editcase1'; $edit=1; updateAnIDdocumentDocPID0($oDoc->DocID,$AnIDselect[$DocID]); updateAnIDdocumentDocPID($oDoc->DocID,$AnIDselect[$DocID]); } if($selectPost[$DocID]!=$oDoc->DocGetPost){ updateDocGetPostdocumentDocPID0($oDoc->DocID,$selectPost[$DocID]); $edit=1; } if($DocShowInOut[$DocID]!=$oDoc->DocShowInOut){ //echo 'editcase3'; updateDocShowInOutdocumentDocPID0($oDoc->DocID,$DocShowInOut[$DocID]); updateDocShowInOutdocumentDocPID($oDoc->DocID,$DocShowInOut[$DocID]); $edit=1; } if($edit==1){ updateDocDateGetPostdocumentDocPID0($oDoc->DocID,getNowDateTh()." ".date('H:i:s')); } //echo $selectPost[$DocID]; echo "<meta http-equiv='refresh' content='0; URL=editSelectDocPost.php?DocSubject=$DocSubject&DocNo=$DocNo&start=$start&end=$end&yearDoc=$yearDoc&AnID=$AnID'>"; } ?>
|