son_account_modify.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:3k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("checks.php");
- $all_agent=$_SESSION["all_agent"];
- $agent_son=$_SESSION["all_agent_son"];
- $_SESSION["menus"]="子账号修改";
- include("../inc/conn.php");
- include("../inc/base_status.inc.php");
- if(isset($_GET["act"]))
- { $act=$_GET["act"];
- if($act=="mod")
- {
- $id=$_POST["id"];
- $username=$_POST["mod_account"];
- $mod_pwd1=$_POST["mod_pwd1"];
- $mod_pwd2=$_POST["mod_pwd2"];
- $password=md5($mod_pwd1);
- if($mod_pwd1==""||$mod_pwd2=="")
- {
- echo "请输入用户密码!";
- }elseif($mod_pwd1<>$mod_pwd2)
- {
- echo "两次密码不一致!";
- }else
- {
- $sqls=mysql_query("update son_account set password='$password' where account='$agent_son'",$conn);
- if($sqls) echo "修改成功!";
- }
- }
- }
- ?>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="../css/css.CSS" rel="stylesheet" type="text/css">
- <title></title>
- <style type="text/css">
- <!--
- body {
- margin-left: 10px;
- }
- -->
- </style></head>
- <body oncontextmenu="return false" onselectstart="return false"
- onkeydown="return (event.ctrlKey && event.keyCode == 78) ? false : true"
- ondragstart="return false" onmouseover="window.status=''; return true">
- <table width="645" height="53" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
- <tr>
- <td height="53" valign="top"><table width="645" height="53" border="0" cellpadding="0" cellspacing="1" class="t12">
- <tr class="t11">
- <td width="154" height="22"><div align="center" class="fw12">子账号</div></td>
- <td width="174"><div align="center" class="fw12">新密码</div></td>
- <td width="197"><div align="center" class="fw12">确认密码</div></td>
- <td width="120"><div align="center" class="fw12">功能</div></td>
- </tr>
- <form name="form2" method="post" action="son_account_modify.php?act=mod">
- <tr class="t17">
- <td height="28"><div align="center">
- <?=$agent_son?> </div></td>
- <td><div align="center">
- <input name="mod_pwd1" type="password" class="input" id="mod_pwd1" value="21223" size="16" maxlength="16" onClick="this.value='';">
- </div></td>
- <td><div align="center">
- <input name="mod_pwd2" type="password" class="input" id="mod_pwd2" value="12345" size="16" maxlength="16" onClick="this.value='';">
- </div></td>
- <td><div align="center">
- <input type="submit" name="Submit" value="修改">
- </div></td>
- </tr> </form>
- </table></td>
- </tr>
- </table>
- </body>
- </html>