📄 edituser.asp
字号:
<!--#INCLUDE FILE="conn.asp" -->
<!--#include file="ubbcode.asp" -->
<!--#include file="log_lib.asp" -->
<html>
<head>
<title><%=win_head%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="styles.css">
<script language="JavaScript">
function CheckForm()
{
if (document.Edituser.n_password.value.length != 0) {
if (document.Edituser.confirm_n_pw.value.length == 0) {
alert("请确认您的密码.");
document.Edituser.PW_Again.focus();
return false;
}
if (document.Edituser.n_password.value != document.Edituser.confirm_n_pw.value) {
alert("您两次输入的密码不一样!请重新输入.");
document.EditUser.n_password.focus();
return false;
}}
if (document.Edituser.email.value.length > 0 && !document.Edituser.email.value.match( /^.+@.+$/ ) ) {
alert("Email 错误!请重新输入");
document.Edituser.email.focus();
return false;
}
return true;
}
</script>
</head>
<body leftmargin="0" topmargin="0">
<%
if not instr(1,Request.ServerVariables("http_Referer"),Request.ServerVariables ("SERVER_NAME"),1)=8 then
message "DLOG错误:提交的数据来自网站外部"
response.end
end if
checkuser
dim un
un=replace(request("un"),"'","''")
if un="" then
Message("未指定用户")
Response.end
end if
if username<>un and isad<>-1 then
Message("你不能修改其他观员的资料")
Response.end
end if
sql="SELECT * FROM user_mdb WHERE username='"&un&"'"
set rs=conn.EXECUTE(sql)
if rs.bof then
Message("该用户名不存在")
response.End
else
%>
<table width="728" cellspacing="0" cellpadding="2">
<tr>
<td><p> </p>
<table width="650" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="<%=color1%>">
<form name="Edituser" method="POST" action="user_action.asp" onSubmit="return CheckForm();">
<tr>
<td colspan="2"> <b><font color="#000000">修改观员信息</font></b></td>
</tr>
<tr>
<td align="center" bgcolor="<%=color2%>">用
户 名</td>
<td bgcolor="<%=color2%>"><%=rs("username")%></td>
</tr>
<tr>
<td align="center" bgcolor="<%=color2%>">新
密 码</td>
<td bgcolor="<%=color2%>">
<input type="password" name="n_password"> <font color="#FF0000">(如不修改密码此项留空)</font></td>
</tr>
<tr>
<td align="center" bgcolor="<%=color2%>">确认密码</td>
<td bgcolor="<%=color2%>">
<input type="password" name="confirm_n_pw"> </td>
</tr>
<tr>
<td align="center" bgcolor="<%=color2%>">注册时间</td>
<td bgcolor="<%=color2%>"><%=rs("reg_time")%></td>
</tr>
<%if rs("isad")<>-1 then%>
<tr>
<td align="center" bgcolor="<%=color2%>">发表日志</td>
<td bgcolor="<%=color2%>"><%=rs("f_count")%></td>
</tr>
<%end if%>
<tr>
<td align="center" bgcolor="<%=color2%>">发表评论</td>
<td bgcolor="<%=color2%>"><%=rs("f_r_count")%></td>
</tr>
<tr>
<td align="center" bgcolor="<%=color2%>">QQ</td>
<td bgcolor="<%=color2%>">
<input type="text" name="qq" value=<%=rs("qq")%>>
</td>
</tr>
<tr>
<td align="center" bgcolor="<%=color2%>">邮 箱</td>
<td bgcolor="<%=color2%>">
<input type="text" name="email" value=<%=rs("email")%>>
</td>
</tr>
<tr>
<td align="center" bgcolor="<%=color2%>">主 页</td>
<td bgcolor="<%=color2%>">
<input type="text" name="homepage" value=<%=rs("homepage")%>>
</td>
</tr>
<tr>
<td align="center" bgcolor="<%=color2%>">备 注</td>
<td bgcolor="<%=color2%>">
<textarea name="underwrite" cols="60" rows="5" wrap="VIRTUAL" class="bk"><%=rs("underwrite")%></textarea>
</td>
</tr>
<tr>
<td height="40"><input type="hidden" name="edituser" value="true">
<input type="hidden" name="username" value="<%=rs("username")%>">
<input name="un" type="hidden" id="un" value="<%=request("un")%>">
</td>
<td height="40"><input type="submit" name="Submit" value=" 确 认 ">
<%if (isad=-1 and username<>un) or (isad>=0 and username=un) then%>
<input type="checkbox" name="del_user" value="true"> <font color="#FF0000">
打勾删除此观员信息</font>
<%end if%>
</td>
</tr>
</form>
</table></td>
</tr>
</table>
<%end if%>
<!--#include file="bottom.asp"-->
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -