站点配置

<% dim rs,newname,old,username,sql,action action=oblog.filt_badstr(Request("action")) newname=oblog.filt_badstr(Trim(Request("newname"))) old=oblog.filt_badstr(Trim(Request("old"))) if old<>"" then set rs=oblog.execute("select userid from oblog_user where username='"&oblog.filt_badstr(old) & "'") if rs.eof then oblog.ShowMsg "原用户名不存在！","" end if end if if newname<>"" then set rs=oblog.execute("select userid from oblog_user where username='"&oblog.filt_badstr(newname) & "'") if not rs.eof then oblog.ShowMsg "新用户名已经存在！","" end if end if if Instr(newname,"=")>0 or Instr(newname,"%")>0 or Instr(newname,chr(32))>0 or Instr(newname,"?")>0 or Instr(newname,"&")>0 or Instr(newname,";")>0 or Instr(newname,",")>0 or Instr(newname,"'")>0 or Instr(newname,",")>0 or Instr(newname,chr(34))>0 or Instr(newname,chr(9))>0 or Instr(newname,"")>0 or Instr(newname,"$")>0 then oblog.ShowMsg "用户名含有非法字符！","" end if if action="DoUpdate" Then If Request.QueryString<>"" Then Response.End If newname="" Then oblog.ShowMsg "新用户名不能为空！","" End If If old="" Then oblog.ShowMsg "原用户名不能为空！","" End If If old=newname Then oblog.ShowMsg "原用户名与新用户名相同，无需更改！","" End If oblog.execute("update [oblog_user] set username='"&newname&"' where username='"&old&"'") oblog.execute("update [oblog_log] set author='"&newname&"' where author='"&old&"'") oblog.execute("update [oblog_comment] set comment_user='"&newname&"' where isguest=0 and comment_user='"&old&"'") oblog.execute("update [oblog_Albumcomment] set comment_user='"&newname&"' where isguest=0 and comment_user='"&old&"'") oblog.execute("update [oblog_message] set message_user='"&newname&"' where isguest=0 and message_user='"&old&"'") oblog.execute("update [oblog_pm] set sender='"&newname&"' where sender='"&old&"'") oblog.execute("update [oblog_pm] set incept='"&newname&"' where incept='"&old&"'") oblog.Execute ("UPDATE oblog_arguelist SET author='"&newname&"' WHERE author='"&old&"'") oblog.Execute ("UPDATE oblog_team SET managername='"&newname&"' WHERE managername='"&old&"'") oblog.Execute ("UPDATE oblog_team SET creatername='"&newname&"' WHERE creatername='"&old&"'") oblog.Execute ("UPDATE oblog_teampost SET author='"&newname&"' WHERE author='"&old&"'") EventLog "进行了用户名修改操作，新用户名："&newname&"，原用户名："&old&"","" Response.Write("
已经成功将用户名进行了更改！") else %>

- 更 改 用 户 名

说明： 本操作将更改用户名，请慎重操作。 原用户名： 新用户名： 用户名禁止特殊符号

<% end if %>