Viewing file: editDocRefTable.php (5.65 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; }
?>
<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" alt="" border="0" > ค้นหาหนังสือที่อ้างถึง</strong>
</font></legend>
<br>
<form name="ff" action="editDocRefTable.php">
<input type="hidden" name="DocID" value="<? echo $DocID; ?>">
<input type="hidden" name="RsID" value="<? echo $RsID; ?>">
<input type="hidden" name="DtID" value="<? echo $DtID; ?>">
<input type="hidden" name="DocfCir" value="<? echo $DocfCir; ?>">
<input type="hidden" name="DocNo" value="<? echo $DocNo; ?>">
<input type="hidden" name="DocDate" value="<? echo $DocDate; ?>">
<input type="hidden" name="DocSubject" value="<? echo $DocSubject; ?>">
<input type="hidden" name="DocFrom" value="<? echo $DocFrom; ?>">
<input type="hidden" name="DocTo" value="<? echo $DocTo; ?>">
<input type="hidden" name="DocOther" value="<? echo $DocOther; ?>">
<input type="hidden" name="DocRef" value="<? echo $DocRef; ?>">
<input type="hidden" name="DslID" value="<? echo $DslID; ?>">
<input type="hidden" name="DclID" value="<? echo $DclID; ?>">
<input type="hidden" name="DocShortDesc" value="<? echo $DocShortDesc; ?>">
<input type="hidden" name="endDoc" value="<? echo $endDoc; ?>">
<input type="hidden" name="pageSearch" value="<? echo $pageSearch; ?>">
<input type="hidden" name="DrsSendToPs" value="<? echo $DrsSendToPs; ?>">
<input type="hidden" name="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" 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->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?DocID=<? echo $DocID; ?>&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=editDocRef&DocRef=<? echo $DocRef; ?>&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>
|