%
Server.ScriptTimeOut=99999
Const IconA=" "
Const IconE="
"
Const IconD="
"
Const IconH="
"
Dim Rs,AdminString
CheckAdmin()
Sub CheckAdmin()
Dim AdminName,AdminPassword
AdminName=MNBoard.GetMemor("Admin","AdminName")
AdminPassword=MNBoard.GetMemor("Admin","AdminPassword")
IF AdminName="" or AdminPassword="" Then
If Instr(PageURL,"admin_index.asp")>0 Then
Response.redirect"admin_login.asp"
Else
Head
ShowTable"限制进入","您还不是管理员,请先 【登陆】。"
MNBoard.netLog"!非法尝试进入后台失败!"
Footer
Response.end
End If
End If
If not MNBoard.Fun.CheckName(AdminName) or not MNBoard.Fun.CheckPassword(AdminPassword) then
Response.redirect"Admin_login.asp"
Response.end
End If
If MNBoard.Execute("Select name from [i_Admin] where Name='"&AdminName&"' and Password='"&AdminPassword&"' and boardID=0 ").eof Then
Response.redirect"admin_login.asp"
Response.end
End if
MNBoard.MyName=AdminName
AdminString=MNBoard.execute("select Strings From [i_Admin] where name='"&AdminName&"' And Password='"&AdminPassword&"' And boardID=0")(0)
End Sub
Sub CheckString(Flag)
If Instr(AdminString,","&Flag&",")=0 Then
Goback"对不起","你没有该页的操作权限!"
Footer
Response.end
End If
End Sub
Sub GoBack(Str1,Str2)
If Str1="" Then Str1="错误信息"
If Str2="" Then Str2="请填写完整必填项目"
Str2=Str2&" 返回重填"
Response.Write"