<?php if(isset($_POST["btnsearch"])){ if($_POST['word']==""){ echo "<script language='javascript'>"; echo "alert('กรุณาระบุคำที่ต้องการค้นหา');"; echo "</script>"; echo "<meta http-equiv='refresh' content='0;url=news_shows.php'>"; } } ?> <?php require_once('Connections/mk.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_query("SET character_set_results=utf8"); mysql_query("SET character_set_client=utf8"); mysql_query("SET character_set_connection=utf8"); mysql_select_db($database_mk, $mk); $query_Recordset1 = "SELECT * FROM news"; $Recordset1 = mysql_query($query_Recordset1, $mk) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); mysql_query("SET character_set_results=utf8"); mysql_query("SET character_set_client=utf8"); mysql_query("SET character_set_connection=utf8"); mysql_select_db($database_mk, $mk); $query_Recordset1 = "SELECT * FROM news"; $Recordset1 = mysql_query($query_Recordset1, $mk) or die(mysql_error()); mysql_query("SET NAMES UTF8"); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <title>Untitled Document</title> <style type="text/css"> #form1 p { font-size: 18px; color: #000; font-weight: normal; } p { color: #000; } p { color: #000; } #object { color: #FFF; } #object { color: #FFF; } #form1 table tr td { color: #000; } #object { color: #FFF; } #object { color: #FFF; } #form1 table #object td div { color: #000; } #form1 table tr td #object { color: #000; } </style> </head> <body> <p> </p> <form id="form1" name="form1" method="post" action="news_add1.php"> <table width="715" border="0" align="center" cellpadding="0" cellspacing="2"> <tr> <td colspan="7" bgcolor="#92D3F3"><div align="center" id="object">ข่าวประชาสัมพันธ์</div></td> </tr> <tr id="object"> <td width="115" bgcolor="#92D3F3"><div align="center" id="object">ลำดับที่</div></td> <td width="197" bgcolor="#92D3F3"><div align="center">ประเภทข่าว</div></td> <td width="197" bgcolor="#92D3F3"><div align="center" id="object">หัวข้อข่าว</div></td> <td width="134" bgcolor="#92D3F3"><div align="center">ผู้เพิ่มข่าว</div></td> <td width="81" bgcolor="#92D3F3"><div align="center">วันที่ทำการเพิ่มข่าว</div></td> <td width="84" bgcolor="#92D3F3"><div align="center">ลบ</div></td> <td width="84" bgcolor="#92D3F3"><div align="center">แก้ไข</div></td> </tr> <?php do { ?> <tr> <td bgcolor="#B8DDEF"><div align="center"><?php echo $row_Recordset1['id']; ?></div></td> <td bgcolor="#B8DDEF"><div align="center"><?php echo $row_Recordset1['type']; ?></div></td> <td bgcolor="#B8DDEF"><div align="center"><?php echo "<a href = \"news_select1.php?id=".$row_Recordset1['id']."\">".$row_Recordset1['subject']."</a><br>"; ?></div></td> <td bgcolor="#B8DDEF"><div align="center"><?php echo $row_Recordset1['name']; ?></div></td> <td bgcolor="#B8DDEF"><div align="center"><?php echo $row_Recordset1['date']; ?></div></td> <td bgcolor="#B8DDEF"><div align="center"><a href="delete_news.php?id=<?php echo $row_Recordset1['id']; ?>">Click</a></div></td> <td bgcolor="#B8DDEF"><div align="center"><a href="update_news1.php?id=<?php echo $row_Recordset1['id']; ?>">Click</a></div></td> </tr> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> </table> <p align="center"> <input type="submit" name="button" id="button" value="เพิ่มข่าวประชาสัมพันธ์" /> </p> </form> <p> </p> </body> </html> <?php mysql_free_result($Recordset1); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง