<% 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"
"&Str1&"
×
"&str2&"
" End Sub Function GetRadio(Input_name,txt_Name,A,B) Dim temp On Error Resume Next'调试 If A="" Then A=0 If Int(A)=Int(B) then temp="checked " GetRadio=" "&txt_name&"" 'if err then Response.Write Input_name:Response.end End function Sub ShowTable(Str1,Str2) Response.Write"
"&Str1&"
"&str2&"
" End Sub Sub Suc(Str1,Str2,url) If Str1="" Then Str1="操作成功" If Str2="" Then Str2="成功的完成这次操作!" Str2=Str2&"返回继续管理" Response.Write"
"&Str1&"
"&str2&"
" End Sub Sub Head() Response.Write"" End Sub Sub Footer() Response.Write"
Copyright © 2006-2008 MNBoard.Net ,Inc. All rights reserved.
" Set Rs=Nothing Set MNBoard =Nothing End Sub Sub DIVTR(T1,T2,Str,H,show) Dim StyleH If T2<>"" Then T2="
"&T2&"
" StyleH="min-height:"&H&"px;" '识别IE浏览器 If MNBoard.MSIE Then StyleH=Replace(StyleH,"min-","") Response.Write"
"&T1&"
"&T2&"
"&str&"
" End Sub %>