Viewing file: entryDoc.php (31.16 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 "funct.php";
include_once "../class/clsDocInbox.php";
include_once "../link/keyThai.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$time_startpage = microtime_float();
$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);
$oRSt = new receiveSendType($oC);
$oDt = new doctype($oC);
$oDtmp = new DocattatchesTmp($oC);
$oDoc = new Documents($oC);
$oDoc1 = new Documents($oC);
$oDoc2 = 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);
$oRs2 = new DocReceiveSend($oC);
$oRs3 = new DocReceiveSend($oC);
$oRs4 = new DocReceiveSend($oC);
$oRs5 = new DocReceiveSend($oC);
$oRs6 = new DocReceiveSend($oC);
$oDbx = new DocInbox($oC);
$oDbx1 = new DocInbox($oC);
$oDbx2 = new DocInbox($oC);
$oDbx3 = new DocInbox($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();
$InputThai=$oSys->SearchByInputThai();
$personId=$oU->userPsCode;
if($searchName!=""){
$flagshow=1;
}
$oDbx2->SearchBypersonIdNoDelFolderlimit($personId);
$oDbx2->GetRecord();
$docshow=$oDbx2->DocInboxID;
$docnameshow=$oDbx2->InboxName;
?>
<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="entryDoc.php">˹ѧÊ×Íà¢éÒ</a>
</font></legend>
<form name="gg" METHOD="POST" action="processEntryDoc.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>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#DADADA" style="border-collapse:collapse">
<tr height=22 valign="middle" >
<td width="83%" align="right" valign="middle"><img src="../picture/folder_open.gif" title="ÂéÒÂä»·Õè" border="0">
<select name="selectdo" id="selectdo" onChange='return selectMethod();'>
<option value="0" <? if($selectdo=="" || $selectdo=="0"){ echo "selected"; }?>>ÂéÒÂä»·Õè</option>
<? $oDbx->SearchBypersonIdNoDelFolder($personId);
while($oDbx->GetRecord()){?>
<option value="<? echo $oDbx->DocInboxID;?>"><? echo $oDbx->InboxName; ?></option>
<? } ?>
<!--<option value="del">ź</option>-->
</select>
</td>
<td width="17%" align="center" valign="middle">
<a href="manageFolder.php" style="cursor:pointer;"><img src="../picture/folder.gif" title="¨Ñ´¡ÒÃâ¿Åà´ÍÃì" border="0" style="cursor:pointer;"> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">¨Ñ´¡ÒÃâ¿Åà´ÍÃì</font></a>
</td>
</tr>
<tr><td colspan="2"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>
ÃÒ¡ÒÃ˹ѧÊ×Íà¢éÒ·ÕèÂѧäÁèä´éÍèÒ¹ áÅÐ˹ѧÊ×Í·ÕèÍèÒ¹áÅéÇ</strong></font></td></tr>
</table>
<table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
<tr height=22>
<td width="13%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>·Õè</strong></font></td>
<td width="14%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>¨Ò¡/·ÕèÁÒ (µé¹àÃ×èͧ)</strong></font></td>
<td width="20%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>àÃ×èͧ/ÇèÒ´éÇ (ª¹Ô´Ë¹Ñ§Ê×Í)</strong></font></td>
<td width="9%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>Çѹ·Õèä´éÃѺ˹ѧÊ×Í</strong></font></td>
<td width="2%" align="center" background="../picture/table_header_bg.gif"><img src="../picture/rapid0.jpg" border="0" ></td>
<td width="2%" align="center" background="../picture/table_header_bg.gif"><img src="../picture/secret0.jpg" border="0" ></td>
<td width="2%" align="center" background="../picture/table_header_bg.gif"><img src="../picture/folder_open2.gif" title="ÂéÒÂä»·Õè" border="0"></td>
</tr>
<?
$numrow=0;
$i=0;
$oRs2->SearchCountBypersonIdDrsDelete($personId);
while($oRs2->GetRecord()){
$oDoc2->SearchDtID($oRs2->DocID);
$oDoc2->GetRecord();
if($oDoc2->DtID==$DtID || $DtID=="" || $DtID=="0"){
$numrow++;
}
}
$numRow = $numrow;
$i=0;
if($numRow!=0){
/*
$total_page = (int)($numRow/$GLOBALS['PAGE_SIZE']);
if(($numRow%$GLOBALS['PAGE_SIZE']) != 0)
$total_page++;
if($page_id>$total_page){ $page_id = 1; $start = 0; }
if($page_id==""){ $page_id=1; $start = 0;}
if(isset($page_id) && $page_id <= $total_page)
$start = $GLOBALS['PAGE_SIZE']*($page_id-1);
if($start<=0){
$start = 0;
}
else {
$page_id = 1;
$start = 0;
}
*/
$total_page = (int)($numRow/$GLOBALS['PAGE_SIZE']);
if(($numRow%$GLOBALS['PAGE_SIZE']) != 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 = $GLOBALS['PAGE_SIZE']*($page_id-1);
else {
$page_id = 1;
$start = 0;
}
?>
<? //-------------------------other doc------------------------------------------------------------------------------------
$oRs->SearchBypersonIdDrsDeleteLimit($personId, $start,$GLOBALS['PAGE_SIZE']);
while($oRs->GetRecord()){
$checkDocAttunread=0;
$oDoc->SearchByKey($oRs->DocID); $oDoc->GetRecord();
if($oDoc->DtID==$DtID || $DtID=="" || $DtID=="0"){
if(($i%2) == 0)
echo "<tr bgcolor=\"#FFFFFF\" height=22 >";
else
echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\" height=22 align=\"left\">";
?>
<td> <? echo $oDoc->DocNo; ?></td>
<td align="left">
<?
if($oDoc->DtID=="1" || $oDoc->DtID=="2" || $oDoc->DtID=="14"){
echo " ".$oDoc->DocFrom."<br>";
}else{
if($oDoc->DocPID=="0"){
$oDlc2->SearchByKey($oDoc->DlcID); $oDlc2->GetRecord();
$oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord();
echo " ".$oDoc->DocFrom."<br>";
echo " (".$oDlp->DlpName.")";
$countdoc=checkCountDoc($oDoc->DocID);
}else{
$oDoc4->SearchByKey($oDoc->DocPID); $oDoc4->GetRecord();
$oDlc2->SearchByKey($oDoc4->DlcID); $oDlc2->GetRecord();
$oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord();
echo " ".$oDoc->DocFrom."<br>";
echo " (".$oDlp->DlpName.")";
$countdoc=checkCountDoc($oDoc->DocPID);
}
}
?>
</td>
<td align="left"> <? echo showeDoc($oDoc->eDoc); ?> <? if($oRs->DsID=="0"){ ?><img src="../picture/unread_0.gif" title="˹ѧÊ×Í·ÕèÂѧäÁèä´éà»Ô´" border="0"><? }else if($oRs->DsID=="4" && $countdoc!="0"){ ?> <img src="../picture/unreadattachfile1.gif" title="ÂѧäÁèä´éÍèÒ¹á¿éÁ˹ѧÊ×Í" border="0" ><? } ?>
<a href="showEntryDoc.php?DocID=<?php echo $oDoc->DocID;?>&DrsID=<?php echo $oRs->DrsID;?>&page_id=<? echo $page_id; ?>"> <? if($oRs->DsID=="0"){ echo "<font color=\"#F47A00\"><strong>"; } ?><? if($oDoc->DtID=="13"){ echo "ª×èͼÙéä´éÃѺ¡ÒÃÃѺÃͧ<br>".$oDoc->CertificatePs; }else{ echo $oDoc->DocSubject; } ?><? if($oRs->DsID=="0"){ echo "</strong></font>"; } ?></a>
<font color="<?php echo $GLOBALS["COLOR_FONT_5"]; ?>" size="2"><? $oDt->SearchByKey($oDoc->DtID); $oDt->GetRecord(); echo "(".$oDt->DtName.")";?><? if($oRs->DrsSendToPs=="Y"){ echo "<font color=\"#FF0000\"> <storng>[Ê觴èǹ]</strong></font> "; }?></font>
<? if($oRs->DsID=="4" || $oRs->DsID=="5"){ $checkDocAttunread=checkCountfileDocAtt($oRs->DrsReadDoc); if($checkDocAttunread!='' && $checkDocAttunread!=0){ echo "<br> <font color=#990066>(ÁÕá¿éÁ ".a2th($checkDocAttunread)." á¿éÁ·ÕèÂѧäÁèä´éÍèÒ¹)</font>"; } }?>
</td>
<td align="center">
<?
if($oRs->DrsReceiveDate!="0000-00-00 00:00:00"){
list($DocD,$DocT) = preg_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>
<?php
//===================================================================
//== CHAIN ADD 2015/09/14 $count_unread ¹Ñº¨Ó¹Ç¹ä¿Åì·ÕèÂѧäÁèä´éÍèÒ¹ ===============
//===================================================================
$count_unread = substr_count($oRs->DrsReadDoc, '0');
//===================================================================
?>
<td align="center"><?if($oRs->DsID=="7" ||($oRs->DsID=="5" && $oRs->DrsDocReceiveDate!="0000-00-00 00:00:00" && $count_unread==0)){ ?><input name="unread[<? echo $i; ?>]" id="unread" type="checkbox" value="<? echo $oRs->DrsID; ?>"><? }?></td>
</tr>
<? $i++; } }} ?>
</table><input name="unread[-1]" id="unread" type="hidden" value="0">
<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>
<? }else{ ?>
<tr><td colspan="7" align="right"><font color="#000066">àÅ×Í¡·Ñé§ËÁ´</font>
<input type='checkbox' id="ch_all" name='check_DrsID' onClick="if(this.checked)checkAll(); else clearAll()" />
<input type="hidden" id="st_val" name="store_DrsID" style="border:#000000 1px solid" >
</td></tr>
<tr height=22><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="entryDoc.php?page_id=<?php echo $num;?>&DtID=<? echo $DtID; ?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";}?></a>
<?php
}
}
?> </td></tr>
<? } ?>
<tr height=22 bgcolor="#FFFFFF">
<td colspan="7" valign="bottom"><br>
<hr color="#000099"></hr></td>
</tr>
</table><br>
<input type="hidden" name="flagshow" id="flagshow" value="<? echo $flagshow; ?>">
<input type="hidden" name="i" id="i" value="<? echo $i; ?>">
<input type="hidden" name="page_id" id="page_id" value="<? echo $page_id; ?>">
<input type="hidden" name="method" id="method">
</form>
<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" >
<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>áÊ´§ÃÒ¡ÒÃ˹ѧÊ×Íã¹â¿Åà´ÍÃì</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><? $a=1; ?>«è͹ÃÒ¡ÒÃ˹ѧÊ×Íã¹â¿Åà´ÍÃì</U></a>
</strong></font>
<form name="ff" METHOD="POST" action="entryDoc.php">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="showtable2" <? if($flagshow=="1"){ ?>style="display:''; border-collapse:collapse" <? }else{ ?>style="display:none; 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="<? echo a2th($searchName); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchName')"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"> (·Õè)</font> <input name="searchNo" id="searchNo" type="text" size="20" value="<? echo a2th($searchNo); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchNo')">
<input name="searchNamesub" type="submit" value="¤é¹ËÒ"><input name="searchNamesub2" type="button" value="áÊ´§·Ñé§ËÁ´" onClick="return ClearValue('<? echo $idInbox; ?>')"></td></tr>
</table><? //echo "---".$idInbox; ?>
<input type="hidden" name="flagshow" id="flagshow" value="<? echo $flagshow; ?>">
<input type="hidden" name="idInbox" id="idInbox" value="<? echo $idInbox; ?>">
<input type="hidden" name="selectdo2" id="selectdo2" value="<? echo $selectdo2; ?>">
</form>
<form name="hh" METHOD="POST" action="processEntryDoc.php">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" id="showtable3" <? if($flagshow=="1"){ ?>style="display:''; cursor:pointer; border-collapse:collapse" <? }else{ ?>style="display:none; cursor:pointer; border-collapse:collapse" <? }?>>
<tr height=22><td align="right">
<? if($selectdo2=="" || $selectdo2=="del" || $selectdo2=="0"){ $idInbox=$docshow; $idInboxName=$docnameshow; }else{ $idInbox=$selectdo2; $oDbx3->SearchByKey($selectdo2); $oDbx3->GetRecord(); $idInboxName=$oDbx3->InboxName; }
$oldbox=$selectdo2;
?>
<img src="../picture/folder_open.gif" title="ÂéÒÂ/àÅ×Í¡ä»·Õè" border="0">
<select name="selectdo2" id="selectdo2" onChange='return selectMethod2();'>
<option value="0" <? if($selectdo2=="" || $selectdo2=="0"){ echo "selected"; }?>>ÂéÒÂ/àÅ×Í¡ä»·Õè</option>
<? $oDbx1->SearchBypersonIdNoDelFolder($personId);
while($oDbx1->GetRecord()){
if($oDbx1->DocInboxID!=$idInbox){
?>
<option value="<? echo $oDbx1->DocInboxID;?>"><? echo $oDbx1->InboxName; ?></option>
<? } } ?>
<!--<option value="del" >ź</option>-->
</select>
</td>
</tr>
<tr><td><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong> <? echo "â¿Åà´ÍÃì :: ".$idInboxName; ?></strong></font></td></tr>
</table>
<table width="99%" border="0" 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" <? }?> >
<tr height=22>
<td width="14%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>·Õè</strong></font></td>
<td width="16%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>¨Ò¡/·ÕèÁÒ (µé¹àÃ×èͧ)</strong></font></td>
<td width="19%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>àÃ×èͧ/ÇèÒ´éÇ (ª¹Ô´Ë¹Ñ§Ê×Í)</strong></font></td>
<td width="10%" align="center" background="../picture/table_header_bg5.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>Çѹ·Õèä´éÃѺ˹ѧÊ×Í</strong></font></td>
<td width="2%" align="center" background="../picture/table_header_bg5.gif"><img src="../picture/folder_open.gif" title="ÂéÒÂ/àÅ×Í¡ä»·Õè" border="0"></td>
</tr>
<?
//--------------------------------find count
$numrow=0;
$numRow = $oRs4->SearchBypersonIdDrsDelete2DrsInboxIDDrsflagReadsearchNo($personId,th2a($searchName),$idInbox,th2a($searchNo));
$z=0;
if($numRow!=0){
$total_page2 = (int)($numRow/$GLOBALS['PAGE_SIZE']);
if(($numRow%$GLOBALS['PAGE_SIZE']) != 0)
$total_page2++;
if($page_id2!=""){ if($page_id2>$total_page2){ $page_id2 = 1; $start2 = 0; }}else{ $page_id2 = 1; $start2 = 0;}
if(isset($page_id2))
$start2 = $GLOBALS['PAGE_SIZE']*($page_id2-1);
else {
$page_id2 = 1;
$start2 = 0;
}
//-------------------------------
$oRs5->SearchBypersonId2DrsDeleteLimitDrsInboxIDDrsflagReadsearchNo($personId, $start2, $GLOBALS['PAGE_SIZE'],th2a($searchName),$idInbox,th2a($searchNo));
while($oRs5->GetRecord()){
$oDoc3->SearchByKey($oRs5->DocID);
$oDoc3->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%"> <? echo $oDoc3->DocNo; ?></td>
<td width="18%" >
<?
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.")";
$countdoc=checkCountDoc($oDoc3->DocID);
}else{
$oDoc5->SearchByKey($oDoc3->DocPID); $oDoc5->GetRecord();
$oDlc2->SearchByKey($oDoc5->DlcID); $oDlc2->GetRecord();
$oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord();
echo " ".$oDoc3->DocFrom."<br>";
echo " (".$oDlp->DlpName.")";
$countdoc=checkCountDoc($oDoc3->DocPID);
}
}
?>
</td>
<td width="28%"> <? echo showeDoc($oDoc3->eDoc); ?>
<? if(($oRs5->DsID=="4") && $countdoc!="0"){ ?> <img src="../picture/unreadattachfile1.gif" title="ÂѧäÁèä´éÍèÒ¹á¿éÁ˹ѧÊ×Í" border="0"><? } ?>
<? if($a=="1"){ $flagshow="1"; }?>
<a href="showDetailEntryDoc.php?page_id2=<? echo $page_id2;?>&DocID=<?php echo $oDoc3->DocID;?>&DrsID=<? echo $oRs5->DrsID; ?>&flagshow=<? echo $flagshow; ?>&idInbox=<? echo $idInbox; ?>&selectdo2=<? echo $selectdo2; ?>&page_id2=<? echo $page_id2; ?>">
<? if($oDoc3->DtID=="13"){ echo "ª×èͼÙéä´éÃѺ¡ÒÃÃѺÃͧ<br>".$oDoc3->CertificatePs; }else{ echo $oDoc3->DocSubject; } ?>
</a>
<? if($oRs5->DrsSendToPs=="Y"){ echo "<font color=\"#FF0000\"><storng>[Ê觴èǹ]</strong></font> "; }?>
<? if($oRs5->DrsSendBack!=""){ echo "<font color=\"#FF0000\"><storng>(á¨é§Ê觼Դ)</strong></font> "; }?>
<? if($oRs5->DsID=="4" || $oRs5->DsID=="5"){ $checkDocAttunread=checkCountfileDocAtt($oRs5->DrsReadDoc); if($checkDocAttunread!='' && $checkDocAttunread!=0){ echo "<br> <font color=#990066>(ÁÕá¿éÁ ".a2th($checkDocAttunread)." á¿éÁ·ÕèÂѧäÁèä´éÍèÒ¹)</font>"; } }?>
</td>
<td align="center">
<?
if($oRs5->DrsReceiveDate!="0000-00-00 00:00:00"){
list($DocD,$DocT) = preg_split('[ ]',$oRs5->DrsReceiveDate);
echo abbreDate2($DocD,'/')."<br>".a2th($DocT);
}
?>
</td>
<td width="2%" align="center"><? if($oRs5->DrsflagRead=="N"){ ?><input name="unread2[<? echo $z; ?>]" id="unread2[<? echo $z; ?>]" type="checkbox" value="<?php echo $oRs5->DrsID;?>"><? }else{ echo " "; } ?></td>
</tr>
<?
$z++; } } ?>
<? if($z=="0"){ $z2=0; ?>
<tr height=22><td align="center" bgcolor="#FFFFFF" colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** äÁèÁÕÃÒ¡ÒÃ˹ѧÊ×Íã¹â¿Åà´ÍÃì **</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_page2; $num++) {
if($num == $page_id2)
echo a2th($num)." ";
else {
?>
<a href="entryDoc.php?page_id2=<?php echo $num;?>&sh=1&flagshow=<? echo $flagshow; ?>&idInbox=<? echo $idInbox; ?>&selectdo2=<? echo $selectdo2; ?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";}?></a>
<?php
}
}
?> </td></tr>
<? } ?>
</table><input type="hidden" name="flagshow" id="flagshow" value="1">
<input type="hidden" name="z" id="z" value="<? echo $z; ?>">
<input type="hidden" name="searchName" id="searchName" value="<? echo $searchName; ?>">
<input type="hidden" name="searchNo" id="searchNo" value="<? echo $searchNo; ?>">
<input type="hidden" name="method" id="method">
<input type="hidden" name="page_id2" id="page_id2" value="<? echo $page_id2; ?>">
<input type="hidden" name="idInbox" id="idInbox" value="<? echo $oldbox; ?>">
</form>
</td></tr>
</table><br>
</fieldset>
<table width="99%" border="0" align="center">
<tr>
<td width="126" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> <strong>ËÁÒÂà˵Ø
: </strong> </font></td>
<td width="702" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"><img src="../picture/unread_0.gif" border="0" >ËÁÒ¶֧˹ѧÊ×Í·ÕèÂѧäÁèä´éà»Ô´ÍèÒ¹
<img src="../picture/unreadattachfile1.gif" title="ÂѧäÁèä´éÍèÒ¹á¿éÁ˹ѧÊ×Í" border="0"> ËÁÒ¶֧ÂѧäÁèä´éÍèÒ¹á¿éÁ˹ѧÊ×Í</font></td>
</tr>
<tr>
<td width="126" 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="126"> </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>
<tr>
<td width="134"> </td>
<td colspan="2" align="left"><img src="../picture/eDoc.gif" title="˹ѧÊ×ÍÃѺÍÔàÅç¡·Ã͹ԡÊì" > <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">ËÁÒ¶֧˹ѧÊ×ÍÃѺÍÔàÅç¡·Ã͹ԡÊì¨Ò¡Ë¹èǧҹÀÒ¹͡</font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<?
$time_endpage = microtime_float();
echo '<div align=right><font color=#AAAAAA>'.$time = $time_endpage - $time_startpage;
echo ' s</font></div>';
?>
<script language="javascript">
function up_downList(status){
var mybrowser=navigator.userAgent;
if(status=='up'){
if(mybrowser.indexOf('MSIE')>0){
closeshow.style.display='';
openshow.style.display='none';
showtable.style.display='';
showtable2.style.display='';
showtable3.style.display='';
}else{
document.getElementById( 'closeshow' ).setAttribute( 'style', 'display:' );
document.getElementById( 'openshow' ).setAttribute( 'style', 'display:none' );
document.getElementById( 'showtable' ).setAttribute( 'style', 'display:' );
document.getElementById( 'showtable2' ).setAttribute( 'style', 'display:' );
document.getElementById( 'showtable3' ).setAttribute( 'style', 'display:' );
}
}else{
if(mybrowser.indexOf('MSIE')>0){
openshow.style.display='';
closeshow.style.display='none';
showtable.style.display='none';
showtable2.style.display='none';
showtable3.style.display='none';
}else{
document.getElementById( 'openshow' ).setAttribute( 'style', 'display:' );
document.getElementById( 'closeshow' ).setAttribute( 'style', 'display:none' );
document.getElementById( 'showtable' ).setAttribute( 'style', 'display:none' );
document.getElementById( 'showtable2' ).setAttribute( 'style', 'display:none' );
document.getElementById( 'showtable3' ).setAttribute( 'style', 'display:none' );
}
}
}
function ClearValue(p){
document.ff.searchName.value="";
document.ff.searchNo.value="";
document.ff.idInbox.value=p;
document.ff.submit();
}
function selectMethod(){
if(document.getElementById('selectdo').value=="0"){
document.gg.selectdo.value="0"
}else if(document.getElementById('selectdo').value=="del"){
var c = 0;
for (var i=0; i<document.gg.length; i++)
{
if(document.gg.elements[i].type == 'checkbox')
{
if(document.gg.elements[i].checked)
c = c+1;
}
}
if(c==0)
{
alert('àÅ×Í¡ÍÂèÒ§¹éÍÂ˹Öè§ÃÒ¡ÒÃà¾×èÍ·Ó¡ÒÃź˹ѧÊ×Í');
document.gg.selectdo.value="0";
return false ;
}
var agree=confirm("¤Ø³µéͧ¡ÒèÐź˹ѧÊ×͹Õéá¹è¹Í¹ãªèËÃ×ÍäÁè ?");
if (agree){
document.gg.method.value="deldoc";
document.gg.submit();
return true;
}else{
document.gg.selectdo.value="0";
return false ;
}
}else if((document.getElementById('selectdo').value!="0") && (document.getElementById('selectdo').value!="del")){
var c = 0;
for (var i=0; i<document.gg.length; i++)
{
if(document.gg.elements[i].type == 'checkbox')
{
if(document.gg.elements[i].checked)
c = c+1;
}
}
if(c==0)
{
alert('àÅ×Í¡ÍÂèÒ§¹éÍÂ˹Öè§ÃÒ¡ÒÃà¾×èÍ·Ó¡ÒÃÂéÒ·Õèà¡çºË¹Ñ§Ê×Í');
document.gg.selectdo.value="0";
return false ;
}
var agree=confirm("¤Ø³µéͧ¡ÒèÐÂéÒÂ˹ѧÊ×͹Õé\nà¡çºã¹â¿Åà´ÍÃì·Õèµéͧ¡ÒÃ\ná¹è¹Í¹ãªèËÃ×ÍäÁè ?");
if (agree){
document.gg.method.value="setDrsInboxID";
document.gg.submit();
return true;
}else{
document.gg.selectdo.value="0";
return false ;
}
}
}
function selectMethod2(){
if(document.getElementById('selectdo2').value=="0"){
document.hh.selectdo2.value="0"
}else if(document.getElementById('selectdo2').value=="del"){
var c = 0;
for (var i=0; i<document.hh.length; i++)
{
if(document.hh.elements[i].type == 'checkbox')
{
if(document.hh.elements[i].checked)
c = c+1;
}
}
if(c==0)
{
alert('àÅ×Í¡ÍÂèÒ§¹éÍÂ˹Öè§ÃÒ¡ÒÃà¾×èÍ·Ó¡ÒÃź˹ѧÊ×Í');
document.hh.selectdo2.value="0";
return false ;
}
var agree=confirm("¤Ø³µéͧ¡ÒèÐź˹ѧÊ×͹Õéá¹è¹Í¹ãªèËÃ×ÍäÁè ?");
if (agree){
document.hh.method.value="deldoc2";
document.hh.submit();
return true;
}else{
document.hh.selectdo2.value="0";
return false ;
}
}else if((document.getElementById('selectdo2').value!="0") && (document.getElementById('selectdo2').value!="del")){
var c = 0;
for (var i=0; i<document.hh.length; i++)
{
if(document.hh.elements[i].type == 'checkbox')
{
if(document.hh.elements[i].checked)
c = c+1;
}
}
if(c==0)
{
document.hh.method.value="showdoc";
document.hh.submit();
return true;
}
var agree=confirm("¤Ø³µéͧ¡ÒèÐÂéÒÂ˹ѧÊ×͹Õé\nà¡çºã¹â¿Åà´ÍÃì·Õèµéͧ¡ÒÃ\ná¹è¹Í¹ãªèËÃ×ÍäÁè ?");
if (agree){
document.hh.method.value="setDrsInboxID2";
document.hh.submit();
return true;
}else{
document.hh.selectdo2.value="0";
return false ;
}
}
}
function checkAll()
{
var unread_len = document.gg.unread.length;
for ( i = 0; i<unread_len ; i++)
{
document.gg.unread[i].checked=true;
}
}
function clearAll()
{
var unread_len = document.gg.unread.length;
for ( i = 0; i<unread_len ; i++)
{
document.gg.unread[i].checked=false;
}
}
</script>
|