<?php $mysql=new mysqli('', '', '', ''); include('chk_session.php'); if($_POST['run']=='Save Insert'){ $detail=stripslashes($_POST['i_detail']) $qr='insert into tb_news '. ' set news_topic=\''. $mysql->real_escape_string($_POST['i_topic']).'\' '. ', news_detail=\''.$mysql->real_escape_string($detail).'\' '. ', news_date=\''.$mysql->real_escape_string($_POST['i_date']).'\' '; $mysql->query($qr); if( $mysql->errno ) die( $qr."<br/>\n".$mysql->error); header('location: news.php'); }elseif($_POST['run']=='Save Edit'){ $detail=stripslashes($_POST['i_detail']) $qr='update tb_news '. ' set news_topic=\''. $mysql->real_escape_string($_POST['i_topic']).'\' '. ', news_detail=\''.$mysql->real_escape_string($detail).'\' '. ', news_date=\''.$mysql->real_escape_string($_POST['i_date']).'\' where news_id='.((int)($_POST['i_id'])); $mysql->query($qr); if($mysql->errno) die( $qr. "<br />\n". $mysql->error); header('location: news.php'.(isset($_REQUEST['page_no'])? '?page='.$_REQUEST['page_no'] : '')); }elseif($_POST['action']=='delete'){ $id=isset($_POST['i_id'])? (int)($_POST['i_id']) : ''; if($id) { $mysql->query('delete from tb_news where news_id='.$id, hk_db_link); echo 'Complete'; } }else{ print_r($_REQUEST); } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง