<!--#include file="inc/conn.asp"-->
<%
call ConnectionDatabase

if Session("Usr_UserName") = "" or Session("Usr_userid") = "" then
response.write "<script>alert('权限不够或者未登录,请重新登录！');parent.location.href='/user/login.asp'</script>"
                            response.end
	                    end if
						
If Session("Usr_Username")<>"" Then
	set Rs=GrateRs("select * from member where username like '"&trim(Session("Usr_UserName"))&"'",1)
	If Rs.Eof Then	Call MSGShow(0)
end if
	
Sub MSGShow(Er)
    response.write "<script>alert('权限不够或者未登录,请重新登录！');parent.location.href='/user/login.asp'</script>"
    response.end
End Sub


Private Function getIP()
	Dim strIPAddr
	If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), "unknown") > 0 Then
		'strIPAddr = Request.ServerVariables("REMOTE_ADDR")
		strIPAddr = Request.ServerVariables("HTTP_Cdn-Src-Ip")
		If strIPAddr = "" Then strIPAddr = Request.ServerVariables("REMOTE_ADDR")
	ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",") > 0 Then
		strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",")-1)
	ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";") > 0 Then
		strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";")-1)
	Else
		strIPAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
	End If
	getIP = Trim(Mid(strIPAddr, 1, 30))
End Function 


%>