<? session_start(); require_once("config.php"); if($connect=connectDB()) { $detail=$_POST['detail']; $d=$_POST['d']; $m=$_POST['m']; $y=$_POST['y']; $fileAdd=$_FILES['fileAdd']; $typefile=$_POST['typefile']; if(copy($_FILES["fileAdd"]["tmp_name"],"file_other/".time()."_".$_FILES["fileAdd"]["name"])) { $filename=time()."_".$_FILES["fileAdd"]["name"]; $sql="insert into file_other(F_Detail,F_Date,F_File,F_Type) values('$detail','$y.-.$m.-.$d','$filename','$typefile')"; if($result=mysql_query($sql)) { if($typefile=="material") { header("location:material.php"); } elseif($typefile=="testAssign") { header("location:testAssign.php"); } elseif($typefile=="photo") { header("location:photos.php"); } } else { if($typefile=="material") { header("location:material.php"); } elseif($typefile=="testAssign") { header("location:testAssign.php"); } elseif($typefile=="photo") { header("location:photos.php"); } } } } else { print "Not connect."; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง