<!--#include file="../inc/Bll.asp"-->
<!--#include file="../inc/Constant.asp"-->
<!--#include file="../inc/Md5.asp"-->
<!--#include file="../inc/App.asp"-->
<%
Response.Addheader "Content-Type","text/html; charset=utf-8"  
Response.Expires = 0 
Response.Expiresabsolute = Now() - 1 
Response.AddHeader "pragma","no-cache" 
Response.AddHeader "cache-control","private" 
Response.CacheControl = "no-cache" 

Auto_Login2()

dim tRS,tArg,tValue
if Request.QueryString("ac")="getinfo" then 
	set tRS = GUInfoRS
	tArg = Split(Request.QueryString("Arg"),"|")
	tValue = Split(Request.QueryString("Value"),"|")
	for i=0 to ubound(tArg)
		Rw tArg(i)&"='"&tRS(tValue(i))&"';"
	next
	Rend
end if

if Request.QueryString("ac")="getuserclass" then 
	set tRS = GUClassInfoRS
	tArg = Split(Request.QueryString("Arg"),"|")
	tValue = Split(Request.QueryString("Value"),"|")
	for i=0 to ubound(tArg)
		Rw tArg(i)&"='"&tRS(tValue(i))&"';"
	next
	Rend
end if

if Request.QueryString("ac")="getpayclass" then 
	set tRS = GPayClassInfoRS
	tArg = Split(Request.QueryString("Arg"),"|")
	tValue = Split(Request.QueryString("Value"),"|")
	for i=0 to ubound(tArg)
		Rw tArg(i)&"='"&tRS(tValue(i))&"';"
	next
	Rend
end if

if Request.QueryString("ac")="getincomeclass" then 
	set tRS = GIncomeClassInfoRS
	tArg = Split(Request.QueryString("Arg"),"|")
	tValue = Split(Request.QueryString("Value"),"|")
	for i=0 to ubound(tArg)
		Rw tArg(i)&"='"&tRS(tValue(i))&"';"
	next
	Rend
end if

function Ismanager(UID,RID)
	dim m
	Set RS=DB_CONN.EXECUTE("select top 1 * ,(select CharIndex('|"&UID&"|',[i_Sys_Room_ManagerUsers])) as 'ismanager' from [i_Sys_Room] where [i_Sys_Room_ID]="&RID)
	m = RS("ismanager")
	if cint(m)>0 then 
		Ismanager = "true"
	else
		Ismanager = "false"
	end if
end function

if Session(Session_UserID_Arg)<>"" then
	Rw "iInfo.IsLogin=true;"
	Rw "iInfo.UserID='"&Session(Session_UserID_Arg)&"';"
	Rw "iInfo.RoomID='"&Session(Session_RoomID_Arg)&"';"
	Rw "iInfo.UserNickName='"&Session(Session_UserNickName_Arg)&"';"
	Rw "iInfo.FacePic='"&Session(Session_UserFace_Arg)&"';"
	Rw "iInfo.LevelClass='"&GetUserPaymentLevelInfo("","i_User_PaymentLevel_Style")&"';"
	Rw "iInfo.VIPIcon='"&GetClassInfo("i_User_Class_Style")&"';"
	Rw "iInfo.InComeClass='"&Session(Session_UserIncomeLevel_Arg)&"';"
	RW "iInfo.LevelID="&Clng(GetUserPaymentLevelInfo(0,"i_User_PaymentLevel_Sort"))+Clng(GetClassInfo("i_User_Class_SortValue"))&";"
	Rw "iInfo.LoginTime='"&Session(Session_LogTime_Arg)&"';"
	Rw "iInfo.LoginIP='"&Session(Session_LogIP_Arg)&"';"
	Rw "iInfo.MoneyNum='"&GUInfo("i_User_Money")&"';"
	Rw "iInfo.IsManager="&Ismanager(Session(Session_UserID_Arg),Request.QueryString("rid"))&";"
	Rw "iInfo.PayStar='"&GetUserPayStar(Session(Session_UserID_Arg))&"';"
else
	Rw "iInfo.IsLogin=false;"
	Rw "iInfo.UserID=getGUID();"
	Rw "iInfo.RoomID='0';"
	Rw "iInfo.UserNickName='游客'+iInfo.UserID;"
	Rw "iInfo.FacePic='"&Session(Session_UserFace_Arg)&"';"
	Rw "iInfo.LevelClass='"&Session(Session_UserPaymentLevel_Arg)&"';"
	Rw "iInfo.InComeClass='"&Session(Session_UserIncomeLevel_Arg)&"';"
	RW "iInfo.LevelID=0;"
	Rw "iInfo.LoginTime='"&Session(Session_LogTime_Arg)&"';"
	Rw "iInfo.LoginIP='"&Session(Session_LogIP_Arg)&"';"
	Rw "iInfo.MoneyNum='0';"
	Rw "iInfo.IsManager=false;"
	Rw "iInfo.PayStar='/images/pixel.gif';"
end if
Rend

%>