//include------------------------------------------------------------
include("config.php");
include($CONFIG['inc']."include/db/ConnectDB.php");
include($CONFIG['inc']."include/phpfn/function.php");
//--------------------------------------------------------------------
if(!session_is_registered("member")){PHPgourl("./webboard.php");return false;}
if($_POST["Submit"]=="บันทึก")
{
if(!crateFolder($CONFIG['wbimg_path'],777)){echo "ไม่พบ";}
$date=getTIME();
if(!empty($_FILES["file"]["tmp_name"]))
{
$newName=ranNum(10).".jpg";
$tmp=_IMGZ($_FILES["file"]["tmp_name"]);
if($tmp[6]=="jpg" || $tmp[6]=="gif" || $tmp[6]=="png")
{
FixResize($CONFIG['image_board'],$_FILES["file"]["tmp_name"],"$CONFIG[wbimg_path]/$newName",100);
}
}
$title=addslashes($title);
$detail=addslashes($detail);
$memID=$_SESSION["member"]["id"];
$ip=$_SERVER['REMOTE_ADDR'];
$sql="INSERT INTO `wb_topic` ( `id` , `id_wb_category` , `id_member` , `title` , `detail` , `date` , `image` , `view`,`ip` )"
."VALUES (NULL , '1', '$memID', '$title', '$detail', '$date', '$newName', '0','$ip');";
if(mysql_query($sql)){PHPalert("ระบบได้รับกระทู้ท่านแล้ว");PHPgourl("webboard.php");}else{PHPalert("เกิดข้อผิดพลาดในการบันทึก");}
}
?>
งานแถลงข่าว การจัดสร้าง พระพิฆเนศ องค์ใหญ่
|
|
|
|
| ขออำนาจแห่งพระพิฆเนศวรโปรดดลบันดาลให้ท่านทั้งหลายล้วนประสบแต่ความสำเร็จในทุกๆประการด้วยเทอญ |
| ©2009 GaneshThai.Com Allright Rights Reserved. |
|
|
|