<%dim chkadmin
chkadmin=true
if session("adm_usr")="" or session("adm_pwd")="" then
	chkadmin=false
%>
<script language=vbscript>
  MsgBox "链接超时，请重新登录！"
  location.href = "login.asp"
</script>
<%
else
	dim rsu,sqlu,power
	sqlu="select top 1 Power,LockUser from UserInfo where IsAdmin=True and USR='"&session("adm_usr")&"' and PWD='"&session("adm_pwd")&"'"
	set rsu=conn.execute(sqlu)
	if rsu.eof and rsu.bof then
		chkadmin=false
%>
<script language=vbscript>
  MsgBox "请不要非法进入！"
  location.href = "login.asp"
</script>
<%	
	elseif rsu(1)=True then
		chkadmin=false
%>
<script language=vbscript>
  MsgBox "此用户已被锁定，请与管理员联系！"
  location.href = "login.asp"
</script>
<%
	else
		power=split(rsu(0),",")
	end if
	set rsu=nothing
end if
%>