📄 admin_rename.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="Admin_Chkpass.asp"-->
<link href="Admin_STYLE.CSS" rel="stylesheet" type="text/css">
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" class="bgcolor">
<%
dim action,rs,newname,old
action=request("action")
newname=trim(request("newname"))
old=trim(request("old"))
if action="DoUpdate" then
If newname="" Then
Response.Write("<script language=javascript>alert('新用户名不能为空!');history.back();</script>")
Response.End()
End If
If old="" Then
Response.Write("<script language=javascript>alert('原用户名不能为空!');history.back();</script>")
Response.End()
End If
conn.execute("update [user] set username='"&newname&"' where username='"&old&"'")
conn.execute("update [blog] set username='"&newname&"' where username='"&old&"'")
conn.execute("update [blog] set author='"&newname&"' where author='"&old&"'")
conn.execute("update [comment] set mainuser='"&newname&"' where mainuser='"&old&"'")
conn.execute("update [comment] set comment_user='"&newname&"' where comment_user='"&old&"'")
conn.execute("update [message] set mainuser='"&newname&"' where mainuser='"&old&"'")
conn.execute("update [message] set message_user='"&newname&"' where message_user='"&old&"'")
conn.execute("update [subject] set username='"&newname&"' where username='"&old&"'")
response.Write("<br>已经成功将用户名进行了更改!")
else
%>
<title>用户改名</title><form name="form1" method="post" action="">
<br>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
<tr align="center" class="title">
<td height="22" colspan="2"><strong><font color="#FFFFFF">更 新 系 统 数 据</font></strong></td>
</tr>
<tr class="tdbg">
<td colspan="2"><p>说明:
本操作将更改用户名,请慎重操作。</p>
<p>原用户名:
<input name="old" type="text" id="old">
<br>
新用户名:
<input name="newname" type="text" id="newname">
用户名禁止特殊符号<br>
</p></td>
</tr>
<tr class="tdbg">
<td height="25"> </td>
<td height="25"><input name="Submit" type="submit" id="Submit" value="改名">
<input name="Action" type="hidden" id="Action" value="DoUpdate"></td>
</tr>
</table>
</form>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -