<? session_start();?> <!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> <link rel="stylesheet" type="text/css" href="css/style.css"> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <title>Login</title> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#3b5999"> <tr> <th width="13%" height="60" scope="col"> </th> <th width="87%" align="left" scope="col" class="style11">OKATOOLS</th> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#eeeff4"> <tr> <th height="50" scope="col"> </th> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="85" scope="col"> </th> </tr> </table> <table width="650" height="200" border="0" align="center" cellpadding="0" cellspacing="0" class="border"> <tr> <td scope="col"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="35" valign="bottom" scope="col" class="style8"><b>WEBMASTER LOGIN</b></td> </tr> </table> <table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td scope="col"><hr /></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="25" scope="col"> </th> </tr> </table> <? include("config.php"); if(isset($_REQUEST["submit"])){ session_start(); session_register("username"); session_register("password"); $array=mysql_fetch_array(mysql_query("select * from table_account where username = '$_REQUEST[username]' and password = '$_REQUEST[password]'")); if($array== 0){ $_SESSION["username"]=""; $_SESSION["password"]=""; ?> <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="redborder"> <tr> <td height="120" valign="top" scope="col"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign="top" scope="col" class="style10"><span class="style9"><b>Please Login To Amin</b> </span><br />The username you entered does not belong to any account. You may try clearing your browser's cache and cookies by following</td> </tr> </table> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th scope="col"> </th> </tr> </table> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign="top" scope="col" class="style10"><span class="style9"><b>กรุณาเข้าสู่ระบบก่อน</b> </span><br />การเข้าใช้งานระบบ Backend ของเว็บไซต์นี้ถือเป็นความลับ สำหรับผู้ที่มีสิทธิ์เข้าใช้งานเท่านั้น ผู้ที่ไม่ได้รับอณุาติ จะไม่มีสิทธิ์เข้าใช้ และหากผู้ไม่มีสิทธิ์ พยายาม<font color="#FF0000">เข้าระบบโดยไม่ได้รับอณุญาติ (Hack) </font>และพยายามกระทำการฝ่าผืน มีโทษร้ายแรงสูงสุด ตามกฏหมาย</d> </tr> </table></td> </tr> </table> <? }else{ $_SESSION["username"]=$_REQUEST["username"]; $_SESSION["password"]=$_REQUEST["password"]; echo "<meta http-equiv='refresh' content='0;URL=login.php'>"; } } ?> <form name="Login" method="post" action="<? $_SERVER["PHP_SELF"];?>"> <table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="260" scope="col"> </td> <td width="340" scope="col"> </td> </tr> <tr> <td height="35" align="right" class="style7" scope="col"><b>Username : </b></td> <td scope="col"><input name="username" type="text" size="25" maxlength="50" /></td> </tr> <tr> <td scope="col" align="right" class="style7"><b>Password : </b></td> <td scope="col"><input name="password" type="password" size="25" maxlength="15"/></td> </tr> <tr> <td scope="col"> </td> <td scope="col"> </td> </tr> <tr> <td scope="col"> </td> <td scope="col"><input name="submit" type="submit" value="เข้าสู่ระบบ" class="style12" style="background-color:#3b5999; border:hidden;"/></td> </tr> <tr> <td scope="col"> </td> <td scope="col"> </td> </tr> </table></form> </td> </tr> </table> </body> </html>
/*จัดไปอีกเวอร์ชันครับ*/ <?php session_start(); ?> <!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> <script language="javascript" src="javascript/Myjavascript.js"></script> <link rel="stylesheet" href="css/Mycss.css" /> </head> <body> <br /> <br /> <br /> <br /> <br /> <br /> <form id="form1" name="form1" method="post" action="" onsubmit="return check_login()"> <table width="377" height="278" border="0" align="center" cellpadding="0" cellspacing="1" class="formlogin"> <tr> <td align="center" valign="middle" background="image/bg1.gif"><br /> <br /> <table width="66%" border="0" cellspacing="1" cellpadding="0"> <tr> <td width="34%" align="right" valign="middle" class="font">UserName:</td> <td width="66%" align="left" valign="top"><input name="fname" type="text" class="textfile" id="id_stu" onfocus="highlight(this)" onblur="dehighlight(this)" maxlength="11"/></td> </tr> <tr> <td align="right" valign="middle" class="font">Password:</td> <td align="left" valign="middle"><input name="password" type="password" class="textfile" id="id_stu2" onfocus="highlight(this)" onblur="dehighlight(this)" maxlength="11"/></td> </tr> <tr> <td colspan="2" align="center" valign="middle"> <input name="Submit" type="submit" class="button" value="เข้าระบบ" /> <input name="Submit2" type="reset" class="button" value="ยกเลิก" /></td> </tr> <tr> <td colspan="2" align="center" valign="middle" class="fontlink"> </td> </tr> </table></td> </tr> </table> </form> </body> </html> <?php if(isset($_POST['Submit'])){ $_POST['fname']=trim($_POST['fname']); $_POST['password']=md5(trim($_POST['password'])); if(($_POST['fname']=='admin') and($_POST['password']=='62bc16b8c31b4364c9924282759f52ef')){ $_SESSION['fname']=$_POST['fname']; $_SESSION['password']=$_POST['password'];/*กำหนด session นะครับ*/ echo"<script>window.location='../dst/code/main.php'</script>"; }else{ echo 'Pass Access!!! '; } } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง