Viewing file: addDocRefDocTable.php (6.08 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "../class/clsTable.php"; include_once "../class/clsDocuments.php"; include_once "../link/function.php"; include_once "../class/clsReceiveSendType.php"; include_once "../link/keyThai.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDoc = new Documents($oC); $oRSt = new receiveSendType($oC);
if($RsID==4){ $searchRsID=3; }
?> <html> <head> <title>ค้นหาหนังสือที่อ้างถึงเพื่อตอบกลับ</title> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="../source/style.css" rel="stylesheet" type="text/css"> </head> <body><br> <fieldset> <? //echo "==".$RsID."==".$DtID."==".$endDoc."==".$DocNoSearch; ?> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"> <strong><img src="../picture/official_letter.gif" border="0" > ค้นหาหนังสือที่อ้างถึงเพื่อตอบกลับ</strong> </font></legend> <br> <form name="ff" action="addDocRefDocTable.php"> <input type="hidden" name="RsID" id="RsID" value="<? echo $RsID; ?>"> <input type="hidden" name="DtID" id="DtID" value="<? echo $DtID; ?>"> <input type="hidden" name="DocfCir" id="DocfCir" value="<? echo $DocfCir; ?>"> <input type="hidden" name="DocNo" id="DocNo" value="<? echo $DocNo; ?>"> <input type="hidden" name="DocDate" id="DocDate" value="<? echo $DocDate; ?>"> <input type="hidden" name="DocSubject" id="DocSubject" value="<? echo $DocSubject; ?>"> <input type="hidden" name="DocFrom" id="DocFrom" value="<? echo $DocFrom; ?>"> <input type="hidden" name="DocTo" id="DocTo" value="<? echo $DocTo; ?>"> <input type="hidden" name="DocOther" id="DocOther" value="<? echo $DocOther; ?>"> <input type="hidden" name="DocRef" id="DocRef" value="<? echo $DocRef; ?>"> <input type="hidden" name="DslID" id="DslID" value="<? echo $DslID; ?>"> <input type="hidden" name="DclID" id="DclID" value="<? echo $DclID; ?>"> <input type="hidden" name="DocShortDesc" id="DocShortDesc" value="<? echo $DocShortDesc; ?>"> <input type="hidden" name="endDoc" id="endDoc" value="<? echo $endDoc; ?>"> <input type="hidden" name="DrsSendToPs" id="DrsSendToPs" value="<? echo $DrsSendToPs; ?>"> <input type="hidden" name="pageSearch" id="pageSearch" value="<? echo $pageSearch; ?>"> <input type="hidden" name="DrsSendToPs" id="DrsSendToPs" value="<? echo $DrsSendToPs; ?>"> <input type="hidden" name="DocRefAns" id="DocRefAns" value="<? echo $DocRefAns; ?>"> <input type="hidden" name="DocRefAnsID" id="DocRefAnsID" value="<? echo $DocRefAnsID; ?>"> <input type="hidden" name="useMainDocNo" id="useMainDocNo" value="<? echo $useMainDocNo; ?>">
<table border="0" align="center" width="98%"> <tr><td><strong>ชนิดหนังสือ</strong></td><td><? echo $oRSt->SearchShowRsName($searchRsID);?></td></tr> <tr><td width="30%"><strong>ที่หนังสือ</strong></td><td width="43%"> <input name="DocNoSearch" id="DocNoSearch" type="text" maxlength="50" size="25"></td> <td width="27%"><input type=submit value="ค้นหา" align=center onClick="return checkFormat();" ></td> </tr> </table> <? if(th2a($DocNoSearch)!=""){ ?> <table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" background="<? echo "../picture/table_header_bg.gif"; ?>"> <tr height=22> <td width="14%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>ลำดับที่</strong></font></td> <td width="58%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>ที่หนังสือ</strong></font></td> <td width="28%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>ลงวันที่</strong></font></td> </tr> <? $i=0; $oDoc->SearchByRsIDDocNoDocPID0($searchRsID,th2a($DocNoSearch)); while($oDoc->GetRecord()){ $i++; ?> <tr bgcolor="#FFFFFF"><td align="center" height="22"><? echo a2th($i); ?></td> <td> <a href="processRegisterDoc.php?RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>&DocfCir=<? echo $DocfCir; ?>&DocNo=<? echo $DocNo; ?>&DocDate=<? echo $DocDate; ?>&DocSubject=<? echo $DocSubject; ?>&DocFrom=<? echo $DocFrom; ?>&DocTo=<? echo $DocTo; ?>&DocOther=<? echo $DocOther; ?>&DslID=<? echo $DslID;?>&DclID=<? echo $DclID; ?>&DocShortDesc=<? echo $DocShortDesc; ?>&endDoc=<? echo $endDoc;?>&DrsSendToPs=<? echo $DrsSendToPs;?>&DocDateShow=<? echo $oDoc->DocDate; ?>&DocNoShow=<? echo $oDoc->DocNo; ?>&DocSubjectShow=<? echo $oDoc->DocSubject; ?>&pageSearch=<? echo $pageSearch; ?>&method=addDocRef&DocRef=<? echo $DocRef; ?>&DocRefAns=<? echo $DocRefAns; ?>&DocRefAnsID=<? echo $DocRefAnsID; ?>&DrsSendToPs=<? echo $DrsSendToPs;?>&useMainDocNo=<? echo $useMainDocNo; ?>"> <? echo $oDoc->DocNo; ?></a></td> <td align="center"><?php if($oDoc->DocDate =="0000-00-00"){ echo ""; }else{ echo abbreDate(splitDateDb2($oDoc->DocDate ,'/')); }?></td> </tr> <? } ?> <? if($i==0){ ?> <tr bgcolor="#FFFFFF"><td align="center" height="22" colspan="3"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** ไม่มีรายการหนังสือที่ค้นหา **</font></td> </tr> <? } ?> </table> <table border="0" align="center" width="98%"> <tr bgcolor="#FFFFFF"><td align="center" colspan="2"> <input type="button" name="cancel" value="ยกเลิก" onClick="window.close();"> </td></tr> </table><? } // if search ?> </form> </fieldset><table border="0" align="center" width="98%"> <tr><td width="25%" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> <strong>หมายเหตุ : </strong> </font></td> <td width="85%" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">คลิกเลือกที่หนังสือที่ต้องการอ้างถึง </font></td></tr> </table> </body> </html> <script language="JavaScript"> function checkFormat(){ if(document.ff.DocNoSearch.value == ""){ alert("กรุณากรอกที่หนังสือ"); document.ff.DocNoSearch.focus(); return false; } } </script>
|