Sys_Edit.asp
资源名称:NetPhone.rar [点击查看]
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:4k
源码类别:
IP电话/视频会议
开发平台:
ASP/ASPX
- <!--#include file="../../inc/conn.asp"-->
- <html>
- <head>
- <title>管理帐号修改</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <LINK REL="stylesheet" HREF="../images/style.css" TYPE="text/css"> <style type="text/css">
- <!--
- .style1 {
- color: #FFFFFF;
- font-weight: bold;
- }
- -->
- </style>
- </head>
- <body bgcolor="#FFFFFF" text="#000000">
- <table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr> <td> <%
- Dim User_ID
- User_ID=session("key")
- Dim User
- User=session("manage")
- dim rs
- if request.form("operation")="edit" then
- set rs=conn.execute("select admin,pwd from admin where admin='"&User&"'")
- if rs("pwd")<>request.form("oldpwd") then
- response.write"<script>alert('输入的旧密码有误!');history.go(-1);</script>"
- else
- set rs=conn.execute("update admin set admin='"&request.form("admin")&"',pwd='"&request.form("newpwd")&"' where admin='"&User&"'")
- response.write"<script>alert('帐号修改成功n新的帐号名称为"&request.form("admin")&"n新的登录密码为"&request.form("newpwd")&"');location.href='?';</script>"
- session("manage")=trim(request.form("admin"))
- end if
- end if
- if User_ID<>"" then
- set rs=conn.execute("select admin,pwd from admin where admin='"&User&"'")
- if not(rs.eof or rs.bof) then
- %> <form name="form1" method="post" action="?" onSubmit="return frmchk();"> <table width="100%" border="1" cellspacing="0" cellpadding="2" align="center" bordercolordark="#ffffff" bordercolorlight="#000000">
- <tr BGCOLOR="#23458B"> <td height="25" colspan="2"> <div align="center" class="style1">管理帐号修改</div></td>
- </tr>
- <tr> <td width="49%" height="25"> <div align="center">登录帐号</div></td><td width="51%" height="25"> <input type="text" name="admin" size="15" value="<%=session("manage")%>">
- <font color="#D71550"><font color="#EA2661">*</font></font> </td></tr> <tr> <td width="49%" height="25">
- <div align="center">旧的密码</div></td><td width="51%" height="25"> <input type="text" name="oldpwd" size="15">
- <font color="#D71550"> <font color="#EA2661">*</font></font> </td></tr> <tr> <td width="49%" height="25">
- <div align="center">新的密码</div></td><td width="51%" height="25"> <input type="text" name="newpwd" size="15">
- <font color="#D71550"><font color="#EA2661">*</font></font> </td></tr> <tr> <td width="49%" height="25">
- <div align="center">密码确认</div></td><td width="51%" height="25"> <input type="text" name="newpwd2" size="15">
- <font color="#D71550"><font color="#EA2661">*</font></font> </td></tr> <tr> <td height="25" colspan="2">
- <div align="center"> <input type="submit" name="Submit" value="修改"> <input type="button" value="取消" onClick="history.go(-1)" name="button">
- <input type="hidden" name="operation" value="edit"> </div></td></tr> </table><div align="center"><BR>说明:<font color="#D71550"><font color="#EA2661">*</font></font>为帐号修改必须填写的内容<br>
- <script language="JavaScript">
- function frmchk()
- {
- if (form1.admin.value == "")
- {
- alert("请填写管理帐号名称!");
- form1.admin.focus();
- return false;
- }
- if (form1.oldpwd.value == "")
- {
- alert("请填写原来密码!");
- form1.oldpwd.focus();
- return false;
- }
- if (form1.newpwd.value == "")
- {
- alert("请填写新的密码!");
- form1.newpwd.focus();
- return false;
- }
- if (form1.newpwd2.value == "")
- {
- alert("请填写确认密码!");
- form1.newpwd2.focus();
- return false;
- }
- if (form1.newpwd2.value != form1.newpwd.value)
- {
- alert("请填写两次输入的密码不一样!");
- form1.newpwd2.focus();
- return false;
- }
- }
- </script> </div></form><%else
- response.write "<script>alert('没有相关数据!');history.go(-1);</script>"
- end if
- else
- response.write "<script>alert('没有相关数据!');history.go(-1);</script>"
- end if
- %> </td></tr> </table>
- </body>
- </html>
- <%
- call COCLS
- %>