<%
if issession=0 then
gradeid=request.Cookies("gradeid")
if request.Cookies("gradeid")="" then
     gradeid=0
end if
else
gradeid=session("gradeid")
if session("gradeid")="" then
	 gradeid=0
end if
end if

 
  '初始设置函数----------------start-------------------------------------------------------
 function initdata(str,strs)
   if instr(trim(strs),str)>0 then
    resultval=1
    else
	resultval=0
    end if
	initdata=resultval
 end function
  '初始设置------------------start-------------------------------------------------------
 
 '-会员身份验证-------------------start--------------------------------------------------------------
 sub checkuser(str)
 if issession=0 then
 	 if request.Cookies("Yxmemberid")="" then
		response.write "<script language='javascript'>"
		response.write"parent.location.href='"&HOPE_InstallDir&"login/login1.asp';</SCRIPT>"
		response.end
	 end if

	if request.Cookies("yxFlag")<>1 then 
	response.write "<script language='javascript'>"
	response.write"parent.location.href='"&HOPE_InstallDir&"member/err.asp';</SCRIPT>"
	response.end
	end if 
 
 
 else
	 if session("id")="" then
		response.write "<script language='javascript'>"
		response.write"parent.location.href='"&HOPE_InstallDir&"login/login1.asp';</SCRIPT>"
		response.end
	 end if

	if session("yxflag")<>1 then 
	response.write "<script language='javascript'>"
	response.write"parent.location.href='"&HOPE_InstallDir&"member/err.asp';</SCRIPT>"
	response.end
	end if 
 
 end if

 
	 set rsl=server.CreateObject("adodb.recordset")
	 sqll=" select rolelist from Websen_vipgrade where roleid="&gradeid
	 rsl.open sqll,conn,1,1
	  if not rsl.eof then
	    rolelist=rsl("rolelist")
	    rsl.close
	  end if
	
	 if initdata(str,rolelist)=0 then 
	 response.Redirect(HOPE_InstallDir&"member/err.asp")
	 end if
 end sub
 '-会员身份验证-------------------end --------------------------------------------------------------
 
  %>