Viewing file: showSelectDoc.php (9.87 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"; ?> <?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 "../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 "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); $oDoc5 = new Documents($oC); $oDoc6 = 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); $oRs2 = new DocReceiveSend($oC); $oRs3 = new DocReceiveSend($oC); $MaxDocGroup=$oDP->SearchMaxDocGroup(); $InputThai=$oSys->SearchByInputThai(); $oDlc->SearchByKey($DLCID); $oDlc->GetRecord(); $oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord(); if(SearchCanSeeAll($oDlc->DlpID)=="All"){ $deptcenter=1; } ?> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <? $flagshow=1;?> <tr height=22> <td width="6%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">เลขรับ</font></td> <td width="17%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">ที่ ลงวันที่</font></td> <td width="23%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">จาก/ที่มา (ต้นเรื่อง)</font></td> <td width="25%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">เรื่อง</font></td> <td width="14%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><? if($deptcenter=="1"){ echo "ลงวันที่"; }else{ echo "วันที่ได้รับหนังสือ"; } ?></font></td> <td width="15%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">วันที่<? if($deptcenter=="1"){ echo "ลงทะเบียน"; }else{ if($s=="" || $s=="6"){ echo "ไม่"; } if($s=="7"){ echo "แจ้งการส่งผิด"; }else{ echo "ลงรับหนังสือ"; } }?></font></td> </tr> <? if($selectdocdatevalue=="3" && $searchName=="" && $searchNo=="" && $searchTypeNoF=="" && $searchTypeNoT==""){ $cannotsearch=1; } $numrow=0; $searchdocdate=splitDateForm($searchdocdate,"/"); if($cannotsearch!='1'){ if($deptcenter=="1"){ $numRow = $oDoc3->SearchByDlcIDDocGroupPSDlcID2DsID0DrsSendDateNoAcceptandAcceptRsID1searchNo($DLCID,$MaxDocGroup,$DlcPS2,$monthe,th2a($searchYear),$s,th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $numRow = $oDoc3->SearchByDlcIDDocGroupPSDlcID2DsID0DrsSendDateNoAcceptandAcceptnoRsID4searchNo($DLCID,$MaxDocGroup,$DlcPS2,$monthe,th2a($searchYear),$s,th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } }else{ $numRow=0; } $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; } if($deptcenter=="1"){ $oDoc4->SearchByDlcIDDocGroupPSDlcID2DsID0DrsSendDateNoAcceptandAcceptLimitDrsReceiveDateRsID1searchNo($DLCID,$MaxDocGroup,$DlcPS2, $start, $pgajax,$monthe,th2a($searchYear),$s,th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $oDoc4->SearchByDlcIDDocGroupPSDlcID2DsID0DrsSendDateNoAcceptandAcceptLimitDrsReceiveDatenoRsID4searchNo($DLCID,$MaxDocGroup,$DlcPS2, $start, $pgajax,$monthe,th2a($searchYear),$s,th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } while($oDoc4->GetRecord()){ if(($z%2) == 0) echo "<tr bgcolor=\"#FFFFFF\" height=22 >"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\" height=22>"; ?> <td height="35" align="center"> <? if($s=="6" || $s=="7"){ echo '-'; }else{ echo a2th($oDoc4->DocTypeNo); } ?></td> <td height="35"> <? if($oDoc4->DtID!=15){ echo $oDoc4->DocNo; }else{ echo '-'; } ?><br> <? echo abbreDate2($oDoc4->DocDate,'/'); ?></td> <td><? if($oDoc4->DtID=="1" || $oDoc4->DtID=="2" || $oDoc4->DtID=="14"){ echo " ".$oDoc4->DocFrom."<br>"; }else{ if($oDoc4->DocPID=="0"){ $oDlc2->SearchByKey($oDoc4->DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); }else{ $oD_DlcID=$oDoc6->SearchDlcID($oDoc4->DocPID); $oDlc3->SearchByKey($oD_DlcID); $oDlc3->GetRecord(); $oDlp->SearchByKey($oDlc3->DlpID); $oDlp->GetRecord(); } echo " ".$oDoc4->DocFrom."<br>"; echo " (".$oDlp->DlpName.")"; } ?> </td> <td align="left"> <? echo showeDoc($oDoc4->eDoc); ?><a href="showNoAcceptDoc.php?page_id=<? echo $page_id;?>&s=<? echo $s; ?>&flagshow=<? echo $flagshow; ?>&DtID=<? echo $oDoc4->DtID;?>&RsID=<? echo $oDoc4->RsID; ?>&DocID=<?php echo $oDoc4->DocID;?>&DrsID=<? echo $oDoc4->DrsID; ?>&monthe=<? echo $monthe;?>&searchYear=<? echo $searchYear; ?>&searchName=<? echo $searchName; ?>&searchNo=<? echo $searchNo; ?>&deptcenter=<? echo $deptcenter; ?>&searchdocdate=<? echo $searchdocdate;?>&selectdocdatevalue=<? echo $selectdocdatevalue;?>&searchdocdate=<? echo $searchdocdate; ?>&folderstaff=<? echo $folderstaff;?>&forfolderstaff=<? echo $forfolderstaff;?>"><? if($oDoc4->DtID=="13"){ echo "ชื่อผู้ได้รับการรับรอง<br>".$oDoc4->CertificatePs; }else{ echo $oDoc4->DocSubject; } ?></a> <? $oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord(); if($oDlp1->DlpPID!="0"){ if($DLCID==$oDoc4->DlcIDDrsID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} if($oDlp1->DlpPID=="0"){ if($DlcPS2==$oDoc4->DlcIDDrsID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} ?> </td> <td align="center"> <? if($deptcenter=="1"){ echo abbreDate2($oDoc4->DocDate,'/'); }else{ if($s=="" || $s=="6"){ list($DocD,$DocT) = preg_split('[ ]',$oDoc4->DocDateCreate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); }else{ $or_DrsReceiveDate=$oRs3->SearchDrsReceiveDate($oDoc4->DrsFromDrsID); list($DocD,$DocT) = preg_split('[ ]',$or_DrsReceiveDate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); } } ?> </td> <td align="center"> <? if($oDoc4->DrsReceiveDate!="0000-00-00 00:00:00"){ list($DocD,$DocT) = preg_split('[ ]',$oDoc4->DrsReceiveDate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); } ?> </td> </tr> <? $z++; } } // if($numRow!=0)?> <? if($z=="0"){?> <tr height=22><td align="center" bgcolor="#FFFFFF" colspan="8"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** ไม่มีรายการหนังสือที่<? if($s=="" || $s=="6" && $deptcenter!="1"){ echo "ไม่"; } if($s=="7"){ echo "แจ้งการส่งผิด"; }else{ echo "ลงรับ"; } ?> **</font></td></tr> <tr height=22 bgcolor="#DADADA"><td align="right" colspan="8"> </td></tr> <? }else{ ?> <tr height=22 bgcolor="#DADADA"><td align="right" colspan="8"><strong>หน้า-></strong> <?php for ($num=1; $num<=$total_page; $num++) { if($num == $page_id) echo a2th($num)." "; else { ?> <a href="receiveDoc.php?page_id=<?php echo $num;?>&flagshow=<? echo $flagshow; ?>&monthe=<? echo $monthe;?>&searchYear=<? echo $searchYear; ?>&s=<? echo $s; ?>&searchName=<? echo $searchName;?>&searchNo=<? echo $searchNo; ?>&deptcenter=<? echo $deptcenter; ?>&searchdocdate=<? echo $searchdocdate;?>&selectdocdatevalue=<? echo $selectdocdatevalue;?>&folderstaff=<? echo $folderstaff;?>&forfolderstaff=<? echo $forfolderstaff;?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";}?></a> <?php } } ?> </td></tr> <? } ?> </table>
|