Viewing file: searchEditSelectDocPost.php (6.35 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"; include_once "../link/keyThai.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); $MaxDocGroup=$oDP->SearchMaxDocGroup(); $oDatt = new Docattatches($oC);
$oAn1->SearchByKeylimit(); $oAn1->GetRecord(); $AnIDselect=$oAn1->AnID; $InputThai=$oSys->SearchByInputThai(); ?> <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="editSelectDocPost.php">แก้ไขการกรองข่าวแจ้งขึ้นเว็บ</a> </font> </legend> <form name="ff" METHOD="POST" action="editSelectDocPost.php" > <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <tr><td colspan="6" height="22"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"> <strong>แก้ไขการกรองหนังสือที่แจ้งขึ้นเว็บของหน่วยงานประเภท</strong> <select name="AnID" id="AnID"> <? $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></font> </td></tr> <tr><td colspan="6"><hr color="#000099"></hr></td></tr> <tr><td colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>ค้นหาหนังสือ</strong></font></td></tr> <tr><td width="1%"> </td><td width="2%" > </td><td colspan="4">ที่หนังสือ : <input name="DocNo" id="DocNo" type="text" size="20"></td></tr> <tr><td width="1%"> </td><td width="2%" > </td><td colspan="4">เรื่อง : <input name="DocSubject" id="DocSubject" type="text" size="30"></td></tr> <tr><td colspan="6"><hr color="#000099"></hr></td></tr> <tr><td colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>เลือกปีหรือช่วงวันที่ที่ดำเนินการกรองข่าว</strong></font></td></tr> <tr><td width="1%"> </td><td width="6%" > <input type="radio" name="selectVal" id="selectVal1" value="1" checked onClick="radioSelectVal(1)"></td><td colspan="4">ประจำปี <input name="searchY" id="searchY" type="text" size="5" value=<? echo a2th(date('Y')+543); ?> onkeypress="return isNumberKey('<? echo $InputThai; ?>',event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','searchY')"></td></tr> <tr><td width="1%"> </td><td width="6%" > <input type="radio" name="selectVal" id="selectVal2" value="2" onClick="radioSelectVal(2)"></td><td width="11%">ตั้งแต่วันที่ </td><td width="33%"><script>DateInput('DocDateCreateStart', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script></td><td width="2%" align="center">ถึง</td><td width="48%"><script>DateInput('DocDateCreateEnd', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script></td></tr> <tr><td colspan="6"><hr color="#000099"></hr></td></tr> <tr><td colspan="6" align="right"><input name="" type="button" value="ค้นหาหนังสือ" onClick = "if(chkDate()) sendPage(); else return false; "></td></tr> </table><input name="selecttyped" id="selecttyped" type="hidden"> </form> </fieldset> </td> </tr> </table> </body> </html> <script> function chkDate(){ val=document.getElementById('selecttyped').value; if(val == 2){ f = document.ff; var date1 = f.DocDateCreateStart.value.split("/"); var date2 = f.DocDateCreateEnd.value.split("/"); //Set the two dates date1 = new Date(eval(date1[2]), eval(date1[1]-1), eval(date1[0])); date2 = new Date(eval(date2[2]), eval(date2[1]-1), eval(date2[0])); //Month is 0-11 in JavaScript //Set 1 day in milliseconds var one_day = 1000*60*60*24; //Calculate difference btw the two dates, and convert to days var diff = Math.ceil((date2.getTime()-date1.getTime())/(one_day)); if(diff < 0){ alert("กรุณาตรวจสอบช่วง 'วันที่เริ่มต้น' ควรน้อยกว่า 'วันที่สิ้นสุด' !"); return false; }else{ return true; } }else{ return true; } } function sendPage() { var x = document.getElementsByName('RPType') for(var k=0;k<x.length;k++){ if(x[k].checked){ typeshow=x[k].value; } } var links; var DocSubject=document.ff.DocSubject.value; var DocNo=document.ff.DocNo.value; var AnID=document.ff.AnID.value; if(document.getElementById('selecttyped').value == 1 || document.getElementById('selecttyped').value==''){ var yearDoc = document.ff.searchY.value; var date1 = 0; var date2 = 0; }else if(document.getElementById('selecttyped').value == 2){ var yearDoc = 0; var date1 = document.ff.DocDateCreateStart.value; var date2 = document.ff.DocDateCreateEnd.value; } filename="editSelectDocPost.php"; links = filename+"?DocSubject="+DocSubject+"&DocNo="+DocNo+'&start='+date1+'&end='+date2+"&yearDoc="+yearDoc+"&AnID="+AnID; location.href=links;
} function radioSelectType(val){ document.getElementById('RPtype').value=val; } function radioSelectVal(val){ document.getElementById('selecttyped').value=val; } </script>
|