Viewing file: docNews.php (4.18 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once "template.php"; include_once "../class/clsdocNews.php"; include_once "../link/function.php"; include_once "funct.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']); $odN = new docNews($oC); $odN2 = new docNews($oC);
if($method=="del"){ $odN2->SearchByKey($delkey); $odN2->GetRecord(); $odN2->Delete(); } ?> <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"> <script src="getinfo.js"></script> </head>
<body> <br> <table width=703 align="center"> <tr><td height="150"> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="?mm=1">จัดการระบบ</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">จัดการข่าวประชาสัมพันธ์</font></legend> <form name="ff" method="post" ><? //target="config" ?> <table align="center" width="90%" > <tr> <td width="68%" height="25"><img src="../picture/official_letter.gif" border="0" > <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="3"><strong>จัดการข่าวประชาสัมพันธ์</strong></font> </td> </tr> <tr> <td colspan="3"><hr color="#000099"></hr></a> </td> </tr> <tr> <td colspan="3" height="22" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>" ><a href="addDocNews.php"><img src="../picture/newdoc.gif" border="0" > <b>เพิ่มข่าวประชาสัมพันธ์</b></a> </td> </tr> <tr><td> </td></tr> <? if($monthe==""){ $monthe=Date('m'); } if($searchYear==""){ $searchYear=Date('Y')+543; } ?> <tr><td align="right">ข่าวประชาสัมพันธ์ เดือน <select name="monthe" id="monthe" onChange="ShowInfoAddDocNews()"> <option value="01" <? if($monthe=="01"){ echo "selected"; }?>>ม.ค.</option> <option value="02" <? if($monthe=="02"){ echo "selected"; }?>>ก.พ.</option> <option value="03" <? if($monthe=="03"){ echo "selected"; }?>>มี.ค.</option> <option value="04" <? if($monthe=="04"){ echo "selected"; }?>>เม.ย.</option> <option value="05" <? if($monthe=="05"){ echo "selected"; }?>>พ.ค.</option> <option value="06" <? if($monthe=="06"){ echo "selected"; }?>>มิ.ย.</option> <option value="07" <? if($monthe=="07"){ echo "selected"; }?>>ก.ค.</option> <option value="08" <? if($monthe=="08"){ echo "selected"; }?>>ส.ค.</option> <option value="09" <? if($monthe=="09"){ echo "selected"; }?>>ก.ย.</option> <option value="10" <? if($monthe=="10"){ echo "selected"; }?>>ต.ค.</option> <option value="11" <? if($monthe=="11"){ echo "selected"; }?>>พ.ย.</option> <option value="12" <? if($monthe=="12"){ echo "selected"; }?>>ธ.ค.</option> </select> ปี <input name="searchYear" id="searchYear" type="text" size="5" maxlength="5" value=<? if($searchYear!=""){ echo $searchYear; }else{ echo Date('Y')+543; } ?> onKeyUp="On_Year()" ></td></tr> </table> <table align="center" width="90%"><tr><td> <div id="showselect"><? include("showSelectaddDocNews.php");?></div> </td></tr></table> <table border="0" align="center" width="100%"><tr><td align="center"> <br> <input type="hidden" name="method"> <input type="hidden" name="delkey"> <input type="button" name="cancel" value="กลับสู่เมนูหลัก" onClick="location.href = '?mm=1'"> </td> </tr></table> </form> </fieldset> <br>
</td> </tr> </table> </body> </html> <script> function On_Year(){ searchYear=document.ff.searchYear.value; if (searchYear.length == 4) { ShowInfoAddDocNews(); } } function checkDelete(delkey){ var agree=confirm("คุณต้องการลบข้อมูลข่าวประชาสัมพันธ์นี้แน่นอนใช่หรือไม่ ?"); if (agree){ document.ff.delkey.value=delkey; document.ff.method.value="del"; //document.ff.monthe.value; document.ff.submit(); }else{ return false ; } } </script>
|