<%
	'检查访问的来源是否合法
	'call checkPrePage()

	dim founduser,Errmsg
	founduser=false
	Errmsg=""

	dim master, master2, agent, agent1, agent2, agent3, agent4, UserLevelFlag
	master = false	'最高管理权，DBA
	master2 = false	'副总
	agent = false	'一级代理
	agent1 = false	'一级代理
	agent2 = false	'二级代理
	agent3 = false	'三级代理
	agent4 = false	'四级代理

	



	Function isLogin() '验证是否登陆
		isLogin = false
		if Cook_userid = "" or Cook_UserName = "" then


			isLogin = false
			exit Function
		end if
		isLogin = true
	end Function




	dim TellNotCUser
	TellNotCUser = "您现在还是普通用户，该功能是为高级用户配置的，请联系您的服务商。"

	function isCUser()
		dim TisC
		dim csql
		dim rcu

		isCUser = false
		csql = "select isC from [member] where name='" & Cook_UserName & "'"
		set rcu=server.createobject("adodb.recordset")
		rcu.Open csql,conn,1,1
		if rcu.bof or rcu.eof then
			rcu.close
			isCUser = false
			PrintMsg "没有找到该用户。"
		else
			TisC = rcu("isC")
			rcu.close
		end if
		set rcu=nothing

		if not TisC then		
			isCUser = false
		else
			isCUser = true
		end if
	end function



	function isTureUser( TestName )
		dim tsql
		dim rtu
		TestName = replace(TestName,"'","")

		isTureUser = false
		tsql = "select id from [member] where m_expire-getdate()>0 and m_name='" & TestName & "'"
		set rtu = server.createobject("adodb.recordset")
			rtu.open tsql,conn,1,1
			if rtu.bof or rtu.eof then
				isTureUser = false
			else
				isTureUser = true
			end if
			rtu.close
		set rtu = nothing
	end function




	'是否是发送给管理员
	function isSysMaster2( TestName )
		dim tsql
		dim rm
		TestName = replace(TestName,"'","")

		isSysMaster2 = false
		tsql = "select id from [member] where m_Adminflag<=2 and m_name='" & TestName & "'"
		set rm = server.createobject("adodb.recordset")
			rm.open tsql,conn,1,1
			if rm.bof or rm.eof then
				isSysMaster2 = false
			else
				isSysMaster2 = true
			end if
			rm.close
		set rm = nothing
	end function

%>