Viewing file: showSelectSignDoc.php (8.5 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) { ShowInfoSign(DLCID,MaxDocGroup,DlcPS2); } } </script> <?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 "../class/clsDocWSign.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); $oDlp = new docLinePosition($oC); $oDlp1 = 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); $MaxDocGroup=$oDP->SearchMaxDocGroup(); $InputThai=$oSys->SearchByInputThai(); $oDws = new docwsign($oC);
$oDlc->SearchByKey($DLCID); $oDlc->GetRecord(); $oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord();
?> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <?php $flagshow=1; $q=bgForSendPage2($DtID);?> <tr height=22> <td width="15%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>ที่ ลงวันที่</strong></font></td> <td width="10%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>จาก/ที่มา (ต้นเรื่อง)</strong></font></td> <td width="26%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>เรื่อง/ว่าด้วย (ชนิดหนังสือ)</strong></font></td> <td width="10%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>วันที่ลงนาม</strong></font></td> </tr> <?php $searchdocdate=splitDateForm($searchdocdate,"/"); //--------------------------------find count if($selectdocdatevalue=="3" && $searchName=="" && $searchNo=="" && $searchTypeNoF=="" && $searchTypeNoT==""){ $cannotsearch=1; } $numrow=0; if($cannotsearch!='1'){ if($s=="2"){ $numRow =$oRs4->SearchCountByDocforWSign($MaxDocGroup,$DLCID,$DlcPS2,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $numRow =$oRs4->SearchCountByDocSign($MaxDocGroup,$DLCID,$DlcPS2,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),$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; } //echo "numrow=".$numrow; //------------------------------- if($s=="2"){ $oRs5->SearchByDocforWSign($MaxDocGroup,$DLCID,$DlcPS2, $start, $pgajax,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $oRs5->SearchByDocSign($MaxDocGroup,$DLCID,$DlcPS2, $start, $pgajax,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } while($oRs5->GetRecord()){ //$oRs5->SearchByDocSignpage($oRs5->DocID); //$oRs5->GetRecord(); if(($z%2) == 0) echo "<tr bgcolor=\"#FFFFFF\" height=22 >"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\" height=22>"; ?> <td width="13%"> <?php echo a2th($oRs5->DocNo); ?><br> <? echo abbreDate2($oRs5->DocDate,'/'); ?></td> <td width="18%" > <?php if($oRs5->DtID=="1" || $oRs5->DtID=="2" || $oRs5->DtID=="14"){ echo " ".a2th($oRs5->DocFrom)."<br>"; }else{ if($oRs5->DocPID=="0"){ $oDlc2->SearchByKey($oRs5->DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); echo " ".a2th($oRs5->DocFrom)."<br>"; echo " (".$oDlp->DlpName.")"; }else{ $oDoc5->SearchByKey($oRs5->DocPID); $oDoc5->GetRecord(); $oDlc2->SearchByKey($oDoc5->DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); echo " ".$oRs5->DocFrom."<br>"; echo " (".$oDlp->DlpName.")"; } } ?> </td> <td width="30%"> <? echo showeDoc($oRs5->eDoc); ?> <a href="showDetailSignDoc.php?page_id=<? echo $page_id;?>&DocID=<?php echo $oRs5->DocID;?>&DrsID=<?php echo $oRs5->DrsID; ?>&flagshow=<?php echo $flagshow; ?>&monthe=<?php echo $monthe;?>&searchYear=<?php echo $searchYear; ?>&searchName=<?php echo $searchName; ?>&searchNo=<?php echo $searchNo; ?>&s=<?php echo $s; ?>&searchdocdate=<? echo $searchdocdate;?>&selectdocdatevalue=<? echo $selectdocdatevalue;?>&folderstaff=<? echo $folderstaff;?>&forfolderstaff=<? echo $forfolderstaff;?>"><?php echo a2th($oRs5->DocSubject); ?></a> <font color="<?php echo $GLOBALS["COLOR_FONT_5"]; ?>" size="2"><?php $oDt->SearchByKey($oRs5->DtID); $oDt->GetRecord(); echo "(".$oDt->DtName.")"; ?></font> <?php if($oDlp1->DlpPID!="0"){ if($DLCID==$oRs5->DlcIDDrs){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} ?> <?php if($oDlp1->DlpPID=="0"){ if($DlcPS2==$oRs5->DlcIDDrs){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} ?> <?php if($oRs5->DrsWSign=='Y'){ echo " (หนังสือ".$GLOBALS['DOCFORSIGNNAME'].")"; } ?> </td> <td align="center"> <?php if($s==2){ if($oRs5->signDateTime!="0000-00-00 00:00:00"){ list($DocD,$DocT) = preg_split('[ ]',$oRs5->signDateTime); } }else{ if($oRs5->DrsSendDate!="0000-00-00 00:00:00"){ list($DocD,$DocT) = preg_split('[ ]',$oRs5->DrsSendDate); } } echo abbreDate2($DocD,'/')."<br>".a2th($DocT); ?> </td> </tr> <?php $z++; }} ?> <?php 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> <?php }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="signDoc.php?page_id=<?php echo $num;?>&flagshow=<?php echo $flagshow; ?>&monthe=<?php echo $monthe;?>&searchYear=<?php echo $searchYear; ?>&searchName=<?php echo $searchName; ?>&searchNo=<?php echo $searchNo; ?>&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>
|