📄 edit.asp
字号:
<!--#include file="base.asp"-->
<html>
<head>
<title>修改管理员资料</title>
<script language="javascript">
function Check(form){
if(form1.ifshow.value=="1"){
alert("测试版不能修改管理员资料!!");
return false;
} else if(form1.password.value==""){
alert("请输入管理员密码!!");
return false;
}else {return true;}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%
action=request("action")
if action="" then
username=session("username")
sql = "select * from admins WHERE name='"&username&"'"
rs.Open sql,conn,1,2
%>
<body bgcolor="#FFFFFF" text="#000000">
<div align="center"> <h3><font color="#0000CC">修改管理员资料</font></h3><form name="form1" method="post" action="edit_ok.asp" onSubmit="return Check(this) ">
<table width="37%" border="1" cellspacing="1" cellpadding="0">
<tr bgcolor="#FFCC66">
<td width="41%" height="29"> <div align="center">您的姓名:</div></td>
<td width="59%" height="29"> <input type="text" name="name" size="16" value="<%=rs("name")%>">
</td>
</tr>
<tr bgcolor="#66CC33">
<td width="41%" height="33"> <div align="center">您的密码:</div></td>
<td width="59%" height="33"> <input type="text" name="password" size="16" value="<%=rs("passwd")%>">
<input name="ifshow" type="hidden" id="ifshow" value="1"> </td>
</tr>
</table>
<p> <input type="submit" name="Submit" value="确定"> <input type="reset" name="Submit2" value="取消">
</p></form><h3> </h3></div><% else %>
<% if session("adminflag")=1 then %>
<div align="center"> <h3><font color="#0000CC">新增管理员</font></h3><form name="form1" method="post" action="add_ok.asp" onSubmit="return Check(this) ">
<table width="46%" border="1" cellspacing="1" cellpadding="0">
<tr bgcolor="#FFCC66">
<td width="41%" height="29"> <div align="center">新管理员的姓名:</div></td>
<td width="59%" height="29"> <input type="text" name="name" size="16">
</td>
</tr>
<tr bgcolor="#66CC33">
<td width="41%" height="33"> <div align="center">新管理员的密码:</div></td>
<td width="59%" height="33"> <input type="password" name="password" size="16">
</td>
</tr>
<tr bgcolor="#66CC33">
<td height="33" bgcolor="#FFCC66"><div align="center">管理权限:</div></td>
<td height="33" bgcolor="#FFCC66"><select name="myid" id="myid">
<option value="4" selected>用户</option>
<option value="3">管理员</option>
<option value="2">副站长</option>
<option value="1">站长</option>
</select><input name="ifshow" type="hidden" id="ifshow" value="1"></td>
</tr>
</table>
<p> <input type="submit" name="Submit" value="确定"> <input type="reset" name="Submit2" value="取消">
</p></form><h3> </h3></div><%
else
Call PrintMsg(NotAdmin)
end if
end if %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -