Viewing file: searchPsTable.php (24.51 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 "../link/function.php"; include_once "../class/clsTable.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../class/clsDocLinePosition.php"; include_once "../class/clsDocLineConfig.php"; include_once "../class/clsDocReceiveSend.php"; include_once "../link/keyThai.php"; include_once "getPrefix.php"; include_once "../class/clsUmuser.php"; include_once "../class/clsUmUserGroup.php"; $oUm = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_UMS'], $GLOBALS['DBUSER_UMS'], $GLOBALS['DBPASS_UMS']); $oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDP = new Department($oC); $oPS = new person($oC); $oDlc = new DocLineConfig($oC); $oDlc2 = new DocLineConfig($oC); $oDlc1 = new DocLineConfig($oC); $oDlc2 = new DocLineConfig($oC); $oDlp = new docLinePosition($oC); $oDlp2 = new docLinePosition($oC); $oDlp3 = new docLinePosition($oC); $oDlp4 = new docLinePosition($oC); $oRs = new DocReceiveSend($oC); $oUg = new umusergroup($oUm); $oUus = new umuser($oUm);
if($fconfirm=="1"){ //confirm use doclineconfig $oDlc->SearchByDeptMaxDocGroup($deptId,$oDP->SearchMaxDocGroup()); while($oDlc->GetRecord()){ $oDlc->Edit(); $oDlc->DlcID=$oDlc->DlcID; $oDlc->deptId=$oDlc->deptId; $oDlc->DlpID=$oDlc->DlpID; $oDlc->personId=$oDlc->personId; $oDlc->DlcSeq=$oDlc->DlcSeq; $oDlc->docGroup=$oDlc->docGroup; $oDlc->confirm="Y"; $oDlc->DlcActive=$oDlc->DlcActive; $oDlc->Save(); } ?> <script language="JavaScript"> parent.location.href ="docLineConfig.php?deptId=<? echo $deptId; ?>"; </script> <?
}else if($fdelete=="1"){ //ลบข้อมูล
$oDlc2->SearchByDeptMaxDocGroup($deptId,$oDP->SearchMaxDocGroup()); $checkuse=0; while($oDlc2->GetRecord()){ $oRs->SearchByDlcIDDocGroup2($oDlc2->DlcID,$oDP->SearchMaxDocGroup()); if($oRs->GetRecord()==1){ $checkuse++; } } //echo "checkuse=".$checkuse; if($checkuse=="0"){ $oDlc->SearchByDeptMaxDocGroup($deptId,$oDP->SearchMaxDocGroup()); while($oDlc->GetRecord()){ $oDlc->Delete(); } }else{ ?> <script language="JavaScript"> alert("ไม่สามารถลบข้อมูลตำแหน่งงานสารบรรณได้\nเนื่องจากมีการใช้งานตำแหน่งสารบรรณนี้แล้ว"); </script> <? } ?> <script language="JavaScript"> parent.location.href ="docLineConfig.php?deptId=<? echo $deptId; ?>"; </script> <? }else{
if($method=="addps"){ //add person in lineconfig $oDlc->SearchByKey($DlcID); if($oDlc->GetRecord()==1){ //edit //echo "A<br>"; $oDlc->Edit(); $oDlc->DlcID=$DlcID; $oDlc->deptId=$oDlc->deptId; $oDlc->DlpID=$oDlc->DlpID; $oDlc->personId=$personId; $oDlc->DlcSeq=$oDlc->DlcSeq; $oDP->SearchByKey($oDlc->deptId); $oDP->GetRecord(); $oDlc->docGroup=$oDP->docGroup; $oDlc->DlcActive=$oDlc->DlcActive; $oDlc->Save(); if($personId[$r]!="0" && $personId[$r]!=""){ //setUMS($personId[$r],$oDlp->GpID); $oDlp->SearchByKey($oDlc->DlpID); $oDlp->GetRecord(); $oUus->SearchByUsPsCode($personId); $oUus->GetRecord(); echo "----".$oUus->UsID; $oUg->SearchByKey($oDlp->GpID,$oUus->UsID); if($oUg->GetRecord()==0){ $oUg->AddNew(); $oUg->UgID=$oUg->GetNextCode(); echo "UgID=".$oUg->UgID."<br>"; $oUg->UgGpID=$oDlp->GpID; echo "UgGpID=".$oUg->UgGpID."<br>"; $oUg->UgUsID=$oUus->UsID; echo "UgUsID=".$oUg->UgUsID."<br>"; $oUg->Save(); } } }else{ //add new line //echo "B<br>"; $oDlc1->AddNew(); $oDlc1->DlcID=$DlcID; //echo "DlcID=".$oDlc1->DlcID."<br>"; $oDlc1->deptId=$deptId; //echo "deptId=".$oDlc1->deptId."<br>"; $oDlc1->personId=$personId; //echo "personId=".$oDlc1->personId."<br>"; $oDlc1->DlcSeq=$DlcSeq; //echo "DlcSeq=".$oDlc1->DlcSeq."<br>"; $oDP->SearchByKey($oDlc1->deptId); $oDP->GetRecord(); $oDlc1->docGroup=$oDP->docGroup; //echo "docGroup=".$oDlc1->docGroup."<br>"; $oDlc1->Save(); } ?> <script language="javascript1.2"> window.close(); window.opener.location.href="docLineConfig.php?deptId=<? echo $deptId; ?>"; </script> <? }else if($method=="addps2"){ //add person in lineconfig $oDlc->SearchByKey($DlcID); if($oDlc->GetRecord()==1){ //edit //echo "A<br>"; $oDlc->Edit(); $oDlc->DlcID=$DlcID; $oDlc->deptId=$oDlc->deptId; $oDlc->DlpID=$oDlc->DlpID; $oDlc->personId=$personId; $oDlc->DlcSeq=$oDlc->DlcSeq; $oDP->SearchByKey($oDlc->deptId); $oDP->GetRecord(); $oDlc->docGroup=$oDP->docGroup; $oDlc->DlcActive=$oDlc->DlcActive; $oDlc->Save();
if($personId[$r]!="0" && $personId[$r]!=""){ //setUMS($personId[$r],$oDlp->GpID); $oDlp->SearchByKey($oDlc->DlpID); $oDlp->GetRecord(); $oUus->SearchByUsPsCode($personId); $oUus->GetRecord(); echo "----".$oUus->UsID; $oUg->SearchByKey($oDlp->GpID,$oUus->UsID); if($oUg->GetRecord()==0){ $oUg->AddNew(); $oUg->UgID=$oUg->GetNextCode(); echo "UgID=".$oUg->UgID."<br>"; $oUg->UgGpID=$oDlp->GpID; echo "UgGpID=".$oUg->UgGpID."<br>"; $oUg->UgUsID=$oUus->UsID; echo "UgUsID=".$oUg->UgUsID."<br>"; $oUg->Save(); } } }else{ //add new line //echo "B<br>"; $oDlc1->AddNew(); $oDlc1->DlcID=$DlcID; //echo "DlcID=".$oDlc1->DlcID."<br>"; $oDlc1->deptId=$deptId; //echo "deptId=".$oDlc1->deptId."<br>"; $oDlc1->personId=$personId; //echo "personId=".$oDlc1->personId."<br>"; $oDlc1->DlcSeq=$DlcSeq; //echo "DlcSeq=".$oDlc1->DlcSeq."<br>"; $oDP->SearchByKey($oDlc1->deptId); $oDP->GetRecord(); $oDlc1->docGroup=$oDP->docGroup; //echo "docGroup=".$oDlc1->docGroup."<br>"; $oDlc1->Save(); } ?> <script language="javascript1.2"> window.close(); window.opener.location.href="docLineConfigforDept.php"; </script> <? }else if($method=="addps3"){ //add person in lineconfig //echo 'DlcID='.$DlcID; //echo '<br>personId='.$personId; if($personId!='' && $personId!=0){ $oDlc->SearchByKey($DlcID); $oDlc->GetRecord(); $oDlc2->AddNew(); $oDlc2->DlcID=$oDlc2->GetNextCode(); $oDlc2->deptId=$oDlc->deptId; $oDlc2->DlpID=$oDlc->DlpID; $oDlc2->personId=$personId; $oDlc2->DlcSeq=0; $oDlc2->DlcPropose=$oDlc->DlcPropose; $oDlc2->DlcSign=$oDlc->DlcSign; $oDlc2->DlcSend=$oDlc->DlcSend; $oDlc2->DlcByPass=$oDlc->DlcByPass; $oDlc2->DlcView=$oDlc->DlcView; $oDlc2->docGroup=$oDlc->docGroup; $oDlc2->confirm=$oDlc->confirm; $oDlc2->DlcActive='N'; $oDlc2->DlcIDSecond='Y'; $oDlc2->DlcIDMain=$DlcID; $oDlc2->Save(); $oDlp->SearchByKey($oDlc->DlpID); $oDlp->GetRecord(); $oUus->SearchByUsPsCode($personId); $oUus->GetRecord(); // echo "----".$oUus->UsID; $oUg->SearchByKey($oDlp->GpID,$oUus->UsID); if($oUg->GetRecord()==0){ $oUg->AddNew(); $oUg->UgID=$oUg->GetNextCode(); //echo "UgID=".$oUg->UgID."<br>"; $oUg->UgGpID=$oDlp->GpID; //echo "UgGpID=".$oUg->UgGpID."<br>"; $oUg->UgUsID=$oUus->UsID; //echo "UgUsID=".$oUg->UgUsID."<br>"; $oUg->Save(); } } /**/ ?> <script language="javascript1.2"> window.close(); window.opener.location.href="docLineConfig.php?deptId=<? echo $oDlc->deptId;?>"; </script> <? }else if($method=="pp"){ //save all config for($r=0;$r<$countline;$r++){ if($DlpIDadd=="0" && $personIdadd=="" && $DlcProposeadd=="N" && $DlcSignadd=="N" && $DlcSendadd=="N" && $DlcByPassadd=="N" && $DlcViewadd =="N"){ //echo "C<br>"; //no data }else{ //echo "<br>D===".$newposition."<br>"; $oDlc->SearchByKey($DlcID[$r]); $oDlc->GetRecord(); $oDlc->Edit(); // echo "oDlc->DlpID===".$oDlc->DlpID."<br>"; // echo "DlpID[r]===".$DlpID[$r]."<br>"; $oDlc->DlcID=$DlcID[$r]; //echo "DlcID=".$oDlc->DlcID."<br>"; $oDlc->deptId=$oDlc->deptId; //echo "deptId=".$oDlc->deptId."<br>"; $saveDlpID=$oDlc->DlpID; $oDlp->SearchByKey($DlpID[$r]); $oDlp->GetRecord(); //echo 'DlpPropose='.$oDlp->DlpPropose.'<br>'; if($oDlp->DlpPID=="0"){ //echo "no edit<br>"; $oDlc->DlpID=$DlpID[$r]; }else{ //echo "edit=".($DlpID[$r-1])."<br>"; $oDlp2->SearchDlpPIDByDlpID($DlpID[$r-1]); $oDlp2->GetRecord(); $oDlc->DlpID=$oDlp2->DlpID; $a=1; } $oDlp4->SearchByKey($oDlc->DlpID); $oDlp4->GetRecord(); //----set in ums if($saveDlpID!=$oDlc->DlpID){ $oDlp3->SearchByKey($oDlc->DlpID); $oDlp3->GetRecord(); $oUus->SearchByUsPsCode($personId[$r]); $oUus->GetRecord(); //echo "----".$oUus->UsID; $oUg->SearchByKey($oDlp3->GpID,$oUus->UsID); if($oUg->GetRecord()==0){ $oUg->AddNew(); $oUg->UgID=$oUg->GetNextCode(); //echo "UgID=".$oUg->UgID."<br>"; $oUg->UgGpID=$oDlp3->GpID; //echo "UgGpID=".$oUg->UgGpID."<br>"; $oUg->UgUsID=$oUus->UsID; //echo "UgUsID=".$oUg->UgUsID."<br>"; $oUg->Save(); } } //echo "DlpID=".$oDlc->DlpID."<br>"; $oDlc->personId=$personId[$r]; //echo "personId=".$oDlc->personId."<br>"; $oDlc->DlcSeq=$DlcSeq[$r]; //echo "DlcSeq=".$oDlc->DlcSeq."<br>"; //echo "saveDlpID===".$saveDlpID."<br>"; //echo "oDlc->DlpID===".$oDlc->DlpID."<br>"; if($saveDlpID!=$oDlc->DlpID || $newposition=='newposition'){ //echo ' change<br>'; if($oDlp4->DlpPropose=="Y"){ //echo ' DlpPropose=="Y"<br>'; $oDlc->DlcPropose='Y'; }else{ //echo ' DlpPropose!="Y"<br>'; $oDlc->DlcPropose="N"; } //echo "DlcPropose=".$oDlc1->DlcPropose."<br>"; if($oDlp4->DlpSign=="Y"){ $oDlc->DlcSign='Y'; }else{ $oDlc->DlcSign="N"; } //echo "DlcSign=".$oDlc1->DlcSign."<br>"; if($oDlp4->DlpSend=="Y"){ $oDlc->DlcSend='Y'; }else{ $oDlc->DlcSend="N"; } //echo "DlcSend=".$oDlc1->DlcSend."<br>"; if($oDlp4->DlpByPass=="Y"){ $oDlc->DlcByPass='Y'; }else{ $oDlc->DlcByPass="N"; } //echo "DlcByPass=".$oDlc1->DlcByPass."<br>"; if($oDlp4->DlpView=="Y"){ $oDlc->DlcView='Y'; }else{ $oDlc->DlcView="N"; } }else{ //echo 'no change<br>'; if($DlcPropose[$r]=="Y"){ $oDlc->DlcPropose=$DlcPropose[$r]; }else{ $oDlc->DlcPropose="N"; } //echo "DlcPropose=".$oDlc->DlcPropose."<br>"; if($DlcSign[$r]=="Y"){ $oDlc->DlcSign=$DlcSign[$r]; }else{ $oDlc->DlcSign="N"; } //echo "DlcSign=".$oDlc->DlcSign."<br>"; if($DlcSend[$r]=="Y"){ $oDlc->DlcSend=$DlcSend[$r]; }else{ $oDlc->DlcSend="N"; } //echo "DlcSend=".$oDlc->DlcSend."<br>"; if($DlcByPass[$r]=="Y"){ $oDlc->DlcByPass=$DlcByPass[$r]; }else{ $oDlc->DlcByPass="N"; } //echo "DlcByPass=".$oDlc->DlcByPass."<br>"; if($DlcView[$r]=="Y"){ $oDlc->DlcView=$DlcView[$r]; }else{ $oDlc->DlcView="N"; } } //echo "DlcView=".$oDlc->DlcView."<br>"; $oDP->SearchByKey($oDlc->deptId); $oDP->GetRecord(); $oDlc->docGroup=$oDP->docGroup; //echo "docGroup=".$oDlc->docGroup."<br>"; if($DlcActive[$r]=="Y"){ $oDlc->DlcActive=$DlcActive[$r]; }else{ $oDlc->DlcActive="N"; } $oDlc->Save(); } //echo "------------------------------------------------<br>"; } // end if save all config $oDlp->SearchByKey($DlpIDadd); $oDlp->GetRecord(); if($addline=="1" && $showdeptId!="1"){ //if add new line if($DlpIDadd=="0" && $personIdadd=="" && $DlcProposeadd!="Y" && $DlcSignadd!="Y" && $DlcSendadd!="Y" && $DlcByPassadd!="Y" && $DlcViewadd !="Y"){ //echo "E<br>"; //no data }else{ //echo "F<br>"; $oDlc1->AddNew(); $oDlc1->DlcID=$DlcIDadd; //echo "DlcID=".$oDlc1->DlcID."<br>"; $oDlc1->deptId=$deptId; //echo "deptId=".$oDlc1->deptId."<br>"; $oDlc1->DlpID=$DlpIDadd; //echo "DlpID=".$oDlc1->DlpID."<br>"; $oDlc1->personId=$personIdadd; //echo "personId=".$oDlc1->personId."<br>"; $oDlc1->DlcSeq=$DlcSeqadd; //echo "DlcSeq=".$oDlc1->DlcSeq."<br>"; if($oDlp->DlpPropose=="Y"){ $oDlc1->DlcPropose='Y'; }else{ $oDlc1->DlcPropose="N"; } //echo "DlcPropose=".$oDlc1->DlcPropose."<br>"; if($oDlp->DlpSign=="Y"){ $oDlc1->DlcSign='Y'; }else{ $oDlc1->DlcSign="N"; } //echo "DlcSign=".$oDlc1->DlcSign."<br>"; if($oDlp->DlpSend=="Y"){ $oDlc1->DlcSend='Y'; }else{ $oDlc1->DlcSend="N"; } //echo "DlcSend=".$oDlc1->DlcSend."<br>"; if($oDlp->DlpByPass=="Y"){ $oDlc1->DlcByPass='Y'; }else{ $oDlc1->DlcByPass="N"; } //echo "DlcByPass=".$oDlc1->DlcByPass."<br>"; if($oDlp->DlpView=="Y"){ $oDlc1->DlcView='Y'; }else{ $oDlc1->DlcView="N"; } //echo "DlcView=".$oDlc1->DlcView."<br>"; $oDP->SearchByKey($oDlc1->deptId); $oDP->GetRecord(); $oDlc1->docGroup=$oDP->docGroup; //echo "docGroup=".$oDlc1->docGroup."<br>"; if($DlcActiveadd=="Y"){ $oDlc1->DlcActive=$DlcActiveadd; }else{ $oDlc1->DlcActive="N"; } $oDlc1->Save(); //echo "------------------------------------------------<br>"; //---------add Parent Dlp $oDlc2->AddNew(); $oDlc2->DlcID=$DlcIDadd+1; // echo "DlcID=".$oDlc2->DlcID."<br>"; $oDlc2->deptId=$deptId; //echo "deptId=".$oDlc2->deptId."<br>"; $oDlp2->SearchDlpPIDByDlpID($DlpIDadd); $oDlp2->GetRecord(); //echo '------------'.$oDlp2->DlpPropose.'<br>'; $oDlc2->DlpID=$oDlp2->DlpID; //echo "DlpID=".$oDlc2->DlpID."<br>"; $oDlc2->personId=$personIdadd; //echo "personId=".$oDlc2->personId."<br>"; $oDlc2->DlcSeq=$DlcSeqadd+1; //echo "DlcSeq=".$oDlc2->DlcSeq."<br>"; if($oDlp2->DlpPropose=="Y"){ $oDlc2->DlcPropose='Y'; }else{ $oDlc2->DlcPropose="N"; } //echo "DlcPropose=".$oDlc2->DlcPropose."<br>"; if($oDlp2->DlpSign=="Y"){ $oDlc2->DlcSign='Y'; }else{ $oDlc2->DlcSign="N"; } //echo "DlcSign=".$oDlc2->DlcSign."<br>"; if($oDlp2->DlpSend=="Y"){ $oDlc2->DlcSend='Y'; }else{ $oDlc2->DlcSend="N"; } //echo "DlcSend=".$oDlc2->DlcSend."<br>"; if($oDlp2->DlpByPass=="Y"){ $oDlc2->DlcByPass='Y'; }else{ $oDlc2->DlcByPass="N"; } //echo "DlcByPass=".$oDlc2->DlcByPass."<br>"; if($oDlp2->DlpView=="Y"){ $oDlc2->DlcView='Y'; }else{ $oDlc2->DlcView="N"; } //echo "DlcView=".$oDlc2->DlcView."<br>"; $oDP->SearchByKey($oDlc2->deptId); $oDP->GetRecord(); $oDlc2->docGroup=$oDP->docGroup; //echo "docGroup=".$oDlc2->docGroup."<br>"; if($DlcActiveadd=="Y"){ $oDlc2->DlcActive=$DlcActiveadd; }else{ $oDlc2->DlcActive="N"; } $oDlc2->Save(); //echo "------------------------------------------------<br>"; //----------------------------------- } } //end if add new line ?> <script language="JavaScript"> parent.location.href ="docLineConfig.php?deptId=<? echo $deptId; ?>&addline=0"; </script> <? }else if($method=="pp2"){ //save all config //echo " for($r=0;$r<$countline;$r++){ if($DlpIDadd=="0" && $personIdadd=="" && $DlcProposeadd=="N" && $DlcSignadd=="N" && $DlcSendadd=="N" && $DlcByPassadd=="N" && $DlcViewadd =="N"){ //echo "C<br>"; //no data }else{ //echo "D<br>"; $oDlc->SearchByKey($DlcID[$r]); $oDlc->GetRecord(); $oDlc->Edit(); $oDlc->DlcID=$DlcID[$r]; //echo "DlcID=".$oDlc->DlcID."<br>"; $oDlc->deptId=$oDlc->deptId; //echo "deptId=".$oDlc->deptId."<br>"; $saveDlpID=$oDlc->DlpID; $oDlp->SearchByKey($DlpID[$r]); $oDlp->GetRecord(); if($oDlp->DlpPID=="0"){ //echo "no edit<br>"; $oDlc->DlpID=$DlpID[$r]; }else{ //echo "edit=".($DlpID[$r-1])."<br>"; $oDlp2->SearchDlpPIDByDlpID($DlpID[$r-1]); $oDlp2->GetRecord(); $oDlc->DlpID=$oDlp2->DlpID; } //----set in ums if($saveDlpID!=$oDlc->DlpID){ $oDlp3->SearchByKey($oDlc->DlpID); $oDlp3->GetRecord(); $oUus->SearchByUsPsCode($personId[$r]); $oUus->GetRecord(); echo "----".$oUus->UsID; $oUg->SearchByKey($oDlp3->GpID,$oUus->UsID); if($oUg->GetRecord()==0){ $oUg->AddNew(); $oUg->UgID=$oUg->GetNextCode(); echo "UgID=".$oUg->UgID."<br>"; $oUg->UgGpID=$oDlp3->GpID; echo "UgGpID=".$oUg->UgGpID."<br>"; $oUg->UgUsID=$oUus->UsID; echo "UgUsID=".$oUg->UgUsID."<br>"; $oUg->Save(); } } //echo "DlpID=".$oDlc->DlpID."<br>"; $oDlc->personId=$personId[$r]; //echo "personId=".$oDlc->personId."<br>"; $oDlc->DlcSeq=$DlcSeq[$r]; //echo "DlcSeq=".$oDlc->DlcSeq."<br>"; if($DlcPropose[$r]=="Y"){ $oDlc->DlcPropose=$DlcPropose[$r]; }else{ $oDlc->DlcPropose="N"; } //echo "DlcPropose=".$oDlc->DlcPropose."<br>"; if($DlcSign[$r]=="Y"){ $oDlc->DlcSign=$DlcSign[$r]; }else{ $oDlc->DlcSign="N"; } //echo "DlcSign=".$oDlc->DlcSign."<br>"; if($DlcSend[$r]=="Y"){ $oDlc->DlcSend=$DlcSend[$r]; }else{ $oDlc->DlcSend="N"; } //echo "DlcSend=".$oDlc->DlcSend."<br>"; if($DlcByPass[$r]=="Y"){ $oDlc->DlcByPass=$DlcByPass[$r]; }else{ $oDlc->DlcByPass="N"; } //echo "DlcByPass=".$oDlc->DlcByPass."<br>"; if($DlcView[$r]=="Y"){ $oDlc->DlcView=$DlcView[$r]; }else{ $oDlc->DlcView="N"; } //echo "DlcView=".$oDlc->DlcView."<br>"; $oDP->SearchByKey($oDlc->deptId); $oDP->GetRecord(); $oDlc->docGroup=$oDP->docGroup; //echo "docGroup=".$oDlc->docGroup."<br>"; if($DlcActive[$r]=="Y"){ $oDlc->DlcActive=$DlcActive[$r]; }else{ $oDlc->DlcActive="N"; } $oDlc->Save(); } //echo "------------------------------------------------<br>"; } // end if save all config ?> <script language="JavaScript"> parent.location.href ="docLineConfigforDept.php?deptId=<? echo $deptId; ?>"; </script> <? }else{ //search person ?> <html> <head> <title>ตารางค้นหาบุคลากร</title> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="source/style.css" rel="stylesheet" type="text/css"> </head> <style> <!-- A:link {text-decoration: none; color: #000000} A:visited {text-decoration: none; color: #000000} A:hover {text-decoration: none; font-weight: underline; color: #015181} --> </style>
<form name="ff"> <table width="102%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td height="30" align="left"><strong><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"> <img src="../picture/search2.jpg" border="0" > ค้นหารายชื่อบุคลากร</font></strong></td></tr> <tr> <td height="30" align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"> ชื่อ - นามสกุล ::</font> <input type="text" name="name" id="name" value="<? echo $name; ?>"> <input type=submit value="ค้นหา" align=center> </td> </tr> <tr> <td align="center"><br> <table width="100%" height="22" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_15'];?>"> <td height="24" colspan="4" align="center" ><strong><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"> รายชื่อบุคลากร</font></strong></td> </tr> <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_4'];?>"> <td height="26" width="82" align="center" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"><strong>ลำดับที่</strong></font></td> <td width="927" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"><strong>ชื่อ-นามสกุล</strong></font></td> </tr> <tr> <td width="82" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? echo a2th($i+1);?> </font></td> <td align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> <? if($casec=="caseDlcIDSecond"){ $mth="addps3"; }else{ if($fordept==1){ $mth="addps2"; }else{ $mth="addps"; } } ?> <? if($addnew!=1){?> <a href="searchPsTable.php?DlcID=<? echo $DlcID; ?>&method=<? echo $mth; ?>&personId=&deptId=<? echo $deptId; ?>"> <? echo "ไม่เลือก";?></a> <? }else{ ?> <a href="searchPsTable.php?DlcID=<? echo $DlcID; ?>&method=<? echo $mth; ?>&personId=&deptId=<? echo $deptId; ?>&DlcSeq=<? echo $DlcSeq;?>&docGroup=<? echo $docGroup; ?>"><? echo "ไม่เลือก";?></a> <? } ?> </font></td> </tr> <?php $i=1; $oPS->SearchByNameOnWork2($name); while($oPS->GetRecord()){ if(($i%2) == 0) echo "<tr>"; else echo "<tr bgcolor=\"".$GLOBALS['COLOR_BG_TABLE_8']."\">"; ?> <td width="82" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? echo a2th($i+1);?> </font></td> <td align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> <? if($addnew!=1){?> <a href="searchPsTable.php?DlcID=<? echo $DlcID; ?>&method=<? echo $mth; ?>&personId=<? echo $oPS->personId; ?>&deptId=<? echo $deptId; ?>"><? echo " ".GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName; ?></a> <? }else{ ?> <a href="searchPsTable.php?DlcID=<? echo $DlcID; ?>&method=<? echo $mth; ?>&personId=<? echo $oPS->personId; ?>&deptId=<? echo $deptId; ?>&DlcSeq=<? echo $DlcSeq;?>&docGroup=<? echo $docGroup; ?>"><? echo " ".GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName; ?></a> <? } ?> </font></td> </tr> <? $i++; } ?> <table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr> <td><font color="#FF0000" size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">หมายเหตุ :: คลิกที่รายชื่อบุคลากรที่ต้องการ<br> <font color="#FF0000"></font> กำหนดตำแหน่งงานสารบรรณ</font></td> </tr> <tr> <td> </td> <td align="right"><font size="2">รวม <?php echo $i; ?> รายการ</font></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#FFFFFF"> </td> </tr> <tr> <td align="center" colspan="2" bgcolor="#FFFFFF"><a href="#" onClick="window.close()"><font size="2" face="Microsoft Sans Serif">[ปิดหน้าต่าง]</font></a></td> </tr> </table> </table> </td> </tr> </table> <input type="hidden" name="DlcID" id="DlcID" value="<? echo $DlcID; ?>"> <input type="hidden" name="deptId" id="deptId" value="<? echo $deptId; ?>"> <input type="hidden" name="fordept" id="fordept" value="<? echo $fordept; ?>"> <input type="hidden" name="casec" id="casec" value="<? echo $casec; ?>"> </form> </body> </html> <? } //end if case method } //end if confirm use doclineconfig ?>
|