Viewing file: showSelectDocPreSend.php (10.75 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?PHP header("content-type: application/x-javascript; charset=TIS-620"); include_once "includefile.php"; ?> <? include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.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 "../class/clsDocSendtoPsTmp.php"; include_once "funct.php"; include_once "../link/keyThai.php"; $oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']); $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); $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); $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); $oRs4 = new DocReceiveSend($oC); $oRs5 = new DocReceiveSend($oC); $oRs6 = new DocReceiveSend($oC); $oRs7 = new DocReceiveSend($oC); $oStmp=new DocSendToPsTmp($oC); $MaxDocGroup=$oDP->SearchMaxDocGroup(); $InputThai=$oSys->SearchByInputThai();
$oDlc->SearchByKey($DLCID); $oDlc->GetRecord(); $oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord(); $useSendAll=$oSys->SearchuseSendAll(); ?> <table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <? $p=bgForSendPage($DtID);?> <tr height=22> <td width="8%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>เลขรับ</strong></font></td> <td width="20%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>ที่ ลงวันที่</strong></font></td> <td width="20%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>จาก/ที่มา (ต้นเรื่อง)</strong></font></td> <td width="45%" align="center" background="<? echo $p; ?>"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>เรื่อง/ว่าด้วย (ชนิดหนังสือ)</strong></font></td> <td width="2%" align="center" background="<? echo $p; ?>"><img src="../picture/rapid0.jpg" border="0" ></td> <td width="2%" align="center" background="<? echo $p; ?>"><img src="../picture/secret0.jpg" border="0" ></td> <? if($useSendAll=="Y"){ ?><td width="2%" background="<? echo $p; ?>"> </td><? } ?> </tr> <? $searchpredocdate=splitDateForm($searchpredocdate,"/"); 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(); $DLCID2=$oDlc3->DlcID; $oDlc4->SearchByNextDlcID($DlcSeq2,$oDlc->docGroup,$oDlc->deptId); $oDlc4->GetRecord(); $DlcPS22=$oDlc4->DlcID;
$numRow2=$oDoc7->SearchCountSendDocDrsSEnd($DLCID2,$MaxDocGroup,$DlcPS22,$DLCID,th2a($searchNamePre),th2a($searchNoPre),$searchpredocdate,$selectpredocdatevalue,$selectpreDtID,$folderstaff2,$forfolderstaff2,th2a($searchPreTypeNoF),th2a($searchPreTypeNoT),th2a($searchDeptPre)); }else{ $numRow2=$oDoc7->SearchCountSendDocDrsSEndnotY2($DLCID,$MaxDocGroup,$DlcPS2,$DLCID,th2a($searchNamePre),th2a($searchNoPre),$searchpredocdate,$selectpredocdatevalue,$selectpreDtID,$folderstaff2,$forfolderstaff2,th2a($searchPreTypeNoF),th2a($searchPreTypeNoT),th2a($searchDeptPre)); } $i=0; if($numRow2!=0){ $total_page2 = (int)($numRow2/$pgajax); if(($numRow2%$pgajax) != 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 = $pgajax*($page_id2-1); else { $page_id2 = 1; $start2 = 0; } if($oDlp1->GsarabunHead=="Y" || $oDlp1->GheadDept=="Y" || $oDlp1->Gboss=="Y" || $oDlp1->Gboss2=="Y"){ $oDoc->SearchSendDocDrsSEndlimit($DLCID2,$MaxDocGroup,$DlcPS22,$DLCID,$start2,$pgajax,th2a($searchNamePre),th2a($searchNoPre),$searchpredocdate,$selectpredocdatevalue,$selectpreDtID,$folderstaff2,$forfolderstaff2,th2a($searchPreTypeNoF),th2a($searchPreTypeNoT),th2a($searchDeptPre)); }else{ $oDoc->SearchSendDocDrsSEndnotY2limit($DLCID,$MaxDocGroup,$DlcPS2,$DLCID,$start2,$pgajax,th2a($searchNamePre),th2a($searchNoPre),$searchpredocdate,$selectpredocdatevalue,$selectpreDtID,$folderstaff2,$forfolderstaff2,th2a($searchPreTypeNoF),th2a($searchPreTypeNoT),th2a($searchDeptPre)); } while($oDoc->GetRecord()){ $oStmp->SearchByDrsID($oDoc->DrsID); while($oStmp->GetRecord()){ $oStmp->Delete(); } 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"><? if($oDoc->DocTypeNo!='0'){ echo a2th($oDoc->DocTypeNo); } ?></td> <td> <? if($oDoc->DtID!="15"){ echo $oDoc->DocNo; }else{ echo '-'; }?><br> <? echo 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{ $od_DlcID=$oDoc4->SearchDlcID($oDoc->DocPID); $oDlc2->SearchByKey($od_DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); } echo " ".$oDoc->DocFrom."<br>"; echo " (".$oDlp->DlpName.")"; } if($oDoc->RsID!='2'){ $fn="showSendDoc.php"; }else{ $fn="showSendDocSR.php";} ?> </td> <td align="left"> <? echo showeDoc($oDoc->eDoc); ?><a href="<? echo $fn; ?>?page_id2=<?php echo $page_id2;?>&DocID=<?php echo $oDoc->DocID;?>&DrsID=<? echo $oDoc->DrsID; ?>&searchpredocdate=<? echo $searchpredocdate;?>&selectpredocdatevalue=<? echo $selectpredocdatevalue;?>&searchNamePre=<? echo $searchNamePre;?>&searchNoPre=<? echo $searchNoPre;?>&selectpreDtID=<? echo $selectpreDtID;?>&folderstaff2=<? echo $folderstaff2;?>&forfolderstaff2=<? echo $forfolderstaff2;?>&searchPreTypeNoF=<? echo $searchPreTypeNoF;?>&searchPreTypeNoT=<? echo $searchPreTypeNoT;?>&searchDeptPre=<? echo $searchDeptPre;?>"><? echo $oDoc->DocSubject; ?></a> <font color="<?php echo $GLOBALS["COLOR_FONT_5"]; ?>" size="2"><? $oDt->SearchByKey($oDoc->DtID); $oDt->GetRecord(); echo "(".$oDt->DtName.")";?></font> <? if($oDlp1->DlpPID!="0"){ if($DLCID==$oDoc->DlcID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} if($oDlp1->DlpPID=="0"){ if($DlcPS2==$oDoc->DlcID){ echo " <font color=\"#029b0a\"><storng>[รักษาการ]</strong></font>"; }} ?> </td> <td align="center"><? echo searchPicDocSpeedLevel($oDoc->DslID); ?></td> <td align="center"><? echo searchPicDocSecretLevel($oDoc->DclID); ?></td> <? if($useSendAll=="Y"){ ?><td align="center"><? if($oDoc->RsID!='2'){?><input type='checkbox' name='check_DrsID' id='check_DrsID' onclick='return test()' value=<? echo $oDoc->DrsID; ?>> <? }else{ echo ' '; } ?></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($useSendAll=="Y"){ ?> <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()" >(เฉพาะหน่วยงานภายใน)</span></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="sendDoc.php?page_id2=<?php echo $num;?>&searchpredocdate=<? echo $searchpredocdate;?>&selectpredocdatevalue=<? echo $selectpredocdatevalue;?>&searchNamePre=<? echo $searchNamePre;?>&searchNoPre=<? echo $searchNoPre;?>&selectpreDtID=<? echo $selectpreDtID;?>&folderstaff2=<? echo $folderstaff2;?>&forfolderstaff2=<? echo $forfolderstaff2;?>&searchPreTypeNoF=<? echo $searchPreTypeNoF;?>&searchPreTypeNoT=<? echo $searchPreTypeNoT;?>&searchDeptPre=<? echo $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> <input type="hidden" name="DtID" id="DtID" value="<? echo $DtID; ?>"> <input type="hidden" name="GroupID" id="GroupID" value="<? echo $_SESSION['GroupID']; ?>">
|