<?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=utf-8" /> <title>เปลี่ยนรหัสผ่าน</title> <script type="text/javascript"> function onSave(){ window.location='formD4_code.php'; } function onBack(){ window.location='menu_formD.php'; } </script> <style type="text/css"> <!-- .style1 {color: #FFFF00} .style3 {font-size: 18px} --> </style> </head> <body> <form name="form1" method="post" action="formD4_code.php"> <table width="1024" height="650" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#0000FF"> <!--DWLayoutTable--> <tr> <td valign="top"><img src="images/banner.png" width="100%" height="100" /></td> </tr> <tr> <td valign="top"><table width="100%" height="20" border="0" bordercolor="#0000FF"> <tr> <td><div align="right">[ ชื่อผู้เข้าใช้ : <?php echo $_SESSION['user_login']; ?> ] [ วัน : <?php echo date("d/m/y", time()); ?> ] [ เวลา : <?php echo date("H:i:s", time()); ?> ]</div></td> </tr> </table> <table width="100%" height="500" border="1" bordercolor="#0000FF"> <tr> <td height="213" valign="top"><div align="center"> <table width="446" border="0"> <tr> <td><div align="center" class="style3">เปลี่ยนรหัสผ่าน</div></td> </tr> </table> <table width="100%" border="1" align="center" bordercolor="#0099FF" bgcolor="#CCFFFF"> <tr> <td><div align="right">รหัสผ่านเดิม : </div></td> <td><div align="left"> <label> <input type="text" name="txtPass" /> </label> </div></td> </tr> <tr> <td><div align="right">รหัสผ่านใหม่ : </div></td> <td><div align="left"> <label> <input type="text" name="txtPass1" /> </label> </div></td> </tr> <tr> <td width="429"><div align="right">ยืนยันรหัสผ่าน : </div></td> <td width="573"><div align="left"> <label> <input type="text" name="txtPass2" /> </label> </div></td> </tr> <tr> <td colspan="2"><table width="67" border="0" align="center"> <tr> <td width="61"><div align="center"> <label> <input input type="submit" name="btnSubmit" value="ยืนยัน" style="width:100px"/> </label> </div></td> </form> <td><div align="center"> <input type="button" name="btnBack" value="กลับ" onclick="JavaScript:onBack();" style="width:100px"/> </div></td> </tr> </table></td> </tr> </table> <p></p> <p> </p> <p> </p> </div></td> </tr> </table></td> </tr> <tr> <td height="20" valign="top" bgcolor="#3366CC"><div align="center" class="style1">บริษัท เอ.ที. พริ้นติ้ง จำกัด </div></td> </tr> </table> </body> </html>
<? session_start(); if($_SESSION['UserID'] == "") { echo "Please Login!"; exit(); } mysql_connect("localhost","root","root"); mysql_select_db("mydatabase"); $strSQL = "SELECT * FROM member WHERE UserID = '".$_SESSION['UserID']."' "; $objQuery = mysql_query($strSQL); $objResult = mysql_fetch_array($objQuery); ?> <html> <head> <title>ThaiCreate.Com Tutorials</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head> <body> <form name="form1" method="post" action="save_profile.php"> Edit Profile! <br> <table width="400" border="1" style="width: 400px"> <tbody> <tr> <td width="125"> UserID</td> <td width="180"> <?=$objResult["UserID"];?> </td> </tr> <tr> <td> Username</td> <td> <?=$objResult["Username"];?> </td> </tr> <tr> <td> Old Password</td> <td><input name="txtOldPassword" type="password" id="txtOldPassword" value=""> </td> </tr> <tr> <td> Password</td> <td><input name="txtPassword" type="password" id="txtPassword" value=""> </td> </tr> <tr> <td> Confirm Password</td> <td><input name="txtConPassword" type="password" id="txtConPassword" value=""> </td> </tr> <tr> <td> Name</td> <td><input name="txtName" type="text" id="txtName" value="<?=$objResult["Name"];?>"></td> </tr> <tr> <td> Status</td> <td> <?=$objResult["Status"];?> </td> </tr> </tbody> </table> <br> <input type="submit" name="Submit" value="Save"> </form> </body> </html>
<? session_start(); if($_SESSION['UserID'] == "") { echo "Please Login!"; exit(); } mysql_connect("localhost","root","root"); mysql_select_db("mydatabase"); $strSQL = "SELECT * FROM member WHERE UserID = '".$_SESSION['UserID']."' "; $objQuery = mysql_query($strSQL); $objResult = mysql_fetch_array($objQuery); if($objResult["Password"] != $_POST["txtOldPassword"]) { echo "Old Password not Match!"; exit(); } if($_POST["txtPassword"] != $_POST["txtConPassword"]) { echo "Password not Match!"; exit(); } $strSQL = "UPDATE member SET Username = '".trim($_POST['txtPassword'])."' ,Name = '".trim($_POST['txtName'])."' WHERE UserID = '".$_SESSION["UserID"]."' "; $objQuery = mysql_query($strSQL); echo "Save Completed!<br>"; if($_SESSION["Status"] == "ADMIN") { echo "<br> Go to <a href='admin_page.php'>Admin page</a>"; } else { echo "<br> Go to <a href='user_page.php'>User page</a>"; } mysql_close(); ?>
<?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=utf-8" /> <title>แสดงผู้ใช้ระบบขณะนี้</title> <script type="text/javascript"> function onBack(){ window.location='menu_formD.php'; } </script> <style type="text/css"> <!-- .style1 {color: #FFFF00} .style3 {font-size: 18px} --> </style> </head> <body> <form id="frmMain"> <table width="1024" height="650" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#0000FF"> <!--DWLayoutTable--> <tr> <td valign="top"><img src="images/banner.png" width="100%" height="100" /></td> </tr> <tr> <td valign="top"><table width="100%" height="20" border="0" bordercolor="#0000FF"> <tr> <td><div align="right">[ ชื่อผู้เข้าใช้ : <?php echo $_SESSION['user_login']; ?> ] [ วัน : <?php echo date("d/m/y", time()); ?> ] [ เวลา : <?php echo date("H:i:s", time()); ?> ]</div></td> </tr> </table> <table width="100%" height="500" border="1" bordercolor="#0000FF"> <tr> <td height="213" valign="top"><div align="center"> <table width="446" border="0"> <tr> <td><div align="center" class="style3">แสดงผู้ใช้ระบบขณะนี้</div></td> </tr> </table> <table width="100%" border="1" align="center" bordercolor="#0099FF" bgcolor="#CCFFFF"> <tr> <td bgcolor="#99CCFF"><div align="center">ผู้ใช้ระบบ</div></td> <td bgcolor="#99CCFF"><div align="center">รายละเอียด</div></td> <td bgcolor="#99CCFF"><div align="center">วัน/เดือน/ปี</div></td> <td bgcolor="#99CCFF"><div align="center">เวลา</div></td> </tr> <tr> <td width="228"> </td> <td width="232"> </td> <td width="270"> </td> <td width="260"> </td> </tr> <tr> <td colspan="4"><table width="67" border="0" align="center"> <tr> <td width="61"><div align="center"> <label> <input type="button" name="btnBack" value="กลับ" onclick="JavaScript:onBack();" style="width:100px"/> </label> </div></td> </tr> </table></td> </tr> </table> <p></p> <p> </p> <p> </p> </div></td> </tr> </table></td> </tr> <tr> <td height="20" valign="top" bgcolor="#3366CC"><div align="center" class="style1">บริษัท เอ.ที. พริ้นติ้ง จำกัด </div></td> </tr> </table> </form> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง