Viewing file: regisDoctest.php (54.82 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/clsNoticeEditDoc.php"; include_once "../class/clsDocattatches.php"; include_once "../class/clsDocInboxStaff.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); $oDP4 = new Department($oC); $oDP5 = 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); $oDlp3 = 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); $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); $oRs11 = new DocReceiveSend($oC); $oRs2 = new DocReceiveSend($oC); $oRs3 = new DocReceiveSend($oC); $oRs4 = new DocReceiveSend($oC); $oRs5 = new DocReceiveSend($oC); $oRs6 = new DocReceiveSend($oC); $oNe = new NoticeEditDoc($oC); $oDatt = new Docattatches($oC); $oDbxS = new DocInboxStaff($oC); $oDbxS1 = new DocInboxStaff($oC); $oDbxS3 = new DocInboxStaff($oC); $oDbxS2 = new DocInboxStaff($oC); $selectdocdatevalue="3"; $MaxDocGroup=$oDP->SearchMaxDocGroup(); $InputThai=$oSys->SearchByInputThai(); $useProposeAll=$oSys->SearchuseProposeAll(); if($_SESSION['DLCID'] && $_SESSION['one_position']!="1"){ include_once "selectposition.php";
$oDlc->SearchByKey($_SESSION['DLCID']); $oDlc->GetRecord(); $oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord(); $checkKeep=SearchCanKeepDocRegis($oDlc->DlpID); $checkSee=SearchCanSeeAll($oDlc->DlpID); //echo $DlcPS2= searchDlcPS2($oDlc->DlpID,$DLCID,$oDlc->DlcSeq,$oDlc->deptId); $DlcPS2=$oDlc2->SearchDlc2($oDlc->DlcSeq,$oDlp1->DlpPID,$oDlc->deptId); $oDP->SearchByKey($oDlc->deptId); $oDP->GetRecord();
if($RsID==""){ if($oDP->receiveOut=="Y"){ $RsID="1"; $DtID="1"; }else if($oDP->sendOut=="Y"){ $RsID="2"; $DtID="1"; }else{ if($oDP->receiveIn=="Y"){ $RsID="3"; $DtID="3"; }else if($oDP->sendIn=="Y"){ $RsID="4"; $DtID="3"; } } } ?> <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"> </head> <body> <table width="100%" align="center"> <tr><td > <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="regisDoc.php">ลงทะเบียนใหม่/เสนอหนังสือ</a> </font></legend> <form name="ee" METHOD="POST" action="regisDoc.php"> <table align="center" width="98%" > <tr><td colspan="2" align="left"><? include "showSelectTypeDoc.php";?></td></tr> <tr><td align="left" height="30" valign="bottom"> <? if($oDlc->DlcActive!='Y' || $oSys->closeSystem=="Y"){ ?><img src="../picture/regist_tc2.jpg" title="ลงทะเบียน" border="0" style="cursor:pointer;"><? }else{ ?><a href="addRegisDoc.php?RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>"><img src="../picture/regist_tc.jpg" title="ลงทะเบียน" border="0" style="cursor:pointer;"></a><? } ?></td><td> </td></tr> <tr> <td colspan="2"><hr color="#000099"></hr> </td> </tr> </table><input type="hidden" name="flagshow" id="flagshow" value="<? echo $flagshow; ?>"> </form> <form name="gg" METHOD="POST"> <table width="99%" align="center"> <tr><td height="23" colspan=2><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="3"><strong>เสนอลงนามหนังสือ</strong></font></td> </tr> <tr><td colspan="2" align="right" ><? if($RsID==2 || $RsID==5){ ?><a onClick="return UnreadDoc();" style="cursor:pointer;"><img src="../picture/movedoc.gif" title="ไม่ต้องการแสดงหนังสือที่อ่านแล้ว" border="0" style="cursor:pointer;" > ไม่ต้องการแสดงหนังสือที่อ่านแล้ว</a><? } ?></td></tr> <? //----------------------subject docNo?> <tr valign="middle"> <td align="right" valign="middle" colspan=2><strong>ค้นหาหนังสือ</strong> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(เรื่อง/ว่าด้วย)</font> <input name="searchPreName" id="searchPreName" type="text" size="25" value="<? echo a2th($searchPreName); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchPreName')"> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(ที่)</font> <input name="searchPreNo" id="searchPreNo" type="text" size="20" value="<? echo a2th($searchPreNo); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchPreNo')"><br> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(เลข รับ/ส่ง/ลงทะเบียน) จาก</font> <input name="searchPreTypeNoF" id="searchPreTypeNoF" type="text" value="<? echo a2th($searchPreTypeNoF); ?>" size="6" onkeypress="return isNumberKey('<? echo $InputThai; ?>',event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchPreTypeNoF')"> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">ถึง</font> <input name="searchPreTypeNoT" id="searchPreTypeNoT" type="text" value="<? echo a2th($searchPreTypeNoT); ?>" size="6" onkeypress="return isNumberKey('<? echo $InputThai; ?>',event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchPreTypeNoT')"></font> </td></tr> <? //----------------------docDate day?> <tr><td width="70%" align=right><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=<? echo $selectpredocdatevalue; ?>><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">ลงวันที่ </font></td><td><? if($searchpredocdate==""){ ?><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> <? //---------------------doc in folder?> <tr> <td colspan="3" align="right"> <? if($oDlp1->DlpPID==0){ ?> <b>รายการหนังสือในโฟลเดอร์</b> <select name="folderstaff2" onChange="preregis()" id="folderstaff2"> <option value="all" <? if($folderstaff2==""){ echo "selected"; }?>>แสดงทั้งหมด</option> <? $oDbxS->SearchByNoDelFolder($DLCID,$oDlc->DlpID,$oDlc->deptId,$oDlc->docGroup); while($oDbxS->GetRecord()){ ?> <option value="<? echo $oDbxS->DocInboxSID; ?>" <? if($folderstaff2==$oDbxS->DocInboxSID){ echo "selected"; }?>><? echo $oDbxS->InboxName; ?></option> <? } ?> </select> <? if($oDlc->DlcSign=="Y"){ ?><input type="hidden" name="forfolderstaff2" value="<? echo 'DIbHeader'; ?>" id="forfolderstaff2"><? }else{ ?><input type="hidden" name="forfolderstaff2" value="<? echo 'DIbStaff'; ?>" id="forfolderstaff2"><? } ?> <? }else{ ?><input type="hidden" name="folderstaff2" value="" id="folderstaff2"><input type="hidden" name="forfolderstaff2" value="" id="forfolderstaff2"><? }?> <input name="searchNamesubPre" id="searchNamesubPre"type="button" value="ค้นหา" onClick="preregis()"> </td> </tr> <? if(($RsID==1 || $RsID==2 || $RsID=="5" ) && $checkSee=="All"){?> <tr> <td align="right" colspan="3"><input name="showDocRegisAll" id="showDocRegisAll" type="checkbox" value="N" <? $showDocRegisAll=$oSys->SearchshowDocRegisAll(); if($showDocRegisAll=="N"){ echo "checked"; }?> onClick="return functshowDocRegisAll();" ><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(แสดงเฉพาะหน่วยงานสารบรรณกลาง)</font></td> </tr> <? }?> </table> <table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" > <? $p=bgForRegisPage($DtID); ?> <tr height=22> <td width="3%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong> </strong></font></td> <td width="3%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong> </strong></font></td> <td width="3%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong> </strong></font></td> <td width="6%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>เลข<? echo ShowNameRSDoc($RsID);?></strong></font></td> <td width="14%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong><? echo ShowNameDocNo($DtID); ?></strong></font></td> <td width="16%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong><? echo ShowNameDate($DtID); ?></strong></font></td> <td width="32%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong><? echo ShowNameSubject($DtID); ?></strong></font></td> <td width="14%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong><? if($RsID==3){ echo "วันที่ลงรับ"; }else{ echo "วันที่ลงทะเบียน"; }?></strong></font></td> <td width="3%" align="center" background="<? echo $p; ?>"><img src="../picture/rapid0.jpg" border="0" ></td> <td width="3%" align="center" background="<? echo $p; ?>"><img src="../picture/secret0.jpg" border="0" ></td> <td width="3%" align="center" background="<? echo $p; ?>"><? if($RsID==2 || $RsID==5){ ?><img src="../picture/movedoc.gif" title="ไม่ต้องการแสดงหนังสือที่อ่านแล้ว" border="0" ><? } ?></td> <? if($useProposeAll=="Y"){ ?><td width="2%" background="<? echo $p; ?>"> </td><? } ?> </tr> <? if($RsID=="5" || $RsID=="2"){ if($oDlp->DlpID==SearchDlpIDSarabunCenter() && $showDocRegisAll=="Y"){ $numRow2=$oDoc7->SearchCountRegisDocMainDept($MaxDocGroup,$RsID,$DtID,$searchpredocdate,$selectpredocdatevalue,$folderstaff2,$forfolderstaff2,th2a($searchPreName),th2a($searchPreNo),th2a($searchPreTypeNoF),th2a($searchPreTypeNoT)); $viewallRsID5=1; }else{ $numRow2=$oDoc7->SearchCountRegisDocNoMainDept($DLCID,$MaxDocGroup,$RsID,$DtID,$DlcPS2,$searchpredocdate,$selectpredocdatevalue,$folderstaff2,$forfolderstaff2,th2a($searchPreName),th2a($searchPreNo),th2a($searchPreTypeNoF),th2a($searchPreTypeNoT)); } }else{ if($oDlp->DlpID==SearchDlpIDSarabunCenter() && $showDocRegisAll=="Y"){ $numRow2=$oDoc7->SearchCountRegisDocNoMainDept2($MaxDocGroup,$RsID,$DtID,$searchpredocdate,$selectpredocdatevalue,$folderstaff2,$forfolderstaff2,th2a($searchPreName),th2a($searchPreNo),th2a($searchPreTypeNoF),th2a($searchPreTypeNoT)); }else{ $numRow2=$oDoc7->SearchCountRegisDocNoMainDept($DLCID,$MaxDocGroup,$RsID,$DtID,$DlcPS2,$searchpredocdate,$selectpredocdatevalue,$folderstaff2,$forfolderstaff2,th2a($searchPreName),th2a($searchPreNo),th2a($searchPreTypeNoF),th2a($searchPreTypeNoT)); } } $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($RsID=="5" || $RsID=="2"){ if($oDlp->DlpID==SearchDlpIDSarabunCenter() && $showDocRegisAll=="Y"){ $oDoc->SearchRegisDocMainDeptLimit($MaxDocGroup,$RsID,$DtID,$start2,$GLOBALS['PAGE_SIZE'],$searchpredocdate,$selectpredocdatevalue,$folderstaff2,$forfolderstaff2,th2a($searchPreName),th2a($searchPreNo),th2a($searchPreTypeNoF),th2a($searchPreTypeNoT)); }else{ $oDoc->SearchRegisDocNoMainDeptLimit($DLCID,$MaxDocGroup,$RsID,$DtID,$DlcPS2,$start2,$GLOBALS['PAGE_SIZE'],$searchpredocdate,$selectpredocdatevalue,$folderstaff2,$forfolderstaff2,th2a($searchPreName),th2a($searchPreNo),th2a($searchPreTypeNoF),th2a($searchPreTypeNoT)); } }else{ if($oDlp->DlpID==SearchDlpIDSarabunCenter() && $showDocRegisAll=="Y"){ $oDoc->SearchRegisDocNoMainDeptLimit2($MaxDocGroup,$RsID,$DtID,$start2,$GLOBALS['PAGE_SIZE'],$searchpredocdate,$selectpredocdatevalue,$folderstaff2,$forfolderstaff2,th2a($searchPreName),th2a($searchPreNo),th2a($searchPreTypeNoF),th2a($searchPreTypeNoT)); }else{ $oDoc->SearchRegisDocNoMainDeptLimit($DLCID,$MaxDocGroup,$RsID,$DtID,$DlcPS2,$start2,$GLOBALS['PAGE_SIZE'],$searchpredocdate,$selectpredocdatevalue,$folderstaff2,$forfolderstaff2,th2a($searchPreName),th2a($searchPreNo),th2a($searchPreTypeNoF),th2a($searchPreTypeNoT)); } } while($oDoc->GetRecord()){ $noticedoc=""; $oNe->SearchNoticeEditDocStatus($oDoc->DocID,$oDoc->DrsID,1); if($oNe->GetRecord()){ $noticedoc="<b><font color=\"#FF0000\"><แจ้งแก้ไข></font></b>"; } if(($i%2) == 0) echo "<tr bgcolor=\"#FFFFFF\" height=22 >"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\" height=22 align=\"left\">"; ?> <td align="center" valign=top><? if($oDoc->DsID=="1"){ ?><img src="../picture/completed_1.gif" border="0" title="หนังสือลงทะเบียน"><? }else if($oDoc->DsID=="2"){ ?><img src="../picture/waiting_3.gif" title="รอการพิจารณา/ลงนาม" border="0" ><? } ?></td> <td align="center" valign=top><? if(($oDoc->DlcID!=$DLCID) && ($oDoc->DlcID!=$DlcPS2)){ echo " "; }else{ ?><? if($oDoc->DsID=="1" || ($oNe->statusDoc=="1" && $oDoc->DsID=="2")){ if($RsID!="3"){ ?><a href="editRegisDoc.php?DocID=<?php echo $oDoc->DocID;?>&RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>&DrsID=<? echo $oDoc->DrsID; ?>&selectpredocdatevalue=<? echo $selectpredocdatevalue;?>&searchpredocdate=<? echo $searchpredocdate; ?>&folderstaff2=<? echo $folderstaff2;?>&forfolderstaff2=<? echo $forfolderstaff2;?>&searchPreName=<? echo $searchPreName;?>&searchPreNo=<? echo $searchPreNo;?>&searchPreTypeNoF=<? echo $searchPreTypeNoF;?>&searchPreTypeNoT=<? echo $searchPreTypeNoT;?>"><img src="../picture/incomplete_ico.gif" border="0" title="แก้ไขข้อมูลลงทะเบียน" style="cursor:pointer;"><? } } } ?></a></td>
<td align="center" valign=top><? if(($oDoc->DlcID!=$DLCID) && ($oDoc->DlcID!=$DlcPS2)){ echo " "; }else{ ?><? if($oDoc->DsID=="1"){ if($RsID!="3"){ ?><a href="processRegisterDoc.php?DocID=<?php echo $oDoc->DocID;?>&RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>&method=deleteRegisterDoc&selectpredocdatevalue=<? echo $selectpredocdatevalue;?>&searchpredocdate=<? echo $searchpredocdate; ?>&folderstaff2=<? echo $folderstaff2;?>&forfolderstaff2=<? echo $forfolderstaff2;?>&searchPreName=<? echo $searchPreName;?>&searchPreNo=<? echo $searchPreNo;?>&searchPreTypeNoF=<? echo $searchPreTypeNoF;?>&searchPreTypeNoT=<? echo $searchPreTypeNoT;?>" onClick='return checkDelete()'><img src="../picture/delete1.gif" title="ลบหนังสือ" border="0"></a><br><input type='checkbox' name='check_DrsID_Del' id='check_DrsID_Del' onclick='return selectDel()' value="<? echo $oDoc->DocID;?>"><? } } }?></td> <td align="center"><? echo a2th($oDoc->DocTypeNo); ?></td> <td > <? if($oDoc->DtID!="15"){ echo a2th($oDoc->DocNo); }else{ echo '-'; } ?></td> <td align="center"><?php if($oDoc->DocDate =="0000-00-00"){ echo ""; }else{ echo abbreDate(splitDateDb2($oDoc->DocDate ,'/')); }?></td> <td align="left"><? echo showeDoc($oDoc->eDoc); ?> <? if($oDoc->endDoc=="Y"){ $pathlink="showEndDoc.php"; }else{ $pathlink="showRegisDoc.php"; } if(($oDoc->DlcID!=$DLCID) && ($oDoc->DlcID!=$DlcPS2)){ $caseother="&caseother=1"; }else{ $caseother=""; } ?> <a href="<? echo $pathlink; ?>?page_id2=<? echo $page_id2;?>&DtID=<? echo $DtID;?>&RsID=<? echo $RsID; ?>&DocID=<?php echo $oDoc->DocID;?>&DrsID=<?php echo $oDoc->DrsID.$caseother;?>&searchpredocdate=<? echo $searchpredocdate;?>&selectpredocdatevalue=<? echo $selectpredocdatevalue;?>&searchpredocdate=<? echo $searchpredocdate; ?>&folderstaff2=<? echo $folderstaff2;?>&forfolderstaff2=<? echo $forfolderstaff2;?>&searchPreName=<? echo $searchPreName;?>&searchPreNo=<? echo $searchPreNo;?>&searchPreTypeNoF=<? echo $searchPreTypeNoF;?>&searchPreTypeNoT=<? echo $searchPreTypeNoT;?>"><? echo $oDoc->DocSubject; ?></a> <? if($RsID=="3"){ echo " <font color=\"#015181\"><storng>(จาก".$oDoc->DocFrom.")</strong></font>"; } if($oDlp->DlpPID!="0"){ if($DLCID==$oDoc->DlcID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} if($oDlp->DlpPID=="0"){ if($DlcPS2==$oDoc->DlcID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} if($oDoc->endDoc=="Y"){ echo " <font color=\"#FF0000\"><storng>[ยุติหนังสือ]</strong></font>"; } if(($oDoc->DlcID!=$DLCID) && ($oDoc->DlcID!=$DlcPS2)){ $oDlc4->SearchByKey($oDoc->DlcID); $oDlc4->GetRecord(); $oDP4->SearchByKey($oDlc4->deptId); $oDP4->GetRecord(); echo " <storng>(จาก$oDP4->deptName)</strong>"; } echo $noticedoc; if($oDoc->DocPID=="0" || $oDoc->DocPID==""){ $searchDoc=$oDoc->DocID; }else{ $searchDoc=$oDoc->DocPID; } $cdoc=$oDatt->CountDocByDocID($searchDoc); if($cdoc==0){ echo " <font color=#990099>(".a2th('0')." แฟ้ม)</font>"; }?> </td> <td align="center"><? list($DocD,$DocT) = preg_split('[ ]',$oDoc->DocDateCreate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT);?></td> <td align="center"><? echo searchPicDocSpeedLevel($oDoc->DslID); ?></td> <td align="center"><? echo searchPicDocSecretLevel($oDoc->DclID); ?></td> <td align="center"><? if($oDoc->endDoc=="Y"){ if((($oDoc->DlcID==$DLCID) || ($oDoc->DlcID==$DlcPS2)) || ($checkKeep=="All")){ ?><input name="unread[<? echo $i; ?>]" type="checkbox" value="<?php echo $oDoc->DrsID;?>"><? }else{ echo " "; } }?></td> <? if($useProposeAll=="Y"){ ?><td align="center"><input type='checkbox' name='check_DrsID' id='check_DrsID' onclick='return test(<? echo $cdoc; ?>)' <? if($oDoc->endDoc=="Y" || $oDoc->DsID=="2" || (($oDoc->DlcID!=$DLCID) && ($oDoc->DlcID!=$DlcPS2))){ echo "disabled value=enddoc"; }else{ echo "value=".$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{ ?> <tr> <td colspan="4" valign=top align=left> <font color="#000066">เลือกลบทั้งหมด</font> <input type='checkbox' id="ch_del_all" name='check_DrsID_Del' onClick="if(this.checked)checkAllDel(); else clearAllDel()" /><br> <input type="hidden" id="st_del_val" name="store_DrsID_Del" style="border:#000000 1px solid" > <input type="button" value="ลบหนังสือ" onClick="return validatedel()" > </td> <td align="right" colspan="8" bgcolor="#D2D2D2"> <? if($useProposeAll=="Y"){ ?> <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('propose')" ><input type="button" value=" ส่งผ่านหนังสือ" onClick="return validate('bypass')" ></span> <? }else{ echo " "; } ?> </td></tr> <tr height=22 bgcolor="#DADADA"><td align="right" colspan="12"><strong>หน้า-></strong> <?php for ($num=1; $num<=$total_page2; $num++) { if($num == $page_id2){ echo a2th($num)." "; }else { ?> <a href="regisDoc.php?page_id2=<?php echo $num;?>&DtID=<? echo $DtID;?>&RsID=<? echo $RsID; ?>&searchpredocdate=<? echo $searchpredocdate;?>&selectpredocdatevalue=<? echo $selectpredocdatevalue;?>&searchpredocdate=<? echo $searchpredocdate; ?>&folderstaff2=<? echo $folderstaff2;?>&forfolderstaff2=<? echo $forfolderstaff2;?>&searchPreName=<? echo $searchPreName;?>&searchPreNo=<? echo $searchPreNo;?>&searchPreTypeNoF=<? echo $searchPreTypeNoF;?>&searchPreTypeNoT=<? echo $searchPreTypeNoT;?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";} ?></a> <?php } } ?> </td></tr> <? } ?> <tr height=22 bgcolor="#FFFFFF" > <td colspan="12" valign="bottom"><br><hr color="#000099"></hr></td> </tr> </table> <input type="hidden" name="flagshow" id="flagshow" value="<? echo $flagshow; ?>"> <input type="hidden" name="i" id="i" value="<? echo $i; ?>"> <input type="hidden" name="RsID" id="RsID" value="<? echo $RsID; ?>"> <input type="hidden" name="DtID" id="DtID" value="<? echo $DtID; ?>"> <input type="hidden" name="monthe" id="monthe" value="<? echo $monthe; ?>"> <input type="hidden" name="searchYear" id="searchYear" value="<? echo $searchYear; ?>"> <input type="hidden" name="method" id="method" > <input type="hidden" name="page_id2" id="page_id2" value="<? echo $page_id2; ?>"> </form> <? //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------?> <? if($monthe==""){ $monthe=Date('m'); } if($searchYear==""){ $searchYear=Date('Y')+543; } ?> <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" > <form name="ff" METHOD="POST" action="regisDoc.php"> <? if(($RsID=="2" && ($DtID=="1" || $DtID=="2"))){ $showheader="รายการหนังสือที่ลงทะเบียนส่งแล้วทั้งหมด"; }else if($RsID=="5"){ $showheader="รายการหนังสือที่ลงทะเบียนคุมแล้วทั้งหมด"; }else{ $showheader="รายการหนังสือที่ลงทะเบียน เสนอหนังสือแล้วทั้งหมด"; } ?> <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> <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 colspan="4" align="right" > <? if($oDlp1->DlpPID==0){ ?> <b>รายการหนังสือในโฟลเดอร์</b> <select name="folderstaff" onChange="changeS2()" id="folderstaff"> <option value="all" <? if($folderstaff==""){ echo "selected"; }?>>แสดงทั้งหมด</option> <? $oDbxS->SearchByNoDelFolder($DLCID,$oDlc->DlpID,$oDlc->deptId,$oDlc->docGroup); while($oDbxS->GetRecord()){ ?> <option value="<? echo $oDbxS->DocInboxSID; ?>" <? if($folderstaff==$oDbxS->DocInboxSID){ echo "selected"; }?>><? echo $oDbxS->InboxName; ?></option> <? } ?> </select> <? if($oDlc->DlcSign=="Y"){ ?><input type="hidden" name="forfolderstaff" value="<? echo 'DIbHeader'; ?>" id="forfolderstaff"><? }else{ ?><input type="hidden" name="forfolderstaff" value="<? echo 'DIbStaff'; ?>" id="forfolderstaff"><? } ?> <? }else{ ?><input type="hidden" name="folderstaff" value="" id="folderstaff"><input type="hidden" name="forfolderstaff" value="" id="forfolderstaff"><? }?> </td></tr> <tr><td width="70%" align="right" colspan="4"> <b>ค้นหาหนังสือ</b> <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')"><br> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(เลข รับ/ส่ง/ลงทะเบียน) จาก</font> <input name="searchTypeNoF" id="searchTypeNoF" type="text" value="<? echo a2th($searchTypeNoF); ?>" size="6" onkeypress="return isNumberKey('<? echo $InputThai; ?>',event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchTypeNoF')"> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">ถึง</font> <input name="searchTypeNoT" id="searchTypeNoT" type="text" value="<? echo a2th($searchTypeNoT); ?>" size="6" onkeypress="return isNumberKey('<? echo $InputThai; ?>',event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchTypeNoT')"><br></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" 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="On_Month()" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchNoPre')"> <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); } ?> onKeyUp="On_Year()" onkeypress="return isNumberKey('<? echo $InputThai; ?>',event)"> </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=<? echo $selectdocdatevalue; ?>><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">(วันที่ของหนังสือ)</font></td><td width="18%"><? if($searchdocdate=="" || $selectdocdatevalue!=2){ ?><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><td width="4%"><input name="searchNamesub" type="submit" value="ค้นหา" onClick="changeS2()"></td></tr> </table> <input type="hidden" name="flagshow" id="flagshow" value="<? echo $flagshow; ?>"> <input type="hidden" name="RsID" id="RsID" value="<? echo $RsID; ?>"> <input type="hidden" name="DtID" id="DtID" value="<? echo $DtID; ?>"> </form> <form name="hh" METHOD="POST" action="processEntryDoc.php"> <input type="hidden" name="folderstaff" id="folderstaff" value="<? echo $folderstaff; ?>"> <input type="hidden" name="forfolderstaff" id="forfolderstaff" value="<? echo $forfolderstaff; ?>"> <input type="hidden" name="searchdocdate" id="searchdocdate" value="<? echo $searchdocdate; ?>"> <input type="hidden" name="selectdocdatevalue" id="selectdocdatevalue" value="<? echo $selectdocdatevalue; ?>"> <? if($RsID=="2" || $RsID=="5"){ ?> <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><td align="right"><a onClick="return UnreadDoc2();" ><img src="../picture/importdoc.gif" title="ต้องการแสดงหนังสือที่อ่านแล้ว" border="0" style="cursor:pointer;"> ต้องการแสดงหนังสือที่อ่านแล้ว</a></td> </tr> </table> <? } ?> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#DADADA" id="showtable" <? if($flagshow=="1"){ ?>style="display:'';" <? }else{ ?>style="display:none; border-collapse:collapse" <? }?>> <? $flagshow=1; $q=bgForRegisPage($DtID); ?> <tr height=22> <td width="6%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">เลข<? echo ShowNameRSDoc($RsID);?></font></td> <td width="14%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><? echo ShowNameDocNo($DtID); ?></font></td> <td width="16%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><? echo ShowNameDate($DtID); ?></font></td> <td width="30%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><? echo ShowNameSubject($DtID); ?></font></td> <td width="14%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><? if($RsID==3){ echo "วันที่ลงรับ"; }else{ echo "วันที่ลงทะเบียน"; }?></font></td> <td width="14%" align="center" background="<? echo $q; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2">วันที่เสนอหนังสือ</font></td> <td width="3%" align="center" background="<? echo $q; ?>"><? if($RsID==2 || $RsID==5){ ?><img src="../picture/importdoc.gif" title="ต้องการแสดงหนังสือที่อ่านแล้ว" border="0"><? }else{ echo " "; } ?></td> </tr> <? //--------------------------------find count $numrow=0; if($selectdocdatevalue=="3" && $searchName=="" && $searchNo=="" && $searchTypeNoF=="" && $searchTypeNoT==""){ $cannotsearch=1; } if($RsID=="5" || $RsID=="2"){ if($oDlp->DlpID==SearchDlpIDSarabunCenter() && $showDocRegisAll=="Y"){ if($cannotsearch!='1'){ if($DtID=="13"){ $numRow=$oDoc4->SearchViewRegisDocMainDept13($MaxDocGroup,$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $numRow=$oDoc4->SearchViewRegisDocMainDept($MaxDocGroup,$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } }else{ $numRow=0; } }else{ if($cannotsearch!='1'){ if($DtID=="13"){ $numRow=$oDoc4->SearchViewRegisDocNoMainDept13($DLCID,$MaxDocGroup,$DlcPS2,$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $numRow=$oDoc4->SearchViewRegisDocNoMainDept($DLCID,$MaxDocGroup,$DlcPS2,$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } }else{ $numRow=0; } } }else{ if($cannotsearch!='1'){ if($oDlp->DlpID==SearchDlpIDSarabunCenter() && $showDocRegisAll=="Y"){ $numRow=$oDoc4->SearchViewRegisDocNoMainDept2($MaxDocGroup,$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $numRow=$oDoc4->SearchViewRegisDocNoMainDept($DLCID,$MaxDocGroup,$DlcPS2,$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } }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($RsID=="5" || $RsID=="2"){ if($oDlp->DlpID==SearchDlpIDSarabunCenter() && $showDocRegisAll=="Y"){ if($DtID=="13"){ $oDoc3->SearchViewRegisDocMainDeptLimit13($MaxDocGroup, $start, $GLOBALS['PAGE_SIZE'],$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $oDoc3->SearchViewRegisDocMainDeptLimit($MaxDocGroup, $start, $GLOBALS['PAGE_SIZE'],$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } }else{ if($DtID=="13"){ $oDoc3->SearchViewRegisDocNoMainDeptLimit13($DLCID,$MaxDocGroup,$DlcPS2, $start, $GLOBALS['PAGE_SIZE'],$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $oDoc3->SearchViewRegisDocNoMainDeptLimit($DLCID,$MaxDocGroup,$DlcPS2, $start, $GLOBALS['PAGE_SIZE'],$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } } }else{ if($oDlp->DlpID==SearchDlpIDSarabunCenter() && $showDocRegisAll=="Y"){ $oDoc3->SearchViewRegisDocNoMainDeptLimit2($MaxDocGroup, $start, $GLOBALS['PAGE_SIZE'],$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); }else{ $oDoc3->SearchViewRegisDocNoMainDeptLimit($DLCID,$MaxDocGroup,$DlcPS2, $start, $GLOBALS['PAGE_SIZE'],$RsID,$DtID,$monthe,th2a($searchYear),th2a($searchName),th2a($searchNo),th2a($searchTypeNoF),th2a($searchTypeNoT),$searchdocdate,$selectdocdatevalue,$folderstaff,$forfolderstaff); } } while($oDoc3->GetRecord()){ $oRs4->SearchByDocIDStatus1($oDoc3->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 align="center"><? echo a2th($oDoc3->DocTypeNo); ?></td> <td width="13%"> <? if($oDoc3->DtID!="15"){ echo $oDoc3->DocNo; }else{ echo "-"; } ?></td> <td align="center"><?php if($oDoc3->DocDate =="0000-00-00"){ echo ""; }else{ echo abbreDate(splitDateDb2($oDoc3->DocDate ,'/')); }?></td> <td > <? echo showeDoc($oDoc3->eDoc); ?> <a href="showDetailRegisSignDoc.php?page_id=<? echo $page_id;?>&DocID=<?php echo $oDoc3->DocID;?>&RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>&DrsID=<? echo $oRs4->DrsID; ?>&flagshow=<? echo $flagshow; ?>&monthe=<? echo $monthe;?>&searchYear=<? echo $searchYear; ?>&searchName=<? echo $searchName; ?>&searchNo=<? echo $searchNo; ?>&searchTypeNoF=<? echo $searchTypeNoF; ?>&searchTypeNoT=<? echo $searchTypeNoT; ?>&searchdocdate=<? echo $searchdocdate;?>&selectdocdatevalue=<? echo $selectdocdatevalue;?>&searchdocdate=<? echo $searchdocdate; ?>&folderstaff=<? echo $folderstaff;?>&forfolderstaff=<? echo $forfolderstaff;?>"><? echo $oDoc3->DocSubject; ?></a> <? if($RsID=="3"){ echo " <font color=\"#015181\"><storng>(จาก"; echo $oDoc3->DocFrom; echo ")</strong></font>"; } ?> <? if($oDlp->DlpPID!="0"){ if($DLCID==$oDoc3->DlcID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} ?> <? if($oDlp->DlpPID=="0"){ if($DlcPS2==$oDoc3->DlcID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} ?> <? if($oDoc3->endDoc=="Y"){ echo "<font color=\"#FF0000\"><storng>[ยุติหนังสือ]</strong></font>"; } ?> <? if(($oDoc3->DlcID!=$DLCID) && ($oDoc3->DlcID!=$DlcPS2)){ $oDlc4->SearchByKey($oDoc3->DlcID); $oDlc4->GetRecord(); $oDP4->SearchByKey($oDlc4->deptId); $oDP4->GetRecord(); echo " <storng>(จาก$oDP4->deptName)</strong>"; } ?> </td> <td align="center"> <? list($DocD,$DocT) = preg_split('[ ]',$oDoc3->DocDateCreate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); ?></td> <td align="center"> <? if($oRs4->DrsID!=""){ if($oRs4->DrsByPass=="Y"){ if($oDoc3->DtID!="15"){ echo "ส่งผ่าน"; }else{ echo "ส่งผ่าน/ลงนามแล้ว";} }else{ $oRs5->SearchByDrsFromDrsID($oRs4->DrsID); if($oRs5->GetRecord()=="1"){ list($DocD,$DocT) = preg_split('[ ]',$oRs5->DrsReceiveDate); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); }else{ echo " "; } } } ?></td> <td width="3%" align="center"><? if($oRs4->DrsflagRead=="N"){ ?><input name="unread2[<? echo $z; ?>]" type="checkbox" value="<?php echo $oRs4->DrsID;?>"><? }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"> </td></tr> <? }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="regisDoc.php?page_id=<?php echo $num;?>&RsID=<?php echo $RsID;?>&DtID=<?php echo $DtID;?>&flagshow=<? echo $flagshow; ?>&monthe=<? echo $monthe;?>&searchYear=<? echo $searchYear; ?>&searchName=<? echo $searchName; ?>&searchNo=<? echo $searchNo; ?>&searchdocdate=<? echo $searchdocdate;?>&selectdocdatevalue=<? echo $selectdocdatevalue;?>&searchdocdate=<? echo $searchdocdate; ?>&folderstaff=<? echo $folderstaff;?>&forfolderstaff=<? echo $forfolderstaff;?>"><?php echo '[ '. a2th($num).' ]'; if($num==14){echo "<br>";}?></a> <?php } } ?> </td></tr> <? } ?> <input type="hidden" name="flagshow" id="flagshow" value="<? echo $flagshow; ?>"> <input type="hidden" name="z" id="z" value="<? echo $z; ?>"> <input type="hidden" name="RsID" id="RsID" value="<? echo $RsID; ?>"> <input type="hidden" name="DtID" id="DtID" value="<? echo $DtID; ?>"> <input type="hidden" name="monthe" id="monthe" value="<? echo $monthe; ?>"> <input type="hidden" name="searchYear" id="searchYear" value="<? echo $searchYear; ?>"> <input type="hidden" name="method" id="method" > </table>
</form> </td></tr> </table><br> </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 colspan="2" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">คลิกที่เรื่องหนังสือเพื่อเสนอลงนาม/ดูรายละเอียดหนังสือ</font></td> </tr> <tr> <td width="134" align="left"> </td> <td width="337" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"><img src="../picture/completed_1.gif" border="0" > หมายถึงหนังสือที่ลงทะเบียน</font></td> <td width="739" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"><img src="../picture/waiting_3.gif" border="0" > หมายถึงหนังสือที่รอการพิจารณา/ลงนาม</font></td> </tr> <tr> <td width="134" align="left"> </td> <td align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"><img src="../picture/incomplete_ico.gif" border="0"> คลิกเพื่อแก้ไขข้อมูลลงทะเบียน</font></td> <td align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"><img src="../picture/delete1.gif" title="ลบหนังสือ" border="0"> คลิกเพื่อลบหนังสือ</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" align="left"> </td> <td width="337" align="left"><img src="../picture/movedoc.gif" border="0" > <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">คลิกเมื่อไม่ต้องการแสดงหนังสือที่อ่านแล้ว </font></td> <td width="739" align="left"><img src="../picture/importdoc.gif" border="0" > <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">คลิกเมื่อต้องการแสดงหนังสือที่อ่านแล้ว </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.ee.flagshow.value=""; document.ee.submit(); } function checkDelete(){ var agree=confirm("คุณต้องการลบข้อมูลหนังสือลงทะเบียนนี้แน่นอนใช่หรือไม่ ?"); if (agree){ return true; }else{ return false ; } } function up_downList(status){ if(status=='up'){ closeshow.style.display=''; openshow.style.display='none'; showtable.style.display=''; showtable2.style.display=''; showtable3.style.display=''; }else{ openshow.style.display=''; closeshow.style.display='none'; showtable.style.display='none'; showtable2.style.display='none'; showtable3.style.display='none'; } } 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 On_Month(){ var date1 = document.ff.searchdocdate.value.split("/"); y=parseInt(date1[2]); document.ff.searchdocdate.value=(y+543)+"-"+date1[1]+"-"+date1[0];
searchYear=document.ff.searchYear.value; if (searchYear=="") { alert('กรุณากรอกปี'); document.ff.searchYear.focus(); return false ; } document.ff.flagshow.value=1; document.ff.selectdocdatevalue.value=1; document.ff.submit(); } function On_Year(){ var date1 = document.ff.searchdocdate.value.split("/"); y=parseInt(date1[2]); document.ff.searchdocdate.value=(y+543)+"-"+date1[1]+"-"+date1[0]; searchYear=document.ff.searchYear.value; if (searchYear.length == 4) { document.ff.flagshow.value=1; document.ff.selectdocdatevalue.value=1; document.ff.submit(); } } function UnreadDoc(){ var agree=confirm("คุณต้องการจะไม่แสดงหนังสือนี้แน่นอนใช่หรือไม่ ?"); if (agree){ document.gg.method.value="setFlagreadAll2"; document.gg.action="processEntryDoc.php"; document.gg.submit(); return true; }else{ return false ; } } function functshowDocRegisAll(){ if(document.gg.showDocRegisAll.checked == false){ var agree=confirm("คุณต้องการจะแสดงหนังสือของทุกหน่วยงานใช่หรือไม่ ?"); }else{ var agree=confirm("คุณต้องการจะแสดงหนังสือของเฉพาะหน่วยงานสารบรรณกลางใช่หรือไม่ ?"); } if (agree){ document.gg.method.value="setshowDocRegisAll"; document.gg.action="processShowDocRegisAll.php"; document.gg.submit(); return true; }else{ return false ; } } function validate(type) { var date1 = document.gg.searchpredocdate.value.split("/"); y=parseInt(date1[2]); document.gg.searchpredocdate.value=(y+543)+"-"+date1[1]+"-"+date1[0]; if(document.getElementById('st_val').value==''|| document.getElementById('st_val').value=="on,") { if(type=="propose"){ alert('กรุณาเลือกหนังสือที่ต้องการเสนอลงนาม'); }else if(type=="bypass"){ alert('กรุณาเลือกหนังสือที่ต้องการส่งผ่าน'); } return false; }else{ if(type=="propose"){ str="คุณต้องการเสนอลงนามหนังสือที่้เลือกนี้แน่นอนใช่หรือไม่" }else if(type=="bypass"){ str="คุณต้องการส่งผ่านหนังสือที่้เลือกนี้แน่นอนใช่หรือไม่" } var agree=confirm(str); if (agree){ if(type=="propose"){ document.gg.method.value="proposeAll"; }else if(type=="bypass"){ document.gg.method.value="bypassAll"; } document.gg.action="showProposeAllDoc.php"; document.gg.submit(); return true; }else{ return false ; } return true; } } function validatedel() { if(document.getElementById('st_del_val').value==''|| document.getElementById('st_del_val').value=="on,") { alert('กรุณาเลือกหนังสือที่ต้องการลบ'); return false; }else{ str="คุณต้องการลบหนังสือที่้เลือกนี้แน่นอนใช่หรือไม่" var agree=confirm(str); if (agree){ document.gg.method.value="deleteRegisterDocAll"; document.gg.action="processRegisterDoc.php"; document.gg.submit(); return true; }else{ return false ; } return true; } } function UnreadDoc2(){ var agree=confirm("คุณต้องการจะแสดงหนังสือนี้แน่นอนใช่หรือไม่ ?"); if (agree){ document.hh.method.value="resetFlagreadAll2"; document.hh.submit(); return true; }else{ return false ; } } function changeS2(){ var date1 = document.ff.searchdocdate.value.split("/"); y=parseInt(date1[2]); document.ff.searchdocdate.value=(y+543)+"-"+date1[1]+"-"+date1[0]; if(document.ff.searchName.value==""){ document.ff.searchName.value=""; } if(document.ff.searchNo.value==""){ document.ff.searchNo.value=""; } document.ff.flagshow.value=1; document.ff.submit();
} </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++) { if(document.gg.check_DrsID[i].value!="enddoc"){ 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(countdoc) { if(countdoc==0){ alert("ยังไม่มีการแนบแฟ้มหนังสือ\nกรุณาแนบแฟ้มหนังสือก่อนเสนอหนังสือ"); return false; }else{ 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 checkAllDel() { var check_DrsID_Del_len = document.gg.check_DrsID_Del.length; document.getElementById('st_del_val').value=''; for ( i = 0; i<check_DrsID_Del_len ; i++) { document.gg.check_DrsID_Del[i].checked=true; document.getElementById('st_del_val').value+=document.gg.check_DrsID_Del[i].value+','; } fin_str = document.getElementById('st_del_val').value; document.getElementById('st_del_val').value = fin_str.replace(',on,',''); }
function clearAllDel() { var check_DrsID_Del_len = document.gg.check_DrsID_Del.length; for ( i = 0; i<check_DrsID_Del_len ; i++) { document.gg.check_DrsID_Del[i].checked=false; document.getElementById('st_del_val').value=''; } }
function selectDel() { var check_DrsID_Del_len = document.gg.check_DrsID_Del.length; if(check_DrsID_Del_len==0) { document.getElementById('st_del_val').value =''; } document.getElementById('ch_del_all').checked =false; document.getElementById('st_del_val').value =''; for ( i = 0; i<check_DrsID_Del_len ; i++) { if(document.gg.check_DrsID_Del[i].checked) { document.getElementById('st_del_val').value+=document.gg.check_DrsID_Del[i].value+','; } } fin_str = document.getElementById('st_del_val').value; document.getElementById('st_del_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 preregis(){ var date1 = document.gg.searchpredocdate.value.split("/"); y=parseInt(date1[2]); document.gg.searchpredocdate.value=(y+543)+"-"+date1[1]+"-"+date1[0]; document.gg.submit(); } 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>
|