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

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. include("checks.php");
  4. $all_agent=$_SESSION["all_agent"];
  5. $agent_son=$_SESSION["all_agent_son"];
  6. $_SESSION["menus"]="子账号修改";
  7. include("../inc/conn.php");
  8. include("../inc/base_status.inc.php");
  9. if(isset($_GET["act"]))
  10. { $act=$_GET["act"];
  11.  if($act=="mod")
  12.  {
  13.  $id=$_POST["id"];
  14.  $username=$_POST["mod_account"];
  15.  $mod_pwd1=$_POST["mod_pwd1"];
  16.  $mod_pwd2=$_POST["mod_pwd2"];
  17.  $password=md5($mod_pwd1);
  18.    if($mod_pwd1==""||$mod_pwd2=="")
  19.    {
  20.     echo "请输入用户密码!";
  21.    }elseif($mod_pwd1<>$mod_pwd2)
  22.    {
  23.     echo "两次密码不一致!";
  24.    }else
  25.    {
  26.    $sqls=mysql_query("update son_account set password='$password' where account='$agent_son'",$conn);
  27.    if($sqls) echo "修改成功!";
  28.    }
  29.  }
  30. }
  31. ?>
  32. <html>
  33. <head>
  34. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  35. <link href="../css/css.CSS" rel="stylesheet" type="text/css">
  36. <title></title>
  37. <style type="text/css">
  38. <!--
  39. body {
  40. margin-left: 10px;
  41. }
  42. -->
  43. </style></head>
  44. <body oncontextmenu="return false" onselectstart="return false" 
  45. onkeydown="return (event.ctrlKey &amp;&amp; event.keyCode == 78) ? false : true" 
  46. ondragstart="return false" onmouseover="window.status=''; return true">
  47. <table width="645" height="53" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
  48.   <tr>
  49.     <td height="53" valign="top"><table width="645" height="53" border="0" cellpadding="0" cellspacing="1" class="t12">
  50.       <tr class="t11">
  51.         <td width="154" height="22"><div align="center" class="fw12">子账号</div></td>
  52.         <td width="174"><div align="center" class="fw12">新密码</div></td>
  53.         <td width="197"><div align="center" class="fw12">确认密码</div></td>
  54.         <td width="120"><div align="center" class="fw12">功能</div></td>
  55.       </tr>
  56. <form name="form2" method="post" action="son_account_modify.php?act=mod">
  57.   <tr class="t17">
  58.         <td height="28"><div align="center">
  59.           
  60.        <?=$agent_son?> </div></td>
  61.         <td><div align="center">
  62.           <input name="mod_pwd1" type="password" class="input" id="mod_pwd1" value="21223" size="16" maxlength="16" onClick="this.value='';">
  63.         </div></td>
  64.         <td><div align="center">
  65.           <input name="mod_pwd2" type="password" class="input" id="mod_pwd2" value="12345" size="16" maxlength="16" onClick="this.value='';">
  66.         </div></td>
  67.         <td><div align="center">
  68.           <input type="submit" name="Submit" value="修改">&nbsp;
  69.         </div></td>
  70.       </tr> </form>
  71.     </table></td>
  72.   </tr>
  73. </table>
  74. </body>
  75. </html>