Viewing file: selectDocPost.php (7.71 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once "template.php";
include_once "../link/function.php";
include_once "../link/functionshow.php";
include_once "../class/clsDocType.php";
include_once "../class/clsDocuments.php";
include_once "funct.php";
include_once "../class/clsDepartment.php";
include_once "../class/clsDocLineConfig.php";
include_once "../class/clsDocLinePosition.php";
include_once "../class/clsDocReceiveSend.php";
include_once "../class/clsPerson.php";
include_once "../class/clsannounceDocType.php";
include_once "../class/clsDocattatches.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDt = new doctype($oC);
$oDoc = new Documents($oC); //
$oDoc2 = new Documents($oC); //
$oDP = new Department($oC);
$oDP1 = new Department($oC);
$oDlc = new DocLineConfig($oC);
$oDlc1 = new DocLineConfig($oC);
$oDlc2 = new DocLineConfig($oC);
$oDlc3 = new DocLineConfig($oC);
$oDlc4 = new DocLineConfig($oC);
$oDlp = new docLinePosition($oC);
$oDlp1 = new docLinePosition($oC);
$oRs = new DocReceiveSend($oC);
$oRs1 = new DocReceiveSend($oC);
$oPS = new person($oC);
$oAn=new announceDocType($oC);
$oAn1=new announceDocType($oC);
$oAn2=new announceDocType($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();
$oDatt = new Docattatches($oC);
$oAn1->SearchByKeylimit();
$oAn1->GetRecord();
$AnIDselect=$oAn1->AnID;
?>
<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="selectDocPost.php">กรองข่าวแจ้งขึ้นเว็บ</a>
</font>
</legend>
<form name="ff" METHOD="POST" action="selectDocPost.php" >
<table width="99%" align="center">
<tr>
<td height="22"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>กรองหนังสือที่แจ้งขึ้นเว็บของวิทยาลัยประเภท
<select name="AnID" onChange='return showAnID();'>
<?
$oAn->RSannounceDocType();
while($oAn->GetRecord()){
?>
<option value="<? echo $oAn->AnID; ?>" <? if($AnID==""){ if($AnIDselect==$oAn->AnID){ echo "selected"; } }else{ if($AnID==$oAn->AnID){ echo "selected"; } } ?>><? echo $oAn->AnName; ?></option>
<? } ?>
</select>
</strong></font></td>
<td height="22" align="right"> </td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
</table>
</form>
<form name="gg" METHOD="POST" action="processSelectDocPost.php" >
<table width="99%" align="center">
<tr align="center">
<td align="center" colspan="2">
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>">
<td width="22%" rowspan="2" align="center"><strong>ที่หนังสือ
เรื่อง</strong></td>
<td width="15%" rowspan="2" align="center"><strong>เอกสาร</strong></td>
<td width="15%" rowspan="2" align="center"><strong>หน่วยงานที่แจ้งข่าว</strong></td>
<td rowspan="2" width="20%" align="center"><strong>(วันเดือนปีที่ประกาศขึ้นเว็บ)<br>(ประเภทข่าว)<br>(แจ้งขึ้นเว็บภายนอก/ภายใน)</strong></td>
<td colspan="3" align="center"><strong>กรองข่าว</strong></td>
</tr>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>">
<td width="4%" align="center"><strong>เลือก</strong></td>
<td width="5%" align="center"><strong>ไม่เลือก</strong></td>
<td width="5%" align="center"><strong>รอพิจารณา</strong></td>
</tr>
<?
if($AnID==""){ $AnID=$AnIDselect; } $i=0;
$oDoc->searchSelectPostDoc($AnID);
while($oDoc->GetRecord()){
?>
<td><? //echo $oDoc->DocID; ?> <? echo $oDoc->DocNo; ?><? echo "<br> ".$oDoc->DocSubject; ?></td>
<td align="left">
<? if($oDoc->DocPID=="0" || $oDoc->DocPID==""){ $searchDoc=$oDoc->DocID; }else{ $searchDoc=$oDoc->DocPID; }
$oDatt->SearchByDocID($searchDoc);
while($oDatt->GetRecord()){
$c++;
$pathfile="../documents/".$oDatt->DaUpFileName;
?>
<a href="<? echo $pathfile ; ?>" target="_blank"><img src="../picture/allregistered_ico.gif" alt="เปิดดูแฟ้มหนังสือ" border="0" style="cursor:pointer;" ></a>
<? echo " ".$c.". ".$oDatt->DaFileName."<br>";
} ?>
</td>
<td align="left">
<?
$oDlc->SearchByKey($oDoc->DlcID); $oDlc->GetRecord();
echo " ".$oDP->SearchDeptName($oDlc->deptId);
?>
</td>
<td align="left" valign="bottom"><br> <? echo abbreDate2($oDoc->DocstartDatePost,'/')." - ".abbreDate2($oDoc->DocendDatePost,'/') ?><br>
<select name="AnIDselect[<? echo $i; ?>]" >
<?
$oAn2->RSannounceDocType();
while($oAn2->GetRecord()){
?>
<option value="<? echo $oAn2->AnID; ?>" <? if($oDoc->AnID==$oAn2->AnID){ echo "selected"; }?>><? echo $oAn2->AnName; ?></option>
<? } ?></select>
<br>
<select name="DocShowInOut[<? echo $i; ?>]" >
<option value="1" <? if($oDoc->DocShowInOut=="1"){ echo "selected"; }?>>แจ้งขึ้นเว็บภายใน</option>
<option value="2" <? if($oDoc->DocShowInOut=="2"){ echo "selected"; }?>>แจ้งขึ้นเว็บภายนอก</option>
<option value="3" <? if($oDoc->DocShowInOut=="3"){ echo "selected"; }?>>แจ้งขึ้นเว็บภายนอกและภายนอก</option>
</select>
</td>
<td align="center"><input name="selectPost[<? echo $i; ?>]" type="radio" value="Y" ></td>
<td align="center"><input name="selectPost[<? echo $i; ?>]" type="radio" value="N"></td>
<td align="center"><input name="selectPost[<? echo $i; ?>]" type="radio" value="" checked></td>
</tr><input type="hidden" name="check[<? echo $i; ?>]" value="<?php echo $oDoc->DocID;?>">
<? $i++; }
if($i==0){
?>
<tr><td colspan="8" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** ไม่มีรายการหนังสือที่จะแจ้งขึ้นเว็บ **</font></td></tr>
<? } ?>
</table>
</td></tr>
<tr><td align="center" colspan="2"><input type="submit" name="add" value="บันทึก" onClick="return checkFormat();">
</td>
</tr>
</table>
<input type="hidden" name="i" value="<? echo $i; ?>">
<input type="hidden" name="method" value="selectdoc">
<input type="hidden" name="AnID" value="<? echo $AnID; ?>">
</form>
</fieldset>
</td>
</tr>
</table>
<table width="95%" border="0" align="center">
<tr>
<td width="76" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> <strong>หมายเหตุ
: </strong> </font></td>
<td width="618" align="left"><img src="../picture/allregistered_ico.gif" alt="" border="0" >
<font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">คลิกเพื่อเปิดดูแฟ้มหนังสือ </font></td>
</tr>
</table>
</body>
</html>
<script>
function showAnID(){
document.ff.submit();
}
function checkFormat(){
document.gg.submit();
}
function showAsk(){
var agree=confirm("คุณต้องการแก้ไขการแจ้งขึ้นเว็บใช่หรือไม่ ?");
if (agree){ return true ;}else{ return false ;}
}
</script>
|