Viewing file: editDocRefTable.php (4.06 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==1){ $searchRsID=2; }else if($RsID==2){ $searchRsID=1; }
?> <script language="JavaScript"> function ReturnValue(showDocRef) { window.opener.document.ff.DocRef.value = showDocRef; window.close(); } </script> <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> <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="editDocRefTable.php"> <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($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->SearchDocRefTable($searchRsID,th2a($DocNoSearch)); while($oDoc->GetRecord()){ $i++; ?> <tr bgcolor="#FFFFFF"><td align="center" height="22"><? echo a2th($i); ?></td> <? $showDocRef=a2th($oDoc->DocNo); $showDocRef.=" ".a2th($oDoc->DocSubject); $showDocRef.=" ".abbreDate(splitDateDb2($oDoc->DocDate,'/')); ?> <td> <a style="cursor:pointer;" onClick='ReturnValue("<? echo $showDocRef;?>")'><? 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 ?><input type="hidden" name="RsID" id="RsID" value="<? echo $RsID; ?>"></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>
|