|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /var/www/html/eoffice/application/document/ |
Upload File : |
<?
session_start();
header("Last-Modified: ".gmdate( "D, d M Y H:i:s")."GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("content-type: application/x-javascript; charset=TIS-620");
include("../../config/config.inc.php");
include("../../common/function.php");
include("../../common/eoffice.inc.php");
$pwd_old = post_decode($_POST["pwd_old"]);
$pwd_new = post_decode($_POST["pwd_new"]);
$org_id = intval($_SESSION[session_dev_id]);
$id = $_SESSION[session_staffid];
$sql = " select * from `epm_staff` where password = '$pwd_old' and staffid='$id'; ";
$result = mysql_query($sql)or die("Query line " . __LINE__ . "<hr>".mysql_error());
$row = mysql_num_rows($result);
if($row >= 1){
$sql = " update `epm_staff` set password = '".$pwd_new ."' where staffid='$id'; ";
$update = mysql_query($sql)or die("Query line " . __LINE__ . "<hr>".mysql_error());
echo "<div align=\"center\"><img src=\"../../images/approve.gif\" width=\"18\" height=\"18\" align=\"absmiddle\" /> ";
echo "<font color='blue'>ทำการเปลี่ยน รหัสผ่านเรียบร้อยแล้ว</font></div>";
} else {
echo "<div align=\"center\"><font color='red'>รหัสผ่านของท่านไม่ถูกต้อง</font></div>";
}
?>