Viewing file: processSetTemplateDlcid.php (2.19 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";
if($method=="add"){ if($selecttemplate==1){ addtemplate($deptId,'5','1',$MaxDocGroup); addtemplate($deptId,'6','2',$MaxDocGroup); addtemplate($deptId,'7','3',$MaxDocGroup); addtemplate($deptId,'8','4',$MaxDocGroup); }else if($selecttemplate==2){ addtemplate($deptId,'1','1',$MaxDocGroup); addtemplate($deptId,'2','2',$MaxDocGroup); addtemplate($deptId,'3','3',$MaxDocGroup); addtemplate($deptId,'4','4',$MaxDocGroup); addtemplate($deptId,'5','5',$MaxDocGroup); addtemplate($deptId,'6','6',$MaxDocGroup); addtemplate($deptId,'7','7',$MaxDocGroup); addtemplate($deptId,'8','8',$MaxDocGroup); } } ?> <script language="JavaScript"> parent.location.href ="docLineConfig.php?deptId=<? echo $deptId; ?>"; </script> <? function addtemplate($deptId,$DlpID,$DlcSeqadd,$MaxDocGroup){ include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "../class/clsDocLinePosition.php"; include_once "../class/clsDocLineConfig.php"; $oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDlc1 = new DocLineConfig($oC); $oDlp = new docLinePosition($oC);
$oDlp->SearchByKey($DlpID); $oDlp->GetRecord();
$oDlc1->AddNew(); $oDlc1->DlcID=$oDlc1->GetNextCode(); $oDlc1->deptId=$deptId; $oDlc1->DlpID=$DlpID; $oDlc1->personId=0; $oDlc1->DlcSeq=$DlcSeqadd;; if($oDlp->DlpPropose=="Y"){ $oDlc1->DlcPropose='Y'; }else{ $oDlc1->DlcPropose="N"; } if($oDlp->DlpSign=="Y"){ $oDlc1->DlcSign='Y'; }else{ $oDlc1->DlcSign="N"; } if($oDlp->DlpSend=="Y"){ $oDlc1->DlcSend='Y'; }else{ $oDlc1->DlcSend="N"; } if($oDlp->DlpByPass=="Y"){ $oDlc1->DlcByPass='Y'; }else{ $oDlc1->DlcByPass="N"; } if($oDlp->DlpView=="Y"){ $oDlc1->DlcView='Y'; }else{ $oDlc1->DlcView="N"; } $oDlc1->docGroup=$MaxDocGroup; $oDlc1->DlcActive="N"; $oDlc1->Save();
} ?>
|