pwd.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. sesCheck();
  5. //入库操作开始
  6. if($_POST[jvs]=="password"){
  7. zwzr();
  8. $pwd=sha1(sqlzhuru($_POST[t1]));
  9. $pwd1=sha1(sqlzhuru($_POST[t2]));
  10. $pwd2=sqlzhuru($_POST[t2]);
  11. $uid=$_SESSION[SHOPUSER];
  12. if(panduan("*","yjcode_user where uid='".$uid."' and pwd='".$pwd."'")==0){Audit_alert("原密码验证失败,返回重试!","pwd.php");}
  13. updatetable("yjcode_user","pwd='".$pwd1."' where uid='".$_SESSION[SHOPUSER]."'");
  14. include("../tem/uc/pwd.php");
  15. $_SESSION["SHOPUSERPWD"]=$pwd1;
  16. php_toheader("pwd.php?t=suc");
  17. }
  18. //入库操作结束
  19. ?>
  20. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  21. <html xmlns="http://www.w3.org/1999/xhtml">
  22. <head>
  23. <meta http-equiv="x-ua-compatible" content="ie=7" />
  24. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  25. <title>用户管理面板 - <?=webname?></title>
  26. <? include("cssjs.html");?>
  27. <script language="javascript">
  28. function tj(){
  29. v=document.f1.t1.value;if(v.length == 0 || v.indexOf(" ")>=0){alert("请输入旧密码");document.f1.t1.focus();return false;}
  30. v=document.f1.t2.value;if(v.length == 0 || v.indexOf(" ")>=0){alert("请输入新密码");document.f1.t2.focus();return false;}
  31. if(document.f1.t2.value!=document.f1.t3.value){alert("两次输入的新密码不一致");document.f1.t3.focus();return false;}
  32. layer.msg('正在提交', {icon: 16 ,time: 0,shade :0.25});
  33. tjwait();
  34. f1.action="pwd.php";
  35. }
  36. </script>
  37. </head>
  38. <body>
  39. <? include("../tem/top.html");?>
  40. <? include("top.php");?>
  41. <div class="yjcode">
  42. <? include("left.php");?>
  43. <!--RB-->
  44. <div class="userright">
  45. <? include("rcap1.php");?>
  46. <script language="javascript">
  47. document.getElementById("rcap3").className="l1 l2";
  48. </script>
  49. <!--白B-->
  50. <div class="rkuang">
  51. <? systs("恭喜您,操作成功!","pwd.php")?>
  52. <form name="f1" method="post" onsubmit="return tj()">
  53. <input type="hidden" value="password" name="jvs" />
  54. <ul class="uk">
  55. <?
  56. while1("id,uid,pwd,shopzt","yjcode_user where uid='".$_SESSION[SHOPUSER]."'");$row1=mysql_fetch_array($res1);
  57. if(strcmp(sha1("123456"),$row1[pwd])==0){
  58. ?>
  59. <li class="l1">提示:</li>
  60. <li class="l21">尊敬的 <strong class="blue"><?=returnnc($luserid)?></strong>,为了您的帐户安全,请先修改密码(请勿使用123456这类简单的密码)</li>
  61. <? }?>
  62. <li class="l1"><span class="red" style="font-weight:normal;">*</span> 当前密码:</li>
  63. <li class="l2"><input type="password" class="inp" name="t1" /></li>
  64. <li class="l1"><span class="red" style="font-weight:normal;">*</span> 新密码:</li>
  65. <li class="l2"><input type="password" class="inp" name="t2" /></li>
  66. <li class="l1"><span class="red" style="font-weight:normal;">*</span> 确认密码:</li>
  67. <li class="l2"><input type="password" class="inp" name="t3" /></li>
  68. <li class="l3"><?=tjbtnr("保存修改")?></li>
  69. </ul>
  70. </form>
  71. </div>
  72. <!--白E-->
  73. </div>
  74. <!--RE-->
  75. </div>
  76. <div class="clear clear15"></div>
  77. <? include("../tem/bottom.html");?>
  78. </body>
  79. </html>