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

📄 checkadmin.asp

📁 一个叫做雪人的论坛源码
💻 ASP
字号:
<%
if not session("sfadmin") then response.redirect("welcome.asp")

loginerr = true
StrSql = "select userid from sf_user where username = '" & session("sfadminname") & "' and password='" & session("sfadminpw") & "'"
Set rs = Conn.Execute(StrSql)
if not(rs.bof or rs.eof) then
	StrSql = "select * from sf_moderator where userid = " & rs("userid") & " and isadmin = 1"
	Set rs = Conn.Execute(StrSql)
	if not(rs.bof or rs.eof) then
		loginerr = false
	end if
end if

if loginerr then
	session("sfadmin") = false
	response.write "<TABLE width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""4"" align=""center"">"
	response.write "<TR align=""center""><TD bgcolor=""#D1E3BF"">错误: 无法确认您的管理员身份, 请<A href=""welcome.asp""><U>重新输入管理员信息</U></A></TD></TR></TABLE>"
	response.write "</BODY></HTML>"
	response.end
end if

''''''''''''''''''''''
' add adminlog
''''''''''''''
strsql = "insert into sf_adminlog(adminlogdate, username, userid, script, extrainfo, ipaddress) values("
strsql = strsql & "'" & now() & "', '" & session("sfadminname") & "', " & rs("userid") & ", '" & request.ServerVariables("SCRIPT_NAME") & "', "
' extrainfo
strsql = strsql & "' ', "
strsql = strsql & "'" & getipaddress() & "')"
Conn.Execute(strsql)
%>

⌨️ 快捷键说明

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