⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sysadm_modiuser.asp

📁 酷虎网同学录V1.0
💻 ASP
字号:
<!--#INCLUDE FILE="setup.asp" -->
<!--#include file=char.asp-->
<!--#include file=checkuser.asp-->
<title><%=SchoolmateName%>--管理页面</title>
<!--#include file="css.asp"-->

<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 bgcolor=<%=bodycolor%>>
<%
	if  not sysadmin or session("adminlogin")<>"OK" then
		Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。"
		call Error("Information",errmsg)
	else
		call main()
		set rs=nothing
		conn.close
		set conn=nothing
	end if

	sub main()
%><BR>
<table cellpadding=0 cellspacing=0 border=0 width=90% bgcolor=<%=tablebordercolor%> align=center>
  <tr>
    <td>
      <table cellpadding=3 cellspacing=1 border=0 width=100%>
        <tr bgcolor='<%=Tabletitlecolor%>'>
        <td><font color="<%=TablefontColor%>">欢迎<b><%=membername%></b>进入管理页面</font>
        </td>
        </tr>
            <tr bgcolor=<%=tablebodycolor2%>>
              <td width="100%" valign=top><font color="<%=TableContentColor%>">
<%
if request("action")="save" then
call update()
else
call userinfo()
end if
%></font>
	      </td>
            </tr>
        </table>
        </td>
    </tr>
</table>
<%
end sub

sub userinfo()
	set rs=server.createobject("adodb.recordset")
	sql="Select * from [student] where userid='"&trim(request("name"))&"'"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		errmsg=errmsg+"<br>"+"<li>该用户名不存在。"
		call error(errmsg)
		exit sub
	else
%>
<BR>
<form method="POST" action=sysadm_modiuser.asp?action=save>
<table width="95%" border="0" cellspacing="1" cellpadding="3"  align=center bgcolor=<%=Tablebordercolor%>>
<tr bgcolor=<%=Tabletitlecolor%>> 
<td height="11" colspan="2" ><font color="<%=TableContentColor%>"><b><%=htmlencode(rs("userid"))%>的个人资料</b></font></td>
</tr>
<tr  bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="18"><font color="<%=TableContentColor%>">用户名</font></td>
<td width="59%" height="18"> 
<%=htmlencode(rs("userid"))%>
<input type="hidden" name="Name" size="35" value="<%=request("name")%>">
</td>
</tr>
<tr   bgcolor=<%=Tablebodycolor2%> >
<td width="41%" height="18"><font color="<%=TableContentColor%>">用户密码</font></td>
<td width="59%" height="18"> 
        <input type="text" name="userpwd" size="35" value="<%=htmlencode(rs("userpwd"))%>">
</td>
</tr>
<tr  bgcolor=<%=Tablebodycolor2%>> 
<td height="11" ><font color="<%=TableContentColor%>">真实姓名</font></td>
<td height="11" > 
<input type="text" name="realname" size="35" value="<%=rs("realname")%>">
</td>
</tr>

<tr  bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="18"><font color="<%=TableContentColor%>">邮件地址</font></td>
<td width="59%" height="18"> 
<input type="text" name="Email" size="35" value="<%=rs("Email")%>">
</td>
</tr>
<tr   bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="18"><font color="<%=TableContentColor%>">个人主页</font></td>
<td width="59%" height="18"> 
<input type="text" name="homepage" size="35" value="<%=rs("homepage")%>">
</td>
</tr>
<tr  bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="8"><font color="<%=TableContentColor%>">用户积分</font></td>
<td width="59%" height="-2"> 
<input type="text" name="point" size="35" value="<%=rs("point")%>">
</td>
</tr>
<tr  bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="18"><font color="<%=TableContentColor%>">锁定用户</font></td>
<td width="59%" height="18"> 
<select name="locked" <%if trim(request("name"))=membername then response.write "disabled"%>>
<option value="0" <%if rs("locked")=false then%>selected<%end if%>>否 
<option value="1" <%if rs("locked")=true then%>selected<%end if%>>是 
</select>
</td>
</tr>
<tr bgcolor=<%=Tabletitlecolor%>> 
<td height="23" colspan="2" > 
<input type="submit" name="Submit" value="更 新">
</td>
</tr>
</table>
</form>
<%
	end if
	rs.close
	set rs=nothing
end sub

sub update()
	set rs=server.createobject("adodb.recordset")
	sql="Select * from [student] where userid='"&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
	if request.form("locked")="0" or request.form("locked")="" then
	locked=false
	else
	locked=true
	end if
		rs("userpwd")=request.form("userpwd")
		rs("realname")=request.form("realname")
		rs("email")=request.form("email")
		rs("homepage")=request.form("homepage")
		rs("point")=request.form("point")
		rs("locked")=locked
		rs.update
        rs.close
	end if
	set rs=nothing
%><center><p><b>更新用户数据成功!</b>
<%
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -