⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 update.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
?>

<html>
<head>
<title>修改密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body class="bodycolor" topmargin="5">

<?
//-------------输入合法性检验-------------------------------------------------
 if(strlen($PASS1)<6||strlen($PASS2)<6||strlen($PASS1)>20||strlen($PASS2)>20)
 {
    Message("错误","密码长度应6-20位!");
    Button_Back();
    exit;
 }

 $query = "SELECT * from USER where USER_ID='$LOGIN_USER_ID'";
 $cursor= exequery($connection,$query);

 if($ROW=mysql_fetch_array($cursor))
 {
  $PASSWORD=$ROW["PASSWORD"];

  if(crypt($PASS0,$PASSWORD)!= $PASSWORD)
  {
    Message("错误","输入的原密码错误!");
    Button_back();
    exit;
  }
 }


if($PASS1!=$PASS2)
{
  Message("错误","输入的新密码不一致!");
  Button_back();
  exit;
}

if(strstr($PASS1,"\'")!=false)
{
  Message("错误","新密码中含有非法字符");
  Button_back();
  exit;
}

if($PASS1==$PASS0)
{
  Message("错误","新密码不能与原密码相同!");
  Button_back();
  exit;
}

$PASS1=crypt($PASS1);

$CUR_TIME=date("Y-m-d H:i:s",time());
$query="update USER SET PASSWORD='$PASS1',LAST_PASS_TIME='$CUR_TIME' where USER_ID='$LOGIN_USER_ID'";
exequery($connection,$query);
Message("提示","用户密码已修改!");

add_log(14,"",$LOGIN_USER_ID);
?>

<div align="center">
 <input type="button" value="返回" class="BigButton" onClick="location='../'">
</div>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -