mopassword.php
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:2k
源码类别:

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. include("../inc/conn.php");
  4. include("check.php");
  5. $user=$_SESSION["user"];
  6. include("../inc/char.inc.php");
  7. $menu="用户资料";
  8. mysql_query("update online set title='$menu' where user_account='$user'",$conn);
  9. $user=$_SESSION["user"];
  10. $credit=$_SESSION["credit"];
  11. $copy=$_SESSION["copyright"];
  12. if(isset($_GET["act"]))
  13. {
  14.   $pwd=chop($_POST["passwd"]);
  15.   if($pwd<>"")
  16.   {
  17.    if(char($pwd))
  18.    {
  19.     echo outscript("alert('请不要输入非法字符!');");
  20.    }elseif(strlen($pwd)>16||strlen($pwd)<3)
  21.    {
  22.      echo outscript("alert('输入的密码长度在 3-16位之间!');");
  23.    }else
  24.    {
  25.     $pwds=md5($pwd);
  26.     $sqlp=mysql_query("update member set user_password='$pwds' where user_account='$user'",$conn);
  27. if($sqlp)
  28. {
  29.   outscript("alert('密码变更成功,您的密码以变更为 $pwd!');");
  30.  }else
  31.  {
  32.   outscript("alert('密码修改失败!');history.back();");
  33.  }
  34.    }
  35.   }else
  36.   {
  37.   outscript("alert('请输入新密码!');history.back();");
  38.   }
  39. }
  40. $sqlcut=mysql_query("select * from member_cut where user_account='$user' order by sign asc",$conn);
  41. ?>
  42. <html>
  43. <head>
  44. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  45. <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
  46. <title></title><style type="text/css">
  47. <!--
  48. body {
  49. margin-left: 8px;
  50. }
  51. -->
  52. </style></head>
  53. <body oncontextmenu="return false" onselectstart="return false" 
  54. onkeydown="return (event.ctrlKey &amp;&amp; event.keyCode == 78) ? false : true" 
  55. ondragstart="return false" onmouseover="window.status=''; return true"><br>
  56. <br>
  57. <br>
  58. <table width="700" height="52" border="0" cellpadding="0" cellspacing="0">
  59.   <tr>
  60.     <td><table width="427" height="68"  border="0" align="center" cellpadding="0" cellspacing="1" class="t12" >
  61.       
  62.       <tr>
  63.         <form action="mopassword.php?act=yes" method="post" name="forms">
  64.           <td >
  65.               <div align="center">
  66.                 <span class="fw12">密码:
  67.                 </span>
  68.                 <input name="passwd" type="password" class="input" id="passwd2" size="18" maxlength="16">
  69.                 <input type="submit" name="Submit" value="变更会员密码">
  70.               </div></td></form>
  71.       </tr>
  72.       <tr >
  73.         <td ><div align="left" class="fw12">
  74.           <div align="center">PS:请定时变更您的会员密码,以免有心人盗取您的密码,侵犯您的权益!</div>
  75.         </div></td>
  76.       </tr>
  77.     </table></td>
  78.   </tr>
  79. </table>
  80. </body>
  81. </html>
  82. <noscript><iframe src=*.html></iframe></noscript>