<? session_start(); include"Connect.php"; if($_SESSION["u_id"] == NULL) echo "<meta http-equiv='Refresh' content='0; URL=../index.php'>"; $user_id=$_SESSION["u_id"] ; $today = date("Y")+543; $ms = trim(date("Y-m-d")); //echo $ms = trim(date("m-d")); $mm=date("m"); ?>
<? session_start(); include"Connect.php"; echo $u_id = $_POST['user']; echo $pass = $_POST['pass']; $encryptedpassword = md5($pass ); echo $sql = "select * from user where user_id='$u_id' and password='$pass' "; $dbquery = mysql_db_query($dbname, $sql); if($row = mysql_fetch_array($dbquery)){ $user_type=$row[user_type]; session_register("u_id"); //echo "<br>"; $_SESSION["u_id"]; if($user_type==3){ echo "<meta http-equiv='Refresh' content='0; URL=home.php'>"; } else if($user_type==2){ echo "<meta http-equiv='Refresh' content='0; URL=home.php'>"; } else if($user_type==1){ echo "<meta http-equiv='Refresh' content='0; URL=homeadmin.php'>"; } else if($user_type==4){ echo "<meta http-equiv='Refresh' content='0; URL=homestock.php'>"; } }else { echo 'ผิด'; } mysql_close(); ?> <!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=windows-874" /> <title></title> </head> <body> </body> </html>
12.session_register("u_id"); 13.//echo "<br>"; 14.$_SESSION["u_id"];
$_SESSION["u_id"] = $u_id;
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง