<?php session_start(); include "conn.php"; $strSQL = "SELECT * FROM db_webmaster WHERE username = '".trim($_POST['txtUsername'])."' and Password = '".trim($_POST['txtPassword'])."'"; $objQuery = mysql_query($strSQL); $count = mysql_num_rows($objQuery); if($count > 0){ $objResult = mysql_fetch_array($objQuery); $_SESSION["id"] = $objResult["id"]; $_SESSION["Status"] = $objResult["Status"]; session_write_close(); if($objResult["Status"] == "ADMIN") { //header("location:index.php"); ?> <script type="text/javascript"> window.location="admin_page.php"; </script> <?php } else { //header("location:index.php"); ?> <script type="text/javascript"> window.location="user_page.php"; </script> <?php } }else{ ?> <script type="text/javascript"> alert('username เธซเธฃเธทเธญ password เน�เธกเน�เธ–เธนเธ�เธ•เน�เธญเธ�'); window.location="index.php"; </script> <? } ?>
<?php session_start(); include "conn.php"; $strSQL = "SELECT * FROM db_webmaster WHERE username = '".trim($_POST['txtUsername'])."' and Password = '".trim($_POST['txtPassword'])."'"; $objQuery = mysql_query($strSQL); $count = mysql_num_rows($objQuery); if($count > 0){ $objResult = mysql_fetch_array($objQuery); $_SESSION["id"] = $objResult["id"]; $_SESSION["Status"] = $objResult["Status"]; session_write_close(); if($objResult["Status"] == "ADMIN") { //header("location:index.php"); ?> <script type="text/javascript"> window.location="admin_page.php"; </script> <?php } else if($objResult["Status"] == "USER") { //header("location:index.php"); ?> <script type="text/javascript"> window.location="user_page.php"; </script> <?php } } else { ?> <script type="text/javascript"> alert('username เธซเธฃเธทเธญ password เน�เธกเน�เธ–เธนเธ�เธ•เน�เธญเธ�'); window.location="index.php"; </script> <? } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง