<!--#include file="../inc/Bll.asp"-->
<!--#include file="../inc/Constant.asp"-->
<!--#include file="../inc/Md5.asp"-->
<!--#include file="../inc/App.asp"-->
<%
Auto_Login()

'注册验证
LocalValid
'整合应用登录
i_Syn_Notify_Modify_PassOrMail Session(Session_UserName_Arg),"",t_UserMail
'本地数据登录
LocalModify

dim t_Height,t_Weight,t_BWH,t_Label,t_Birthday,t_QQ,t_UserMail,t_Site,t_Face,t_GoUrl,t_UserNickName,t_BankInfo
'本地数据验证
Sub LocalValid()
	'验证数据
	if request.form("ac")<>"Modify" then Rws "alert('非法请求!');":Rend
	t_UserNickName = CheckSub(vNickName,request.form("UserNickName"),"昵称格式有误") '验证昵称
	t_Height = Get_SafeStr(Request.form("UserHeight"))
	t_Weight = Get_SafeStr(Request.form("UserWeight"))
	t_BWH = Get_SafeStr(Request.form("UserBWH"))
	t_Label = Get_SafeStr(Request.form("UserLabel"))
	t_Birthday = Get_SafeStr(Request.form("UserBirthday"))
	t_QQ = Get_SafeStr(Request.form("UserQQ"))
	t_UserMail = Get_SafeStr(Request.form("UserMail"))
	t_Site = Get_SafeStr(Request.form("UserSite"))
	t_Face = Get_SafeStr(Request.form("tUserFace"))
	t_GoUrl = Get_SafeStr(Request.form("GoUrl"))
	t_BankInfo = Get_SafeStr(Request.form("BankInfo"))
End Sub

'本站数据注册
Sub LocalModify()
	RS_End
	RS.OPEN "select top 1 * from [i_User_Info] where [i_User_ID]="&Session(Session_UserID_Arg) , DB_CONN , 1 , 3
	if RS.recordcount>0 then
		if RS("i_User_IsLock")=1 then Rws "alert('您的账户已被锁定,请联系管理员!');history.back();":Rend
		'验证成功
		RS("i_User_NickName") = vbsEscape(t_UserNickName)
		RS("i_User_Height") = t_Height
		RS("i_User_Weight") = t_Weight
		RS("i_User_BWH") = t_BWH
		RS("i_User_Label") = t_Label
		RS("i_User_Birthday") = t_Birthday
		RS("i_User_QQ") = t_QQ
		RS("i_User_Mail") = t_UserMail
		RS("i_User_Face") = t_Face
		RS("i_User_Site") = t_Site
		if(Cstr(RS("i_User_Signing"))="1") then RS("i_User_BankInfo") = t_BankInfo
		RS.Update()
		Session(Session_UserNickName_Arg)=t_UserNickName
		Session(Session_UserFace_Arg)=t_Face
		RS_End
		
		CreatRoomInfoJSFiel
		
		RWS "location.href='"&Request.Form("GoUrl")&"';"
		Rend
	else
		Rw "alert('您尚未登录或登录超时过期');history.back();":Rend
	end if
End Sub

Sub CreatRoomInfoJSFiel()
	RS_End
	dim SumPay,SumIncome,CurrentPage,k,Re,RID,isManager,UID
	Re="var DRoomJS=""{data:["
	Set RS=DB_CONN.EXECUTE("select a.*,b.* from [i_User_Info] a join [i_Sys_Room] b on a.[i_User_ID]=b.[i_Sys_Room_AdminUserID] where a.[i_User_ID]="&Session(Session_UserID_Arg))
	while (not RS.eof)
		Re=Re&"{face:'"&RS("i_User_Face")&"',unick:'"&RS("i_User_NickName")&"',uid:'"&RS("i_User_ID")&"',rname:'"&RS("i_Sys_Room_Name")&"',pubnotice:'"&RS("i_Sys_Room_PubNotice")&"',pubnoticehref:'"&RS("i_Sys_Room_PubNoticeHref")&"',prinotice:'"&RS("i_Sys_Room_PriNotice")&"',prinoticehref:'"&RS("i_Sys_Room_PriNoticeHref")&"',background:'"&RS("i_Sys_Room_BackGround")&"',backgroundfix:'"&RS("i_Sys_Room_BackGroundFix")&"',styletop:'"&RS("i_Sys_Room_StyleTop")&"',stylecss:'"&RS("i_Sys_Room_StyleCss")&"',maxnum:"&RS("i_Sys_Room_MaxNum")&"}"
		RS.MoveNext
	Wend
	Re=Re&"]}"";"
	RS_End
	
	dim objStream,strFile
	strFile=server.mappath("/d/room/"&Session(Session_RoomID_Arg)&".js")
	Set objStream = Server.CreateObject("ADODB.Stream")
	With objStream
        .Type = 2
        .Open
        .Charset = "utf-8"
        .Position = objStream.Size
        .WriteText = Re
        .SaveToFile strFile,2
        .Close
    End With
    Set objStream = Nothing
End Sub
%>