Viewing file: receiveDoc2_b.php (16.51 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once "template.php"; include_once "../class/clsTable.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 "../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); $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); $MaxDocGroup=$oDP->SearchMaxDocGroup();
if($DLCID && $one_position!="1"){ include_once "selectposition.php"; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="../source/style.css" rel="stylesheet" type="text/css"> </head> <body> <table width="100%" align="center"> <tr><td > <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="receiveDoc.php">˹ѧÊ×Íà¢éÒ</a> </font></legend> <form name="ff" METHOD="POST" action="sendDoc.php"> <table align="center" width="98%" > <tr> <td width="68%" height="25"><img src="../picture/official_letter.gif" border="0" > <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="3"><strong> ˹ѧÊ×Íà¢éÒ</strong></font> </td> <td width="23%" align="right"> </td> <td width="9%" align="right" > </td> </tr> <tr> <td colspan="3"><hr color="#000099"></hr> </td> </tr> </table> <? //echo "RsID=".$RsID." DtID=".$DtID."deptId=".$oDlc->deptId;?><br> <table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" background="<? if($DtID=="6" || $DtID=="7" || $DtID=="9"){ echo "../picture/table_header_bg2.gif"; }else{ echo "../picture/table_header_bg.gif"; }?>"> <tr height=22> <td width="10%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>·Õè</strong></font></td> <td width="15%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>¨Ò¡/·ÕèÁÒ (µé¹àÃ×èͧ)</strong></font></td> <td width="23%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>àÃ×èͧ</strong></font></td> <td width="9%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>Çѹ·Õèä´éÃѺ˹ѧÊ×Í</strong></font></td> <td width="2%" align="center"><img src="../picture/rapid0.jpg" border="0" ></td> <td width="2%" align="center"><img src="../picture/secret0.jpg" border="0" ></td> </tr> <? //-------------------------other doc------------------------------------------------------------------------------------ $oDlc->SearchByKey($DLCID); $oDlc->GetRecord(); $oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord(); if($oDlp1->DlpPID!="0"){ $DlcPS2=$DLCID; }else{ $DlcPS2=$oDlc2->SearchDlc2($oDlc->DlcSeq,$oDlp1->DlpPID,$oDlc->deptId); } $oDoc->SearchByDlcIDDocGroupPSDlcID2DsID0($DLCID,$MaxDocGroup,$DlcPS2); $i=0; while($oDoc->GetRecord()){ $oRs->SearchByDocGroupDocIDStatus0($MaxDocGroup,$oDoc->DocID); if($oRs->GetRecord()=="1"){ if(($i%2) == 0) echo "<tr bgcolor=\"#FFFFFF\" height=22 >"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\" height=22 align=\"left\">"; ?> <td height="35"> <? echo $oDoc->DocNo; ?></td> <td align="left"> <? if($oDoc->DocPID=="0"){ $oDlc2->SearchByKey($oDoc->DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); $oDP->SearchByKey($oDlc2->deptId); $oDP->GetRecord(); echo " ".$oDP->deptName."<br>"; echo " (".$oDlp->DlpName.")"; }else{ $oRs2->SearchByKey($oRs->DrsFromDrsID); $oRs2->GetRecord(); $oDoc2->SearchByKey($oRs2->DocID); $oDoc2->GetRecord(); $oDlc2->SearchByKey($oDoc2->DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); $oDP->SearchByKey($oDlc2->deptId); $oDP->GetRecord(); echo " ".$oDP->deptName."<br>"; echo " (".$oDlp->DlpName.")"; } ?> </td> <td align="left"> <a href="showReceiveDoc.php?DtID=<? echo $oDoc->DtID;?>&RsID=<? echo $oDoc->RsID; ?>&DocID=<?php echo $oDoc->DocID;?>&DrsID=<? echo $oRs->DrsID; ?>"><? if($DtID=="13"){ echo "ª×èͼÙéä´éÃѺ¡ÒÃÃѺÃͧ<br>".$oDoc->CertificatePs; }else{ echo $oDoc->DocSubject; } ?></a> </td> <td align="center"> <? list($DocD,$DocT) = split(' ',$oRs->DrsReceiveDate ); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); ?></td> <? if($oDoc->DslID=="0"){ $rapid="../picture/rapid0.jpg"; $rapidname=$oDsl2->SearchName(0); }else if($oDoc->DslID=="1"){ $rapid="../picture/rapid1.jpg"; $rapidname=$oDsl2->SearchName(1); }else if($oDoc->DslID=="2"){ $rapid="../picture/rapid2.jpg"; $rapidname=$oDsl2->SearchName(2); }else if($oDoc->DslID=="3"){ $rapid="../picture/rapid3.jpg"; $rapidname=$oDsl2->SearchName(3); }else{ $rapid="../picture/blank.gif"; $rapidname=""; }?> <td align="center"><img src="<? echo $rapid; ?>" title="<? echo $rapidname; ?>" border="0" ></td> <? if($oDoc->DclID=="0"){ $secret="../picture/secret0.jpg"; $secretname=$oDcl2->SearchName(0); }else if($oDoc->DclID=="1"){ $secret="../picture/secret1.jpg"; $secretname=$oDcl2->SearchName(1); }else if($oDoc->DclID=="2"){ $secret="../picture/secret2.jpg"; $secretname=$oDcl2->SearchName(2); }else if($oDoc->DclID=="3"){ $secret="../picture/secret3.jpg"; $secretname=$oDcl2->SearchName(3); }else if($oDoc->DclID=="4"){ $secret="../picture/secret4.jpg"; $secretname=$oDcl2->SearchName(4); }else{ $secret="../picture/blank.gif"; $secretname=""; }?> <td align="center"><img src="<? echo $secret; ?>" title="<? echo $secretname; ?>" border="0" ></td> </tr> <? $i++; } } ?> </table> <table width="99%" align="center" border=0 cellpadding="0" cellspacing="0" bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_13'];?>" height="22"> <? if($i=="0"){?> <tr height=22><td align="center" bgcolor="#FFFFFF"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** äÁèÁÕÃÒ¡ÒÃ˹ѧÊ×Íà¢éÒ **</font></td></tr> <? } ?> <tr height=22><td align="right"> </td></tr> </table> <br> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <tr height=27 bgcolor="#FFFFFF" ><td align="left" > <? $showheader="ÃÒ¡ÒÃ˹ѧÊ×Íà¢éÒ·ÕèäÁèµéͧ¡ÒÃŧ·ÐàºÕ¹ÃѺ"; ?> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong> <a id="openshow" <? if($flagshow=="1"){ ?>style="display:none; cursor:pointer" <? }else{ ?> style="display:''; cursor:pointer"<? }?> onclick="up_downList('<? if($flagshow=="1"){ echo "up"; }else{ echo "up"; }?>')"><img src="../picture/downshow.gif" title="áÊ´§" border="0" > <U><? echo "áÊ´§".$showheader; ?></U></a> <a id="closeshow" <? if($flagshow=="1"){ ?>style="display:''; cursor:pointer" <? }else{ ?>style="display:none; cursor:pointer" <? }?> title="«è͹" onclick="up_downList('<? if($flagshow=="1"){ echo "down"; }else{ echo "down"; }?>')"><img src="../picture/downshow.gif" title="«è͹" border="0" > <U><? echo "«è͹".$showheader; ?></U></a> </strong></font> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" id="showtable" <? if($flagshow=="1"){ ?>style="display:''; border-collapse:collapse" <? }else{ ?>style="display:none; border-collapse:collapse" <? }?> background="<? if($DtID=="6" || $DtID=="7" || $DtID=="9"){ echo "../picture/table_header_bg2.gif"; }else{ echo "../picture/table_header_bg.gif"; }?>"> <? $flagshow=1;?> <tr height=22> <td width="11%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">·Õè</font></td> <td width="15%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">¨Ò¡/·ÕèÁÒ (µé¹àÃ×èͧ)</font></td> <td width="23%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">àÃ×èͧ</font></td> <td width="14%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">Çѹ·Õèä´éÃѺ˹ѧÊ×Í</font></td> <td width="31%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">Çѹ·ÕèàʹÍ˹ѧÊ×Í</font></td> <td width="3%" align="center"> </td> </tr> <? //--------------------------------find count $numrow=0; if($RsID=="5" || $RsID=="2"){ if($oDlp->DlpID=="1"){ $oDoc4->SearchByDocGroupDsID1($MaxDocGroup,$RsID,$DtID); }else{ $oDoc4->SearchByDlcIDDocGroupDsID1DlcPS2($DLCID,$MaxDocGroup,$DlcPS2,$RsID,$DtID); } }else{ $oDoc4->SearchByDlcIDDocGroupDsID1DlcPS2($DLCID,$MaxDocGroup,$DlcPS2,$RsID,$DtID); } while($oDoc4->GetRecord()){ $numrow++; } $numRow = $numrow; //echo "===========".$numRow; $page_size = 10; $total_page = (int)($numRow/$page_size); if(($numRow%$page_size) != 0) $total_page++;
if(isset($page_id)) $start = $page_size*($page_id-1); else { $page_id = 1; $start = 0; } //------------------------------- if($RsID=="5" || $RsID=="2"){ if($oDlp->DlpID=="1"){ $oDoc3->SearchByDocGroupDsID1Limit($MaxDocGroup, $start, $page_size,$RsID,$DtID); }else{ $oDoc3->SearchByDlcIDDocGroupDsID1DlcPS2Limit($DLCID,$MaxDocGroup,$DlcPS2, $start, $page_size,$RsID,$DtID); } }else{ $oDoc3->SearchByDlcIDDocGroupDsID1DlcPS2Limit($DLCID,$MaxDocGroup,$DlcPS2, $start, $page_size,$RsID,$DtID); } $z=0; while($oDoc3->GetRecord()){ $oDoc5->SearchByKey($oDoc3->DocID); $oDoc5->GetRecord(); $oRs4->SearchByDocIDStatus1($oDoc5->DocID); $oRs4->GetRecord(); if(($z%2) == 0) echo "<tr bgcolor=\"#FFFFFF\" height=22 >"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\" height=22>"; ?> <td > <? echo $oDoc5->DocNo; ?></td> <td align="center"><?php if($oDoc5->DocDate =="0000-00-00"){ echo ""; }else{ echo abbreDate(splitDateDb2($oDoc5->DocDate ,'/')); }?></td> <td > <a href="showDetailRegisSignDoc.php?DocID=<?php echo $oDoc5->DocID;?>&RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>&DrsID=<? echo $oRs4->DrsID; ?>&flagshow=<? echo $flagshow; ?>"><? echo $oDoc5->DocSubject; ?></a> <? if($RsID=="3"){ $oRs6->SearchByKey($oRs4->DrsFromDrsID); $oRs6->GetRecord(); $oDlc5->SearchByKey($oRs6->DrsDlcIDCreate); $oDlc5->GetRecord(); $oDP5->SearchByKey($oDlc5->deptId); $oDP5->GetRecord(); echo " <font color=\"#015181\"><storng>(¨Ò¡$oDP5->deptName)</strong></font>"; } ?> <? if($oDlp->DlpPID!="0"){ if($DLCID==$oDoc5->DlcID){ echo " <font color=\"#029b0a\"><storng>[ÃÑ¡ÉÒ¡ÒÃ]</strong></font>"; }} ?> <? if($oDlp->DlpPID=="0"){ if($DlcPS2==$oDoc5->DlcID){ echo " <font color=\"#029b0a\"><storng>[ÃÑ¡ÉÒ¡ÒÃ]</strong></font>"; }} ?> <? if($oDoc5->endDoc=="Y"){ echo "<font color=\"#FF0000\"><storng>[ÂصÔ˹ѧÊ×Í]</strong></font>"; } ?> <? if(($oDoc5->DlcID!=$DLCID) && ($oDoc5->DlcID!=$DlcPS2)){ $oDlc4->SearchByKey($oDoc5->DlcID); $oDlc4->GetRecord(); $oDP4->SearchByKey($oDlc4->deptId); $oDP4->GetRecord(); echo " <storng>(¨Ò¡$oDP4->deptName)</strong>"; } ?> </td> <td align="center"> <? list($DocD,$DocT) = split(' ',$oDoc5->DocDateCreate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); ?></td> <td align="center"> <? $oRs3->SearchByDocIDStatus1($oDoc5->DocID); if($oRs3->GetRecord()==1){ if($oRs3->DrsByPass=="Y"){ echo "Ê觼èÒ¹"; }else{ $oRs5->SearchByDrsFromDrsID($oRs3->DrsID); if($oRs5->GetRecord()=="1"){ list($DocD,$DocT) = split(' ',$oRs5->DrsReceiveDate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); }else{ echo " "; } } } ?></td> <td width="3%" align="center"><? if($oRs4->DrsflagRead=="N"){ ?><a href="processEntryDoc.php?DrsID=<?php echo $oRs4->DrsID;?>&RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>&flagshow=<? echo $flagshow; ?>&method=setFlagread3" onClick='return checkShow()'> <img src="../picture/importdoc.gif" title="µéͧ¡ÒÃáÊ´§Ë¹Ñ§Ê×Í·ÕèÍèÒ¹áÅéÇ" border="0" style="cursor:pointer;"></a><? }else{ echo " "; } ?></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">** äÁèÁÕ<? if(($RsID=="2" && ($DtID=="1" || $DtID=="2"))){ echo "ÃÒ¡ÒÃ˹ѧÊ×Í·Õèŧ·ÐàºÕ¹Êè§"; }else if($RsID=="5"){ echo "ÃÒ¡ÒÃ˹ѧÊ×Í·Õèŧ·ÐàºÕ¹¤ØÁ"; }else{ echo "ÃÒ¡ÒÃ˹ѧÊ×Í·Õèŧ·ÐàºÕ¹ àʹÍ˹ѧÊ×Í"; } ?> **</font></td></tr> <? } ?> <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="regisDoc.php?page_id=<?php echo $num;?>&RsID=<?php echo $RsID;?>&DtID=<?php echo $DtID;?>&flagshow=<? echo $flagshow; ?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";}?></a> <?php } } ?> </td></tr> </table> </td></tr> </table><br><input type="hidden" name="flagshow" value="<? echo $flagshow; ?>"> </form> </fieldset> <table width="99%" border="0" align="center"> <tr> <td width="134" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> <strong>ËÁÒÂà赯 : </strong> </font></td> <td width="1070" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">¤ÅÔ¡·ÕèàÃ×èͧ˹ѧÊ×Íà¾×èÍŧÃѺ˹ѧÊ×Í</font></td> </tr> <tr> <td width="134" align="left"> </td> <td colspan="2" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">ªÑ鹤ÇÒÁàÃçÇ <? $oDsl->RSDocSpeedLevel(); $r=0; while($oDsl->GetRecord()){ if($oDsl->DslID=="0"){ $picsp="../picture/rapid0.jpg"; }else if($oDsl->DslID=="1"){ $picsp="../picture/rapid1.jpg"; }else if($oDsl->DslID=="2"){ $picsp="../picture/rapid2.jpg"; }else if($oDsl->DslID=="3"){ $picsp="../picture/rapid3.jpg"; } else if($oDsl->DslID=="4"){ $picsp="../picture/rapid4.jpg"; } ?> <img src="<? echo $picsp; ?>" border="0" > <? echo " ".$oDsl->DslName." "; $r++; }?> </font></td> </tr> <tr> <td width="134"> </td> <td colspan="2" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">ªÑ鹤ÇÒÁÅѺ <? $oDcl->RSDocSecretLevel(); $r=0; while($oDcl->GetRecord()){ if($oDcl->DclID=="0"){ $piccl="../picture/secret0.jpg"; }else if($oDcl->DclID=="1"){ $piccl="../picture/secret1.jpg"; }else if($oDcl->DclID=="2"){ $piccl="../picture/secret2.jpg"; }else if($oDcl->DclID=="3"){ $piccl="../picture/secret3.jpg"; } else if($oDcl->DclID=="4"){ $piccl="../picture/secret4.jpg"; } ?><img src="<? echo $piccl; ?>" border="0" > <? echo " ".$oDcl->DclName." "; $r++; }?> </font></td> </tr> </table> </td> </tr> </table> </body> </html> <? }else{ include_once "unselectposition.php"; } ?> <script language="javascript"> function showDoc(){ document.ff.submit(); } </script>
|