📄 admin_modiuser_0.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file=inc/char.asp-->
<!--#include file=admin_left.asp-->
<!--#include file=inc/grade.asp-->
<title><%=ForumName%>--管理页面</title>
<link rel="stylesheet" type="text/css" href="forum.css">
<BODY bgcolor="#ffffff" alink="#333333" vlink="#333333" link="#333333" topmargin="20">
<%
if session("masterlogin")="" then
Errmsg=Errmsg+"<br>"+"<li>本页面为版主专用,请<a href=elogin.asp>登陆管理</a>后进入。"
call Error()
else
%>
<%
dim Errmsg
set rs=server.createobject("adodb.recordset")
call main()
set rs=nothing
conn.close
set conn=nothing
end if
sub main()
%>
<table cellpadding=0 cellspacing=0 border=0 width=95% bgcolor=<%=atablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr bgcolor='<%=aTabletitlecolor%>'>
<td align=center colspan="2">欢迎<b><%=session("mastername")%></b>进入管理页面
</td>
</tr>
<tr bgcolor=<%=tablebodycolor%>>
<td width="20%" valign=top>
<%call left()%>
</td>
<td width="80%" valign=top>
<%
if request("action")="save" then
call update()
else
call userinfo()
end if
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
end sub
sub userinfo()
sql="Select * from [User] where username='"&trim(request("name"))&"'"
rs.open sql,conn,1,1
if rs.eof and rs.bof or rs("userclass")=user_level8 or rs("userclass") = userlevel9 then
errmsg=errmsg+"<br>"+"<li>该用户名不存在,或者您没有对该用户操作的权限!。"
call error()
exit sub
else
%>
<form method="POST" action=admin_modiuser_0.asp?action=save>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align=center bordercolor=<%=aTablebackcolor%>>
<tr bgcolor=<%=aTabletitlecolor%>>
<td height="23" colspan="2" ><font color=<%=TableFontcolor%>><b><%=htmlencode(rs("username"))%>的个人资料</b></font></td>
</tr>
<tr>
<td width="41%" height="18">用户名</td>
<td width="59%" height="18">
<%=htmlencode(rs("username"))%>
<input type="hidden" name="Name" size="35" value="<%=request("name")%>">
</td>
</tr>
<tr>
<td width="41%" height="18">用户密码</td>
<td width="59%" height="18">
XXXXXX
</td>
</tr>
<tr>
<td width="41%" height="18">邮件地址</td>
<td width="59%" height="18">
<%=rs("userEmail")%>
</td>
</tr>
<tr>
<td width="41%" height="18">个人主页</td>
<td width="59%" height="18">
<%if rs("homepage")="" then%>
<%Response.Write "无"%>
<%else%>
<%=rs("homepage")%>
<%end if%>
</td>
</tr>
<tr>
<td width="41%" height="18">发表文章</td>
<td width="59%" height="18">
<strong><font color=red><%=rs("article")%></font></strong>
</td>
</tr>
<tr>
<td width="41%" height="18">用户等级</td>
<td width="59%" height="18">
<select name="userclass">
<option value="<%=user_level1%>" <%if rs("userclass")=user_level1 then%>selected<%end if%>><%=user_level1%>
<option value="<%=user_level2%>" <%if rs("userclass")=user_level2 then%>selected<%end if%>><%=user_level2%>
<option value="<%=user_level3%>" <%if rs("userclass")=user_level3 then%>selected<%end if%>><%=user_level3%>
<option value="<%=user_level4%>" <%if rs("userclass")=user_level4 then%>selected<%end if%>><%=user_level4%>
<option value="<%=user_level5%>" <%if rs("userclass")=user_level5 then%>selected<%end if%>><%=user_level5%>
<option value="<%=user_level6%>" <%if rs("userclass")=user_level6 then%>selected<%end if%>><%=user_level6%>
<option value="<%=user_level7%>" <%if rs("userclass")=user_level7 then%>selected<%end if%>><%=user_level7%>
</select>
</td>
</tr>
<tr>
<td width="41%" height="18">锁定用户</td>
<td width="59%" height="18">
<select name="lockuser">
<option value="0" <%if rs("lockuser")=0 then%>selected<%end if%>>否
<option value="1" <%if rs("lockuser")=1 then%>selected<%end if%>>是
</select>
</td>
</tr>
<tr bgcolor=<%=aTabletitlecolor%>>
<td height="23" colspan="2" ><input type="submit" name="Submit" value="更 新"></td>
</tr>
</table>
</form>
<%
end if
rs.close
end sub
sub update()
sql="Select * from [User] where username='"&trim(request("name"))&"'"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
errmsg=errmsg+"<br>"+"<li>该用户名不存在。"
call error()
exit sub
else
rs("userclass")=request("userclass")
rs("lockuser")=request("lockuser")
rs.update
rs.close
end if
%><center><p><b>更新用户数据成功!</b>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -