0byt3m1n1-V2
Path:
/
home
/
bangtoey
/
domains
/
bangtoey.go.th
/
public_html
/
admin
/
[
Home
]
File: changepass.php
<? session_start(); if( !isset($_SESSION["user"]) || !isset($_SESSION["passwd"]) ){ session_destroy(); $message="กรุณา Login ก่อน !"; $url="index.php"; include "alert.php"; die;exit; } require_once('Connections/conndb.php'); $pass5 = md5($_SESSION["passwd"]); $uname = $_SESSION["user"]; $ulevel = $_SESSION["level"]; $query_m = "select * from tbl_admin where user_name='$uname' and user_password='$pass5' "; $result_m = mysql_query($query_m) or die(mysql_error()); $num_rows = mysql_num_rows($result_m); if ($num_rows > 0 ) { $chk_edit = $_POST["chk_edit"]; if($chk_edit==1){ //เปลี่ยนรหัสผ่าน $now = date("Y-m-d H:i:s",time()); $pass = trim($_POST["s_apassword"]); if(!empty($pass)){ $pass = md5($pass); $sql = "update tbl_admin set user_password='$pass',udate='$now',user_update='$uname' where user_name='$uname' "; $dbquery = mysql_query($sql) or die("Can't send query !A"); include("Connections/close_db.php"); echo "<br />"; echo "<h3><p align=\"center\"><font color='#0000BB'>เปลี่ยนรหัสผ่านสำเร็จ</font></p></h3><br />"; echo "<meta http-equiv=\"refresh\" content=\"3;url=signout.php\">"; die; } else { include("Connections/close_db.php"); echo "<h3><p align=\"center\"><font color='#0000BB'>ไม่สามารถเปลี่ยนรหัสผ่านได้</font></p></h3><br />"; echo "<meta http-equiv=\"refresh\" content=\"5;url=changepass.php\">"; die; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><!-- InstanceBegin template="/Templates/template_a.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <!-- InstanceEndEditable --> <?php require_once('Connections/conndb.php'); mysql_select_db($database_conndb, $conndb); ?> <title>องค์การบริหารส่วนตำบลบางเตย ที่อยู่ 8/8 หมู่2 ตำบลบางเตย อำเภอเมืองฉะเชิงเทรา จังหวัดฉะเชิงเทรา 24000 ::www.bangtoey.go.th</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <link href="../styles.css" rel="stylesheet" type="text/css"> <!-- InstanceBeginEditable name="head" --><style type="text/css"> <!-- a:link { text-decoration: underline; } a:visited { text-decoration: underline; } a:hover { text-decoration: none; } a:active { text-decoration: underline; } --> </style><!-- InstanceEndEditable --> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #3CFFFF; } --> </style> <!--styles --> <link href="../styles.css" rel="stylesheet" type="text/css" /> <link href="../css/Hover%20Buttons.css" rel="stylesheet" type="text/css"/> <link href="../css/Hoverable-Sidenav.css" rel="stylesheet" type="text/css"/> <!--<script src="https://platform-api.sharethis.com/js/sharethis.js#property=5d255a83d97c100012d80679&product='inline-share-buttons' async='async" type='text/javascript'> --> </script> <!--styles --> <!--menutop hover --> <link href="../imagehover.css-master/css/demo-page.css" rel="stylesheet" media="all"> <link href="../imagehover.css-master/css/imagehover.min.css" rel="stylesheet" media="all"> <link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' /> <!--end --> <style type="text/css"> <!-- a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .style6 {color: #FFFFFF} --> </style></head> <body background="../images/0bg1.png" style="background-repeat:no-repeat; background-position:top"> <!--<div id="mySidenav" class="sidenav"> <a href="http://new.huayyai.go.th/index.php" id="about"> </a> <a href="http://new.huayyai.go.th/news.php?cat_id=1" id="blog"> </a> <a href="http://new.huayyai.go.th/news.php?cat_id=4" id="projects"> </a> <a href="http://new.huayyai.go.th/albums/index.php" id="contact"> </a> </div> --> <!-- content --> <div align="center"> <table width="950" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"><tr> <td height="650" align="center" valign="top" background="../images/head-1.png" style="background-repeat:no-repeat"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="515" align="center" valign="top"> </td> </tr> <tr> <td height="364" align="center" valign="top"><iframe src="/title_head.html" width="980" height="335" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe></td> </tr> <tr> <td align="center" valign="top"><iframe src="/menu-top.html" width="980" height="53" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe></td> </tr> <tr> <td height="150" align="center" valign="top"> </td> </tr> </table></td> </tr> </td> </tr> <tr> <td align="center" valign="top"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top"><!-- InstanceBeginEditable name="EditRegion3" --> <table width="95%" border="0" cellspacing="0"> <tr align="center" > <td height="22" align="left" class="styles1"> </td> </tr> <tr align="center" > <td height="22" align="left" class="styles1"><div align="right"><a href="main.php#top" class="styles1" style="color:#ffffff;">หน้า Admin</a> | <?if($ulevel==1){?> <a href="add_admin.php#top" class="styles1" style="color:#ffffff;">ข้อมูลผู้ดูแลระบบ</a> <?} else {?> <a href="changepass.php#top" class="styles1" style="color:#ffffff;">เปลี่ยนรหัสผ่าน</a> <?}?> | <a href="signout.php" class="styles1" style="color:#ffcc00;">ออกจากระบบ </a></div></td> </tr> <tr> <td align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <table width="100%" border="0" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF" class="box1"> <tr> <td width="100%" height="25" background="../images/bg4.gif" class="styles" ><div align="center" class="title3">เปลี่ยนรหัสผ่านผู้ดูแลระบบ</div></td> </tr> <form name="form1" method="post" action="changepass.php#top" onSubmit="return check();" autocomplete="off"> <tr> <td> <table width="100%" border="0" cellspacing="2" cellpadding="2" align="center"> <tr> <td align="right" width="40%">User name :: </td> <td><? echo $uname; ?></td> </tr> <tr> <td align="right">รหัสผ่านใหม่ :: </td> <td><input type="password" name="s_apassword" id="s_apassword" size=30 maxlength=35 ></td> </tr> <tr> <td align="right">ยืนยันรหัสผ่าน :: </td> <td><input type="password" name="c_apassword" id="c_apassword" size=30 maxlength=35 ></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2" align="center"> <input type="hidden" name="chk_edit" value="1"> <input type="submit" name="Submit" value="บันทึกข้อมูล"> </td> </tr> <tr> <td colspan="2"> </td> </tr> </table> </td> </tr> </form> </table> </td> </tr> </table> </td> </tr> <tr> <td align="center" valign="top"> </td> </tr> </table> <!-- InstanceEndEditable --></td> </tr> </table></td> </tr> <tr> <td align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top" style="background-repeat:no-repeat"><img src="../images/foot.png"></td> </tr> </table> </div> <!-- end_content --> <tr><td><a style="display:scroll;position:fixed;bottom:5px;right:5px;" class="backtotop" href="#top" rel="nofollow" title="Back to Top"><img src="../images/up.png" border="0" /></a></td> </tr> <map name="Map6" id="Map6"><area shape="rect" coords="210,1,302,41" href="http://www.tratlocal.go.th/index.php" target="_blank" /> </map> </body> <!-- InstanceEnd --></html> <? include("Connections/close_db.php"); } else { session_destroy(); include("Connections/close_db.php"); $message="Username or Password Incorrect !"; $url="index.php"; include "alert.php"; } ?>
©
2018.