Viewing file: receiveDoc.php (37.9 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 "../link/keyThai.php";
include_once "../class/clsDocInboxStaff.php";
include_once "../class/clsDocForSign.php";
//new edit Chain
include_once "../class/clsCollegeDetail.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);
$oDlc3 = new DocLineConfig($oC);
$oDlc4 = new DocLineConfig($oC);
$oDlc5 = 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);
$oDoc7 = 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);
$oDbxS = new DocInboxStaff($oC);
$oDbxS1 = new DocInboxStaff($oC);
$oDbxS3 = new DocInboxStaff($oC);
$oDbxS2 = new DocInboxStaff($oC);
$oDfs = new DocForSign($oC);
//new edit na
$oCllg = new collegedetail($oC);
$oCllg2 = new collegedetail($oC);// edit Chain
$MaxDocGroup=$oDP->SearchMaxDocGroup();
$InputThai=$oSys->SearchByInputThai();
if($_SESSION['DLCID'] && $_SESSION['one_position']!="1"){ include_once "selectposition.php";
$oDlc->SearchByKey($_SESSION['DLCID']); $oDlc->GetRecord();
if($_SESSION['DLCIDSECOND']=="Y"){
$oDlc5->SearchByKey($_SESSION['DLCIDSECONDID']); $oDlc5->GetRecord();
$mypersonId=$oDlc5->personId;
}else{
$mypersonId=$oDlc->personId;
}
$oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord();
$deptcenter=checkSarabunMain($oDlc->DlpID); //$deptcenter=1
$DlcPS2=$oDlc2->SearchDlc2($oDlc->DlcSeq,$oDlp1->DlpPID,$oDlc->deptId);
$useReceiveAll=$oSys->SearchuseReceiveAll();
if($oDlp1->GsarabunHead=="Y" || $oDlp1->GheadDept=="Y" || $oDlp1->Gboss=="Y" || $oDlp1->Gboss2=="Y"){
if($oDlp1->DlpPID=="0"){ $a=2; $b=1; }else{ $a=3; $b=2; }
$DlcSeq=$oDlc->DlcSeq-$a;
$DlcSeq2=$oDlc->DlcSeq-$b;
$oDlc3->SearchByNextDlcID($DlcSeq,$oDlc->docGroup,$oDlc->deptId); $oDlc3->GetRecord(); $searchDLCID=$oDlc3->DlcID;
$oDlc4->SearchByNextDlcID($DlcSeq2,$oDlc->docGroup,$oDlc->deptId); $oDlc4->GetRecord(); $searchDlcPS2=$oDlc4->DlcID;
$pageHead=1;
$showmsgmenu="˹ѧÊ×Íà¢éÒ/ŧÃѺ (¡ÒÃŧÃѺ˹ѧÊ×Íà¢éÒá·¹à¨éÒ˹éÒ·ÕèÊÒúÃó)";
}else{
$searchDLCID=$DLCID;
$searchDlcPS2=$DlcPS2;
$showmsgmenu="˹ѧÊ×Íà¢éÒ/ŧÃѺ";
}
?>
<html>
<head>
<script language="javascript" src="../source/calendarDateInput.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<script src="getinfo.js"></script>
</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"><?=$showmsgmenu;?></a>
</font></legend>
<!--<form name="gg" METHOD="POST" action="processReceiveDocAll.php" onSubmit="return validate()">-->
<form name="gg" METHOD="POST" action="processReceiveDocAll.php">
<table align="center" width="98%">
<tr>
<td width="73%" height="25"><img src="../picture/official_letter.gif" border="0" >
<font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="3"><strong><?=$showmsgmenu;?></strong></font> </td>
<td width="21%" align="right"> </td>
<td width="6%" align="right" > </td>
</tr>
<tr>
<td colspan="3"><hr color="#000099"></hr></td>
</tr>
<tr><td colspan="3" align="right">
<strong>¤é¹ËÒ˹ѧÊ×Í</strong> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(àÃ×èͧ/ÇèÒ´éÇÂ) <input name="searchNamePre" id="searchNamePre" type="text" size="25" value="<?=a2th($searchNamePre); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<?=$InputThai; ?>','searchNamePre')"> (·Õè)</font> <input name="searchNoPre" id="searchNoPre" type="text" size="20" value="<?=a2th($searchNoPre); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<?=$InputThai; ?>','searchNoPre')"><br><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">¨Ò¡/·ÕèÁÒ (µé¹àÃ×èͧ)</font> <input name="searchDeptPre" id="searchDeptPre" type="text" size="25" value="<?=a2th($searchDeptPre); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<?=$InputThai; ?>','searchDeptPre')">
</td>
</tr>
<tr valign="middle"><td align="right" valign="middle"><input name="selectpredocdate" id="selectpredocdate" type="checkbox" value="1" onClick="checkcheckbox(1);" <? if($selectpredocdatevalue=="1"){ echo "checked"; }?>> <input name="selectpredocdatevalue" id="selectpredocdatevalue" type="hidden" value=<?=$selectpredocdatevalue; ?>><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">ŧÇѹ·Õè</font></td><td><? if($searchpredocdate=="" || $selectpredocdatevalue!="1"){ ?><script>DateInput('searchpredocdate', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script><? }else{ ?><script>DateInput('searchpredocdate', true, 'DD/MM/YYYY','<?php echo splitDateDb($searchpredocdate,"/");?>');</script><? } ?></td></tr>
<!-- 23/01/2015 Chain -->
<tr>
<td colspan="2" align="right">
<b>áÊ´§¢éÍÁÙÅ˹ѧÊ×ÍÃѺ¨Ò¡</b>
<select name="college" id="college">
<option value="all"<? if($college==""){ echo "selected"; } ?>>áÊ´§·Ñé§ËÁ´</option>
<?php $oCllg->RScollegedetail(); $oCllg->GetRecord();
while($oCllg->GetRecord()){
?>
<option value="<?=$oCllg->collegeAbbr; ?>" <? if($college==$oCllg->collegeAbbr){ echo "selected"; }?>><?=$oCllg->collegeAbbr; ?></option>
<? } ?>
</select>
</td>
<!-- End -->
<td><input name="searchNamesubPre" id="searchNamesubPre"type="button" value="¤é¹ËÒ" onClick="ShowInfoPreReceive('<?php echo $searchDLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $searchDlcPS2; ?>')"></td></tr>
</table>
<div id="showselectPre"> <!-- ajax showSelectDocPreReceive.php-->
<table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" >
<tr height=22>
<td width="10%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>·Õè ŧÇѹ·Õè</strong></font></td>
<td width="15%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>¨Ò¡/·ÕèÁÒ (µé¹àÃ×èͧ)</strong></font></td>
<td <? if($useReceiveAll=="Y"){ ?>width="21%"<? }else{ ?>width="23%" <? }?> 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>
<? if($useReceiveAll=="Y" && $pageHead!=1){ ?><td width="2%" background="../picture/table_header_bg.gif"> </td><? } ?>
</tr>
<?
//echo 'DLCID='.$searchDLCID.' DlcPS2='.$searchDlcPS2;
$numRow2=$oDoc7->SearchCountDocReceive2($searchDLCID,$MaxDocGroup,$searchDlcPS2,th2a($searchNamePre),th2a($searchNoPre),$searchpredocdate,$selectpredocdatevalue,th2a($searchDeptPre));
$i=0;
if($numRow2!=0){
$total_page2 = (int)($numRow2/$GLOBALS['PAGE_SIZE']);
if(($numRow2%$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;
}
if($s==""){ $s="1"; }
$oDoc->SearchByDlcIDDocGroupPSDlcID2DsID0DrsSendDatelimit($searchDLCID,$MaxDocGroup,$searchDlcPS2,$start2,$GLOBALS['PAGE_SIZE'],th2a($searchNamePre),th2a($searchNoPre),$searchpredocdate,$selectpredocdatevalue,th2a($searchDeptPre),$college);
while($oDoc->GetRecord()){
$countdocedit=0;
if($oDoc->DtID=="15"){
$countdocedit=$oDfs->SearchDocforsignEdit($searchDLCID,$searchDlcPS2,$MaxDocGroup,$oDoc->DocID);
}
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"> <? if($oDoc->DtID!=15){ echo $oDoc->DocNo; }else{ echo '-'; } ?><br> <?=abbreDate2($oDoc->DocDate,'/'); ?></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();
}else{
$oDoc5->SearchByKey($oDoc->DocPID); $oDoc5->GetRecord();
$oDlc2->SearchByKey($oDoc5->DlcID); $oDlc2->GetRecord();
$oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord();
}
echo " ".$oDoc->DocFrom."<br>";
echo " (".$oDlp->DlpName.")";
}
?>
</td>
<td align="left"> <?=showeDoc($oDoc->eDoc); ?><a href="showReceiveDoc.php?page_id2=<?php echo $page_id2;?>&DtID=<?=$oDoc->DtID;?>&RsID=<?=$oDoc->RsID; ?>&DocID=<?php echo $oDoc->DocID;?>&DrsID=<?=$oDoc->DrsID; ?>&searchpredocdate=<?=$searchpredocdate;?>&selectpredocdatevalue=<?=$selectpredocdatevalue;?>&searchNamePre=<?=$searchNamePre;?>&searchNoPre=<?=$searchNoPre;?>&searchDeptPre=<?=$searchDeptPre;?>"><? if($oDoc->DtID=="13"){ echo "ª×èͼÙéä´éÃѺ¡ÒÃÃѺÃͧ<br>".$oDoc->CertificatePs; }else{ echo $oDoc->DocSubject; } ?><? if($countdocedit>0){ echo " <font color=#990099>(ÃͼÙéÊè§á¡é䢢éÍÁÙÅ)</font>"; }?></a></td>
<td align="center">
<?
list($DocD,$DocT) = preg_split('[ ]',$oDoc->DrsReceiveDate );
echo abbreDate2($DocD,'/')."<br>".a2th($DocT);
?>
</td>
<td align="center"><?=searchPicDocSpeedLevel($oDoc->DslID); ?></td>
<td align="center"><?=searchPicDocSecretLevel($oDoc->DclID); ?></td>
<? if($useReceiveAll=="Y" && $pageHead!='1'){ ?><td align="center"><input type='checkbox' name='check_DrsID' onclick='test()' value='<?php echo $oDoc->DrsID; ?>' />
</td><? } ?>
</tr>
<? $i++; }
} // if($numRow!=0)?>
</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" colspan="11"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** äÁèÁÕÃÒ¡ÒÃ˹ѧÊ×Íà¢éÒ **</font></td></tr>
<tr height=22 bgcolor="#DADADA"><td align="right" colspan="11"> </td></tr>
<? }else{
if($useReceiveAll=="Y" && $pageHead!='1'){
?>
<tr>
<td align="right" colspan="8" bgcolor="#D2D2D2"> <font color="#000066">àÅ×Í¡·Ñé§ËÁ´</font>
<input type='checkbox' id="ch_all" name='check_DrsID' onClick="if(this.checked)checkAll(); else clearAll()" /> <br>
<input type="hidden" id="st_val" name="store_DrsID" style="border:#000000 1px solid" >
<span style="padding-left:180px">
<input type="button" value=" äÁèŧ·ÐàºÕ¹ÃѺ" onclick="return validate('NoacceptAll')" ></span>
<input type="button" value=" ŧ·ÐàºÕ¹ÃѺ" onclick="return validate('acceptAll')"></span>
<input type="hidden" name="method" id="method">
</td></tr>
<? } ?>
<tr height=22 bgcolor="#DADADA"><td align="right" colspan="11"><strong>˹éÒ-></strong>
<?php
for ($num=1; $num<=$total_page2; $num++) {
if($num == $page_id2){
echo a2th($num)." ";
}else {
?>
<a href="receiveDoc.php?page_id2=<?php echo $num;?>&searchpredocdate=<?=$searchpredocdate;?>&selectpredocdatevalue=<?=$selectpredocdatevalue;?>&searchpredocdate=<?=$searchpredocdate; ?>&searchNamePre=<?=$searchNamePre;?>&searchNoPre=<?=$searchNoPre;?>&searchDeptPre=<?=$searchDeptPre;?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";} ?></a>
<?php
}
}
?> </td></tr>
<? } ?>
<tr height=22 bgcolor="#FFFFFF" >
<td colspan="11" valign="bottom"><br><hr color="#000099"></hr></td>
</tr>
</table>
</div><input type="hidden" name="pgajax" id="pgajax" value="<?=$GLOBALS['PAGE_SIZE']; ?>">
<input type="hidden" name="DlcIDlogin" id="DlcIDlogin" value="<?=$DLCID; ?>">
<input type="hidden" name="personId" id="personId" value="<?=$mypersonId; ?>">
<input type="hidden" name="page_id2" id="page_id2" value="<?=$page_id2; ?>">
</form>
<form name="ff" METHOD="POST" action="receiveDoc.php">
<? if($monthe==""){ $monthe=Date('m'); } if($searchYear==""){ $searchYear=Date('Y')+543; }
if($deptcenter=="1"){ $showheader="ÃÒ¡ÒÃ˹ѧÊ×ÍÃѺÀÒ¹͡"; }else{ $showheader="ÃÒ¡ÒÃ˹ѧÊ×Í·Õèŧ·ÐàºÕ¹ÃѺ/·ÕèäÁèŧ·ÐàºÕ¹ÃѺ/á¨é§¡ÒÃÊ觼Դ"; }
?>
<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><?="áÊ´§".$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="0" align="center" cellpadding="0" cellspacing="0" id="showtable" <? if($flagshow=="1"){ ?>style="display:''; border-collapse:collapse" <? }else{ ?>style="display:none; border-collapse:collapse" <? }?>>
<tr><td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td align="right" colspan="4">
<? $DlcPS2=searchDlcPS2($oDlc->DlpID,$DLCID,$oDlc->DlcSeq,$oDlc->deptId); ?>
<? if($deptcenter!="1"){ if($s==''){ $s=1; } ?>
<b>ÃÒ¡ÒÃ˹ѧÊ×Í</b>
<select name="s" onChange="ShowInfoReceive('<?php echo $DLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $searchDlcPS2; ?>','<?=$InputThai; ?>')" id="s">
<option value="1" <? if($s=="" || $s=="1"){ echo "selected"; }?>>·Õèŧ·ÐàºÕ¹ÃѺ</option>
<option value="6" <? if($s=="6"){ echo "selected"; }?>>·ÕèäÁèŧ·ÐàºÕ¹ÃѺ</option>
<option value="7" <? if($s=="7"){ echo "selected"; }?>>·Õèá¨é§¡ÒÃÊ觼Դ</option>
</select>
<br><br>
<? }else{ ?><input type="hidden" name="s" value="<?=$s; ?>" id="s"> <? } ?>
<? if($oDlp1->DlpPID==0){ ?>
<b>ÃÒ¡ÒÃ˹ѧÊ×Íã¹â¿Åà´ÍÃì</b>
<select name="folderstaff" onChange="ShowInfoReceive('<?php echo $DLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $searchDlcPS2; ?>','<?=$InputThai; ?>')" id="folderstaff">
<option value="all" <? if($folderstaff==""){ echo "selected"; }?>>áÊ´§·Ñé§ËÁ´</option>
<? $oDbxS->SearchByNoDelFolder($DLCID,$oDlc->DlpID,$oDlc->deptId,$oDlc->docGroup);
while($oDbxS->GetRecord()){
?>
<option value="<?=$oDbxS->DocInboxSID; ?>" <? if($folderstaff==$oDbxS->DocInboxSID){ echo "selected"; }?>><?=$oDbxS->InboxName; ?></option>
<? } ?>
</select>
<? if($oDlc->DlcSign=="Y"){ ?><input type="hidden" name="forfolderstaff" value="<?='DIbHeader'; ?>" id="forfolderstaff"><? }else{ ?><input type="hidden" name="forfolderstaff" value="<?='DIbStaff'; ?>" id="forfolderstaff"><? } ?>
<? }else{ ?><input type="hidden" name="folderstaff" value="" id="folderstaff"><input type="hidden" name="forfolderstaff" value="" id="forfolderstaff"><? }?>
<br><br>
<b>¤é¹ËÒ˹ѧÊ×Í</b><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"> (àÃ×èͧ/ÇèÒ´éÇÂ)</font> <input name="searchName" id="searchName" type="text" size="25" value="<?=a2th($searchName); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<?=$InputThai; ?>','searchName')"> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(·Õè)</font> <input name="searchNo" id="searchNo" type="text" size="20" value="<?=a2th($searchNo); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<?=$InputThai; ?>','searchNo')"><br>
<font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(àÅ¢ÃѺ) ¨Ò¡</font> <input name="searchTypeNoF" id="searchTypeNoF" type="text" value="<?=a2th($searchTypeNoF); ?>" size="6" onkeypress="return isNumberKey('<?=$InputThai; ?>',event)" onKeyUp="CheckInput('<?=$InputThai; ?>','searchTypeNoF')">
<font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">¶Ö§</font> <input name="searchTypeNoT" id="searchTypeNoT" type="text" value="<?=a2th($searchTypeNoT); ?>" size="6" onkeypress="return isNumberKey('<?=$InputThai; ?>',event)" onKeyUp="CheckInput('<?=$InputThai; ?>','searchTypeNoT')"></font>
</td>
</tr>
<tr><td colspan="4"> </td></tr>
<tr><td> </td><td colspan=3><input name="selectdocdate" id="selectdocdate3" type="radio" value="3" checked onClick="checkradio(3)" <? if($selectdocdatevalue=="3"){ echo "checked"; }?>> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(¤é¹ËÒ·Ñé§ËÁ´)</font></td></tr>
<tr><td width="58%"> </td><td align="left" height="25"><input name="selectdocdate" id="selectdocdate1" type="radio" value="1" checked onClick="checkradio(1)" <? if($selectdocdatevalue=="1" || $selectdocdatevalue==""){ echo "checked"; }?>> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(»ÃШÓà´×͹) </font></td><td> <select name="monthe" id="monthe" onChange="ShowInfoReceive('<?php echo $DLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $searchDlcPS2; ?>','<?=$InputThai; ?>')">
<option value="01" <? if($monthe=="01"){ echo "selected"; }?>>Á.¤.</option>
<option value="02" <? if($monthe=="02"){ echo "selected"; }?>>¡.¾.</option>
<option value="03" <? if($monthe=="03"){ echo "selected"; }?>>ÁÕ.¤.</option>
<option value="04" <? if($monthe=="04"){ echo "selected"; }?>>àÁ.Â.</option>
<option value="05" <? if($monthe=="05"){ echo "selected"; }?>>¾.¤.</option>
<option value="06" <? if($monthe=="06"){ echo "selected"; }?>>ÁÔ.Â.</option>
<option value="07" <? if($monthe=="07"){ echo "selected"; }?>>¡.¤.</option>
<option value="08" <? if($monthe=="08"){ echo "selected"; }?>>Ê.¤.</option>
<option value="09" <? if($monthe=="09"){ echo "selected"; }?>>¡.Â.</option>
<option value="10" <? if($monthe=="10"){ echo "selected"; }?>>µ.¤.</option>
<option value="11" <? if($monthe=="11"){ echo "selected"; }?>>¾.Â.</option>
<option value="12" <? if($monthe=="12"){ echo "selected"; }?>>¸.¤.</option>
</select>
<input name="searchYear" id="searchYear" type="text" size="5" maxlength="5" value=<? if($searchYear!=""){ echo a2th($searchYear); }else{ echo a2th(Date('Y')+543); } ?> onkeypress="return isNumberKey('<?=$InputThai; ?>',event)" onKeyUp="On_Year('<?php echo $DLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $searchDlcPS2; ?>','<?=$InputThai; ?>')" >
</td><td> </td></tr>
<tr valign="middle"><td> </td><td width="20%" align="left" valign="middle"><input name="selectdocdate" id="selectdocdate2" type="radio" value="2" onClick="checkradio(2)" <? if($selectdocdatevalue=="2"){ echo "checked"; }?>> <input name="selectdocdatevalue" id="selectdocdatevalue" type="hidden" value=<?=$selectdocdatevalue; ?>><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(Çѹ·Õè¢Í§Ë¹Ñ§Ê×Í)</font></td><td width="18%"><? if($searchdocdate==""){ ?><script>DateInput('searchdocdate', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script><? }else{ ?><script>DateInput('searchdocdate', true, 'DD/MM/YYYY','<?php echo splitDateDb($searchdocdate,"/");?>');</script><? } ?></td></tr>
<!-- 23/01/2015 Chain -->
<tr>
<td colspan="3" align="right">
<b>áÊ´§¢éÍÁÙÅ˹ѧÊ×ÍÃѺ¨Ò¡</b>
<select name="college2" id="college2">
<option value="all"<? if($college2==""){ echo "selected"; } ?>>áÊ´§·Ñé§ËÁ´</option>
<?php
$oCllg2->RScollegedetail();
$oCllg2->GetRecord();
//print_r($oCllg2);
while($oCllg2->GetRecord()){
?>
<option value="<?=$oCllg2->collegeAbbr; ?>" <? if($college2==$oCllg2->collegeAbbr){ echo "selected"; }?>><?=$oCllg2->collegeAbbr; ?></option>
<? } ?>
</select>
</td>
<!-- End -->
<td width="4%"><input name="searchNamesub" id="searchNamesub" type="button" value="¤é¹ËÒ" onClick="ShowInfoReceive('<?php echo $DLCID; ?>','<?php echo $MaxDocGroup; ?>','<?php echo $searchDlcPS2; ?>','<?=$InputThai; ?>')"></td></tr>
</table>
<div id="showselect"> <!-- ajax showSelectDoc.php-->
<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>
<?php
if($selectdocdatevalue=="3" && $searchName=="" && $searchNo=="" && $searchTypeNoF=="" && $searchTypeNoT==""){
$cannotsearch=1;
}
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,$college2);
}else{
$numRow = $oDoc3->SearchByDlcIDDocGroupPSDlcID2DsID0DrsSendDateNoAcceptandAcceptnoRsID4searchNo($DLCID,$MaxDocGroup,$DlcPS2,$monthe,th2a($searchYear),$s,th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff,$college2);
}
}else{
$numRow=0;
}
$z=0;
if($numRow!=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;
}
if($deptcenter=="1"){
$oDoc4->SearchByDlcIDDocGroupPSDlcID2DsID0DrsSendDateNoAcceptandAcceptLimitDrsReceiveDateRsID1searchNo($DLCID,$MaxDocGroup,$DlcPS2, $start, $GLOBALS['PAGE_SIZE'],$monthe,th2a($searchYear),$s,th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff,$college2);
}else{
$oDoc4->SearchByDlcIDDocGroupPSDlcID2DsID0DrsSendDateNoAcceptandAcceptLimitDrsReceiveDatenoRsID4searchNo($DLCID,$MaxDocGroup,$DlcPS2, $start, $GLOBALS['PAGE_SIZE'],$monthe,th2a($searchYear),$s,th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff,$college2);
}
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> <?=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"> <?=showeDoc($oDoc4->eDoc); ?><a href="showNoAcceptDoc.php?page_id=<?=$page_id;?>&s=<?=$s; ?>&flagshow=<?=$flagshow; ?>&DtID=<?=$oDoc4->DtID;?>&RsID=<?=$oDoc4->RsID; ?>&DocID=<?php echo $oDoc4->DocID;?>&DrsID=<?=$oDoc4->DrsID; ?>&monthe=<?=$monthe;?>&searchYear=<?=$searchYear; ?>&searchName=<?=$searchName; ?>&searchNo=<?=$searchNo; ?>&deptcenter=<?=$deptcenter; ?>&searchdocdate=<?=$searchdocdate;?>&selectdocdatevalue=<?=$selectdocdatevalue;?>&folderstaff=<?=$folderstaff;?>&forfolderstaff=<?=$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=<?=$flagshow; ?>&monthe=<?=$monthe;?>&searchYear=<?=$searchYear; ?>&s=<?=$s; ?>&searchName=<?=$searchName;?>&searchNo=<? echo $searchNo; ?>&deptcenter=<?=$deptcenter; ?>&searchdocdate=<?=$searchdocdate;?>&selectdocdatevalue=<?=$selectdocdatevalue;?>&searchdocdate=<?=$searchdocdate; ?>&folderstaff=<?=$folderstaff;?>&forfolderstaff=<?=$forfolderstaff;?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";}?></a>
<?php
}
}
?> </td></tr>
<? }?>
</table>
</div></td></tr></table>
</td></tr>
</table><br>
<input type="hidden" name="flagshow" id="flagshow" value="<?=$flagshow; ?>">
<input type="hidden" name="pgajax" id="pgajax" value="<?=$GLOBALS['PAGE_SIZE']; ?>">
<input type="hidden" name="page_id2" id="page_id2" value="<?=$page_id2; ?>">
</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(); while($oDsl->GetRecord()){ echo searchPicDocSpeedLevel($oDsl->DslID); echo " ".$oDsl->DslName." "; }?></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()){ echo searchPicDocSecretLevel($oDcl->DclID); echo " ".$oDcl->DclName." "; }?></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>
<? }else{ include_once "unselectposition.php"; } ?>
<?
$time_endpage = microtime_float();
echo '<div align=right><font color=#AAAAAA>'.$time = $time_endpage - $time_startpage;
echo ' s</font></div>';
?>
<script language="javascript">
function showDoc(){
document.ff.submit();
}
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='';
}else{
document.getElementById( 'closeshow' ).setAttribute( 'style', 'display:' );
document.getElementById( 'openshow' ).setAttribute( 'style', 'display:none' );
document.getElementById( 'showtable' ).setAttribute( 'style', 'display:' );
}
}else{
if(mybrowser.indexOf('MSIE')>0){
openshow.style.display='';
closeshow.style.display='none';
showtable.style.display='none';
}else{
document.getElementById( 'openshow' ).setAttribute( 'style', 'display:' );
document.getElementById( 'closeshow' ).setAttribute( 'style', 'display:none' );
document.getElementById( 'showtable' ).setAttribute( 'style', 'display:none' );
}
}
}
function On_Month(){
searchYear=document.ff.searchYear.value;
if (searchYear=="") {
alert('¡ÃسҡÃÍ¡»Õ');
document.ff.searchYear.focus();
return false ;
}
document.ff.flagshow.value=1;
document.ff.submit();
}
function On_Year(DLCID,MaxDocGroup,DlcPS2,InputThai){
searchYear=document.ff.searchYear.value;
if (searchYear.length == 4) {
ShowInfoReceive(DLCID,MaxDocGroup,DlcPS2,InputThai);
}
}
function changeS(){
document.ff.submit();
}
function changeS2(){
if(document.ff.searchName.value==""){
document.ff.searchName.value="";
}
if(document.ff.searchNo.value==""){
document.ff.searchNo.value="";
}
document.ff.submit();
}
function validate2()
{
if(document.getElementById('st_val').value=='')
{
alert('¡ÃسÒàÅ×͡˹ѧÊ×Í·Õèµéͧ¡ÒÃŧ·ÐàºÕ¹ÃѺ');
return false;
}
else
{
var agree=confirm("¤Ø³µéͧ¡ÒÃŧ·ÐàºÕ¹ÃѺ˹ѧÊ×Í·ÕèéàÅ×Í¡¹Õéá¹è¹Í¹ãªèËÃ×ÍäÁè ?");
if (agree){
return true;
}else{
return false ;
}
}
}
function validate(type)
{
if(document.getElementById('st_val').value==''|| document.getElementById('st_val').value=="on,")
{
if(type=="acceptAll"){
alert('¡ÃسÒàÅ×͡˹ѧÊ×Í·Õèµéͧ¡ÒÃŧ·ÐàºÕ¹ÃѺ');
}else if(type=="NoacceptAll"){
alert('¡ÃسÒàÅ×͡˹ѧÊ×Í·Õèµéͧ¡ÒÃäÁèŧ·ÐàºÕ¹ÃѺ');
}
return false;
}
else
{
if(type=="acceptAll"){
str="¤Ø³µéͧ¡ÒÃŧ·ÐàºÕ¹ÃѺ˹ѧÊ×Í·ÕèéàÅ×Í¡¹Õéá¹è¹Í¹ãªèËÃ×ÍäÁè"
}else if(type=="NoacceptAll"){
str="¤Ø³µéͧ¡ÒÃäÁèŧ·ÐàºÕ¹ÃѺ˹ѧÊ×Í·ÕèéàÅ×Í¡¹Õéá¹è¹Í¹ãªèËÃ×ÍäÁè"
}
var agree=confirm(str);
if (agree){
if(type=="acceptAll"){
document.gg.method.value="acceptAll";
document.gg.action="processReceiveDocAll.php";
}else if(type=="NoacceptAll"){
document.gg.method.value="NoacceptAll";
document.gg.action="processReceiveDoc.php";
}
document.gg.submit();
return true;
}else{
return false ;
}
}
/*document.gg.action="processReceiveDocAll.php";
document.gg.submit();*/
return true;
}
</script>
<script type="text/javascript">
function checkAll()
{
var check_DrsID_len = document.gg.check_DrsID.length;
document.getElementById('st_val').value='';
for ( i = 0; i<check_DrsID_len ; i++)
{
document.gg.check_DrsID[i].checked=true;
document.getElementById('st_val').value+=document.gg.check_DrsID[i].value+',';
}
fin_str = document.getElementById('st_val').value;
document.getElementById('st_val').value = fin_str.replace(',on,','');
}
function clearAll()
{
var check_DrsID_len = document.gg.check_DrsID.length;
for ( i = 0; i<check_DrsID_len ; i++)
{
document.gg.check_DrsID[i].checked=false;
document.getElementById('st_val').value='';
}
}
function test()
{
var check_DrsID_len = document.gg.check_DrsID.length;
if(check_DrsID_len==0)
{
document.getElementById('st_val').value ='';
}
document.getElementById('ch_all').checked =false;
document.getElementById('st_val').value ='';
for ( i = 0; i<check_DrsID_len ; i++)
{
if(document.gg.check_DrsID[i].checked)
{
document.getElementById('st_val').value+=document.gg.check_DrsID[i].value+',';
}
}
fin_str = document.getElementById('st_val').value;
document.getElementById('st_val').value = fin_str.replace(',on,','');
}
function checkcheckbox(v){
if(document.gg.selectpredocdatevalue.value==v){
document.getElementById('selectpredocdate').checked=false;
document.gg.selectpredocdatevalue.value="";
}else{
document.getElementById('selectpredocdate').checked=true;
document.gg.selectpredocdatevalue.value=v;
}
}
function checkradio(v){
if(document.ff.selectdocdatevalue.value==v){
document.getElementById('selectdocdate'+v).checked=false;
document.ff.selectdocdatevalue.value="";
}else{
document.getElementById('selectdocdate'+v).checked=true;
document.ff.selectdocdatevalue.value=v;
}
}
</script>
|