<%
   '操作页面验证是否是合法用户：
  dim boollogin
    boollogin=false
  if Request.Cookies("username")<>"" and  Request.Cookies("usernames")<>"" and Request.Cookies("userlist")<>"" and Request.Cookies("userlists")<>"" then
   username=Request.Cookies("username")
   usernames=Request.Cookies("usernames")
   userlist=Request.Cookies("userlist")
   userlists=Request.Cookies("userlists")
   userip=Request.Cookies("userip")
   
  set rscook=server.CreateObject("adodb.recordset")
  sqlcook="select UserName,PassWord,Flag,LastLoginIp from Websen_worldec_master where id="&usernames
    rscook.open sqlcook,conn,1,1
   if not rscook.eof then
   'and rscook("LastLoginIp")=userip
    if rscook("UserName")=username and rscook("PassWord")=userlist      then
     boollogin=true
	else
	 boollogin=false
    end if
  
  	if numid<>"no" then
	if boollogin=true then
 	'权限限制^^^^^^^^^^^^^^^^^^^^
	 dim ishavegant
	 ishavegant=false
	 in_str=split(rscook("Flag"),",")
	 for each ins in in_str
	 if trim(ins)=numid  then 
	 ishavegant=true
	 end if
	 next 
	 if ishavegant=false then
	 if dir<>"no" then 
	 response.redirect dir
	 response.end
	 end if
	 end if
  	end if
	end if
    set rscook=nothing
   end if
   end if
   
     %>