Viewing file: showSelectSendDoc.php (8.46 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) { ShowInfoSendDoc(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(); //$DlcPS2=$oDlc2->SearchDlc2($oDlc->DlcSeq,$oDlp1->DlpPID,$oDlc->deptId); $DlcPS2=searchDlcPS2($oDlc->DlpID,$DLCID,$oDlc->DlcSeq,$oDlc->deptId); ?> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <? $flagshow=1; $q='../picture/table_header_bg6.gif';?> <tr height=22> <td width="5%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>àÅ¢ÃѺ</strong></font></td> <td width="17%" 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="21%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>àÃ×èͧ/ÇèÒ´éÇ (ª¹Ô´Ë¹Ñ§Ê×Í)</strong></font></td> <td width="13%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>Çѹ·ÕèÊ觶֧<br>¼ÙéÃѺ¼Ô´ªÍº</strong></font></td> </tr> <?php $searchdocdate=splitDateForm($searchdocdate,"/"); //--------------------------------find count if($selectdocdatevalue=="3" && $searchName=="" && $searchNo=="" && $searchTypeNoF=="" && $searchTypeNoT==""){ $cannotsearch=1; } if($cannotsearch!='1'){ $numRow = $oRs4->SearchCountSendDoc($DLCID,$MaxDocGroup,$DlcPS2,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),$searchdocdate,$selectdocdatevalue,$selectDtID,$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; }
$oRs5->SearchCountSendDoclimit($DLCID,$MaxDocGroup,$DlcPS2, $start, $pgajax,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),$searchdocdate,$selectdocdatevalue,$selectDtID,$folderstaff,$forfolderstaff); while($oRs5->GetRecord()){ //$oRs5->SearchBySendDoc($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 align="center"><? if($oRs5->DocTypeNo!='0'){ echo a2th($oRs5->DocTypeNo); }?></td> <td > <?php echo a2th($oRs5->DocNo); ?><br> <? echo abbreDate2($oRs5->DocDate,'/'); ?></td> <td > <?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(); }else{ $od_DlcID=$oDoc5->SearchDlcID($oRs5->DocPID); $oDlc2->SearchByKey($od_DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); } echo " ".a2th($oRs5->DocFrom)."<br>"; echo " (".$oDlp->DlpName.")"; } if($oRs5->RsID!='2'){ $fn="showDetailSendDoc.php"; }else{ $fn="showDetailSendDocSR.php";} ?> </td> <td > <? echo showeDoc($oRs5->eDoc); ?><a href="<?php echo $fn; ?>?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; ?>&searchdocdate=<? echo $searchdocdate;?>&selectdocdatevalue=<? echo $selectdocdatevalue;?>&selectDtID=<? echo $selectDtID;?>&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>"; }} ?> </td> <td align="center"> <?php 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++; } } // if($numRow!=0)?> <?php if($z=="0"){?> <tr height=22><td align="center" bgcolor="#FFFFFF" colspan="5"><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="sendDoc.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;?>&selectDtID=<? echo $selectDtID;?>&folderstaff=<? echo $folderstaff;?>&forfolderstaff=<? echo $forfolderstaff;?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";}?></a> <?php } } ?> </td></tr> <? } ?> </table>
|