Viewing file: showSelectSendDocforSign.php (10.89 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php header("content-type: application/x-javascript; charset=TIS-620"); include_once "includefile.php"; ?> <script src="getinfo.js"></script> <script> function On_Year(DLCID,MaxDocGroup,DlcPS2,InputThai){ searchYear=document.ff.searchYear.value; if (searchYear.length == 4) { ShowInfoSendDocforSign(DLCID,MaxDocGroup,DlcPS2,InputThai); } } </script> <?php include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "../class/clsPerson.php"; include_once "../link/function.php"; include_once "../class/clsDocLinePosition.php"; include_once "../class/clsDocLineConfig.php"; include_once "../class/clsReceiveSendType.php"; include_once "../class/clsDocType.php"; include_once "../link/functionshow.php"; include_once "../class/clsDocattatchesTmp.php"; include_once "../class/clsDocuments.php"; include_once "../class/clsDocSpeedLevel.php"; include_once "../class/clsDocSecreLevel.php"; include_once "../class/clsDocReceiveSend.php"; include_once "../class/clsDocSendtoPsTmp.php"; include_once "funct.php"; include_once "../link/keyThai.php"; $oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDP = new Department($oC); $oDP2 = new Department($oC); $oDP3 = new Department($oC); $oPS = new person($oC); $oDlc = new DocLineConfig($oC); $oDlc2 = new DocLineConfig($oC); $oDlc3 = new DocLineConfig($oC); $oDlc4 = new DocLineConfig($oC); $oDlp = new docLinePosition($oC); $oDlp1 = new docLinePosition($oC); $oDlp2 = new docLinePosition($oC); $oRSt = new receiveSendType($oC); $oDt = new doctype($oC); $oDtmp = new DocattatchesTmp($oC); $oDoc = new Documents($oC); $oDoc1 = new Documents($oC); $oDoc2 = new Documents($oC); $oDoc3 = new Documents($oC); $oDoc4 = new Documents($oC); $oDoc5 = new Documents($oC); $oDsl = new DocSpeedLevel($oC); $oDcl = new DocSecretLevel($oC); $oDsl2 = new DocSpeedLevel($oC); $oDcl2 = new DocSecretLevel($oC); $oRs = new DocReceiveSend($oC); $oRs1 = new DocReceiveSend($oC); $oRs4 = new DocReceiveSend($oC); $oRs5 = new DocReceiveSend($oC); $oRs6 = new DocReceiveSend($oC); $oRs7 = new DocReceiveSend($oC); $oStmp=new DocSendToPsTmp($oC); $MaxDocGroup=$oDP->SearchMaxDocGroup(); $InputThai=$oSys->SearchByInputThai(); $oDlc->SearchByKey($DLCID); $oDlc->GetRecord(); $oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord(); if($oDlp1->DlpPID!="0"){ //$DlcPS2=$DLCID; $DlcPS2=$oDlc2->SearchDlc2($oDlc->DlcSeq,$oDlp1->DlpPID,$oDlc->deptId); }else{ $DlcPS2=$oDlc2->SearchDlc2($oDlc->DlcSeq,$oDlp1->DlpPID,$oDlc->deptId); } ?> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse"> <tr><td align="right"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"> ค้นหาหนังสือ (เรื่อง/ว่าด้วย)</font> <input name="searchName" id="searchName" type="text" size="25" value="<?php echo a2th($searchName); ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"> (ที่)</font> <input name="searchNo" id="searchNo" type="text" size="20" value="<?php echo a2th($searchNo); ?>"> <br>ประจำเดือน</font> <select name="monthe" id="monthe" onChange="ShowInfoSendDocforSign('<?php echo $DLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $DlcPS2; ?>','<? echo $InputThai; ?>')"> <option value="01" <?php if($monthe=="01"){ echo "selected"; }?>>ม.ค.</option> <option value="02" <?php if($monthe=="02"){ echo "selected"; }?>>ก.พ.</option> <option value="03" <?php if($monthe=="03"){ echo "selected"; }?>>มี.ค.</option> <option value="04" <?php if($monthe=="04"){ echo "selected"; }?>>เม.ย.</option> <option value="05" <?php if($monthe=="05"){ echo "selected"; }?>>พ.ค.</option> <option value="06" <?php if($monthe=="06"){ echo "selected"; }?>>มิ.ย.</option> <option value="07" <?php if($monthe=="07"){ echo "selected"; }?>>ก.ค.</option> <option value="08" <?php if($monthe=="08"){ echo "selected"; }?>>ส.ค.</option> <option value="09" <?php if($monthe=="09"){ echo "selected"; }?>>ก.ย.</option> <option value="10" <?php if($monthe=="10"){ echo "selected"; }?>>ต.ค.</option> <option value="11" <?php if($monthe=="11"){ echo "selected"; }?>>พ.ย.</option> <option value="12" <?php if($monthe=="12"){ echo "selected"; }?>>ธ.ค.</option> </select> <input name="searchYear" id="searchYear" type="text" size="5" maxlength="5" value=<?php if($searchYear!=""){ echo a2th($searchYear); }else{ echo a2th(Date('Y')+543); } ?> onKeyUp="On_Year('<?php echo $DLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $DlcPS2; ?>','<? echo $InputThai; ?>')" onkeypress="return isNumberKey('<? echo $InputThai; ?>',event)"> <input name="searchNamesub" type="button" value="ค้นหา" onClick="ShowInfoSendDocforSign('<?php echo $DLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $DlcPS2; ?>','<? echo $InputThai; ?>')"> </td></tr> </table> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <? $flagshow=1; ?> <tr height=22> <td width="15%" align="center" background="../picture/table_header_bg6.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>จาก/ที่มา (ต้นเรื่อง)</strong></font></td> <td width="5%" align="center" background="../picture/table_header_bg6.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>เลขส่ง</strong></font></td> <td width="28%" align="center" background="../picture/table_header_bg6.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>เรื่อง/ว่าด้วย (ชนิดหนังสือ)</strong></font></td> <td width="10%" align="center" background="../picture/table_header_bg6.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>วันที่รับเอกสาร</strong></font></td> <td width="2%" align="center" background="../picture/table_header_bg6.gif"><img src="../picture/rapid0.jpg" border="0" ></td> <td width="2%" align="center" background="../picture/table_header_bg6.gif"><img src="../picture/secret0.jpg" border="0" ></td> </tr> <? //--------------------------------find count $numRow = $oDoc4->SearchGetDocForSign($oDlc->deptId,$MaxDocGroup,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo));
$z=0; if($numRow!=0){ $total_page = (int)($numRow/$pgajax); if(($numRow%$pgajax) != 0) $total_page++;
if($page_id!=""){ if($page_id>$total_page){ $page_id = 1; $start = 0; }}else{ $page_id = 1; $start = 0;} if(isset($page_id)) $start = $pgajax*($page_id-1); else { $page_id = 1; $start = 0; }
$oDoc3->SearchGetDocForSignLimit($oDlc->deptId,$MaxDocGroup, $start, $pgajax,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo)); while($oDoc3->GetRecord()){ if(($z%2) == 0) echo "<tr bgcolor=\"#FFFFFF\" height=22 >"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\" height=22>"; ?> <td align="left"> <? if($oDoc3->DtID=="1" || $oDoc3->DtID=="2" || $oDoc3->DtID=="14"){ echo " ".$oDoc3->DocFrom."<br>"; }else{ if($oDoc3->DocPID=="0"){ $oDlc2->SearchByKey($oDoc3->DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); echo " ".$oDoc3->DocFrom."<br>"; echo " (".$oDlp->DlpName.")"; }else{ $oDoc4->SearchByKey($oDoc3->DocPID); $oDoc4->GetRecord(); $oDlc2->SearchByKey($oDoc4->DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); echo " ".$oDoc3->DocFrom."<br>"; echo " (".$oDlp->DlpName.")"; } } if($oDoc3->RsID!='2'){ $fn="showSendDoc.php"; }else{ $fn="showSendDocSR.php";} ?> </td> <td align="center"> <? $oDoc4->SearchByKey($oDoc3->DocID); $oDoc4->GetRecord(); echo $oDoc4->DocTypeNo; ?> </td> <td align="left"> <? echo $oDoc3->DocSubject; ?><? //if($DtID=="13"){ echo "ชื่อผู้ได้รับการรับรอง<br>".$oDoc->CertificatePs; }else{ echo $oDoc->DocSubject; } ?> <font color="<?php echo $GLOBALS["COLOR_FONT_5"]; ?>" size="2"><? $oDt->SearchByKey($oDoc3->DtID); $oDt->GetRecord(); echo "(".$oDt->DtName.")";?></font> <? if($oDlp1->DlpPID!="0"){ if($DLCID==$oDoc3->DlcID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} ?> <? if($oDlp1->DlpPID=="0"){ if($DlcPS2==$oDoc3->DlcID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} ?> </td> <td align="center"> <? list($DocD,$DocT) = preg_split('[ ]',$oDoc3->getDate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); ?></td> <? if($oDoc3->DslID=="0"){ $rapid="../picture/rapid0.jpg"; $rapidname=$oDsl2->SearchName(0); }else if($oDoc3->DslID=="1"){ $rapid="../picture/rapid1.jpg"; $rapidname=$oDsl2->SearchName(1); }else if($oDoc3->DslID=="2"){ $rapid="../picture/rapid2.jpg"; $rapidname=$oDsl2->SearchName(2); }else if($oDoc3->DslID=="3"){ $rapid="../picture/rapid3.jpg"; $rapidname=$oDsl2->SearchName(3); }else{ $rapid="../picture/blank.gif"; $rapidname=""; }?> <td align="center"><? echo searchPicDocSpeedLevel($oDoc3->DslID); ?></td> <? if($oDoc3->DclID=="0"){ $secret="../picture/secret0.jpg"; $secretname=$oDcl2->SearchName(0); }else if($oDoc3->DclID=="1"){ $secret="../picture/secret1.jpg"; $secretname=$oDcl2->SearchName(1); }else if($oDoc3->DclID=="2"){ $secret="../picture/secret2.jpg"; $secretname=$oDcl2->SearchName(2);}else if($oDoc3->DclID=="3"){ $secret="../picture/secret3.jpg"; $secretname=$oDcl2->SearchName(3); }else if($oDoc3->DclID=="4"){ $secret="../picture/secret4.jpg"; $secretname=$oDcl2->SearchName(4); }else{ $secret="../picture/blank.gif"; $secretname="";}?> <td align="center"><? echo searchPicDocSecretLevel($oDoc3->DclID); ?></td> </tr> <? $z++; } } if($z=="0"){?> <tr height=22><td align="center" bgcolor="#FFFFFF" colspan="7"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** ไม่มีรายการ **</font></td></tr> <tr height=22 bgcolor="#DADADA"><td align="right" colspan="7"> </td></tr> <? }else{ ?> <tr height=22 bgcolor="#DADADA"><td align="right" colspan="7"><strong>หน้า-></strong> <?php for ($num=1; $num<=$total_page; $num++) { if($num == $page_id) echo a2th($num)." "; else { ?> <a href="showDocforSign.php?page_id=<?php echo $num;?>&flagshow=<? echo $flagshow; ?>&monthe=<? echo $monthe;?>&searchYear=<? echo $searchYear; ?>&searchName=<? echo $searchName; ?>&searchNo=<? echo $searchNo; ?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";}?></a> <?php } } ?> </td></tr> <? } ?> </table>
|