<html> <head> <title>CMS News</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <style type="text/css"> <!-- .style1 {font-size: 36px} --> </style> </head> <body> <?php $objConnect = mysql_connect("localhost","root","password") or die("Error Connect to Database"); $objDB = mysql_select_db("news"); if($_POST["hdnCmd"] == "Add") { $bko1 = addslashes($_REQUEST['txtAddtitle']); $title = stripslashes($bko1); $bko = addslashes($_REQUEST['txtAddcontent']); $con = stripslashes($bko); $strSQL = "INSERT INTO newcontent "; $strSQL .="(topic,title,content) "; $strSQL .="VALUES "; $strSQL .="('".$_POST["txtAddtopic"]."','".$title."','".$con."') "; $objQuery = mysql_query($strSQL); if(!$objQuery) { echo "Error Save [".mysql_error()."]"; } } ?> <script type="text/javascript" src="nicEdit.js"></script> <script type="text/javascript"> bkLib.onDomLoaded(nicEditors.allTextAreas); </script> <form name="frmMain" method="post" action="<?=$_SERVER["PHP_SELF"];?>"> <p> <input type="hidden" name="hdnCmd" value=""> </p> <table width="800" border="1" align="center"> <tr> <td colspan="5"><p align="center" class="style1"><br> Content Management System<br> <br> </p></td> </tr> <tr> <td width="160"><div align="center"><a href="add.php">Add Content</a></div></td> <td width="160"><div align="center"><a href="edit.php">Edit/Delete Content</a></div></td> <td width="160"> </td> <td width="160"> </td> <td width="160"> </td> </tr> <tr> <td colspan="5"><p> </p> <table width="561" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td width="50">Topic</td> <td width="7">:</td> <td width="474"><input type="text" name="txtAddtopic" size="20"></td> </tr> <tr> <td valign="top">Title</td> <td valign="top">:</td> <td><textarea name="txtAddtitle" style="width:400px; height:100px;"></textarea></td> </tr> <tr> <td valign="top">Content</td> <td valign="top">:</td> <td><textarea name="txtAddcontent" style="width:400px; height:200px;"></textarea></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><input name="btnAdd" type="button" id="btnAdd2" value="Submit" OnClick="frmMain.hdnCmd.value='Add';frmMain.submit();"></td> </tr> </table> <p> </p></td> </tr> </table> <p> </p> </form> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง