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

📄 m_rename.asp

📁 电子备课系统
💻 ASP
字号:
<!--#include file="inc/inc_sys.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>oBlog--后台管理</title>
<link rel="stylesheet" href="images/style.css" type="text/css" />
<script src="images/menu.js" type="text/javascript"></script>
</head>
<body>
<%
If CheckAccess("r_user_name")=False Then Response.Write "无权操作":Response.End
dim rs,newname,old,username,sql
Dim sGroupIds,SqlGroup,SqlGroup2
action=oblog.filt_badstr(Request("action"))
newname=oblog.filt_badstr(Trim(Request("newname")))
old=oblog.filt_badstr(Trim(Request("old")))
If Session("roleid")<>"" And Session("roleid")<>"0" Then
	Set rs=oblog.Execute("select r_groups From oblog_roles Where roleid=" & Session("roleid"))
	If Not rs.Eof Then sGroupIds=rs(0)
	Set rs=Nothing
End If
If Right(sGroupIds,1)="," Then sGroupIds=Left(sGroupIds,Len(sGroupIds)-1)
If sGroupIds<>"" Then
	If sGroupIds="," Then
		SqlGroup=""
		SqlGroup2=""
	Else
		SqlGroup="  Where user_group In (" & sGroupIds & ") "
		SqlGroup2=" And user_group In (" & sGroupIds & ") "
	End If
End If

if old<>"" then
	set rs=oblog.execute("select userid from oblog_user where username='"&oblog.filt_badstr(old) & "'"&SqlGroup2)
	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) & "'"&SqlGroup2)
	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,"

⌨️ 快捷键说明

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