<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<!--#include file="../apibbs/setbbs.asp"-->
<!--#include file="../apibbs/bbsconn.asp"-->
<!--论坛数据库链接-->
<!--#include file="../inc/md5.asp"-->
<%
	if issession=0 then
	 if request.Cookies("Yxmemberid")="" then
    response.write "<script language='javascript'>"
	response.write"parent.location.href='../login/login1.asp';</SCRIPT>"
	response.end
    end if
	username=Replace_Text(request.Cookies("Yxmember"))
	gsid=Replace_Text(request.Cookies("Yxmemberid"))
	else
	if session("id")="" then
    response.write "<script language='javascript'>"
	response.write"parent.location.href='../login/login1.asp';</SCRIPT>"
	response.end
    end if
	username=session("user")
	gsid=session("id")
	end if 
	
'整合论坛开始==========================================
if OpenBBS<>0 then 
sql="select * from Websen_corporation where id="&gsid&""

Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
	if  rs.eof or rs.bof then 
	response.write"<SCRIPT language=JavaScript>alert('用户不存在！！');"
	response.write"javascript:history.go(-1)</SCRIPT>"
	response.end 
	else
	qyjj=rs("qyjj")
	DVbbs_Password=rs("Pass")
	email=rs("Email")
	ch=rs("ch")
	end if 
end if 

' /////////////////////BBS论坛(GOOD论坛) Begin//////////////////////////////////////

if OpenBBS=1 then 
	
		if Request.ServerVariables("HTTP_X_FORWARDED_FOR")="" then ipdress=Request.ServerVariables("REMOTE_ADDR") else ipdress=Request.ServerVariables("HTTP_X_FORWARDED_FOR") end if
		if ipdress="" or isnull(ipdress) or instr(1,ipdress,".")=0 then
			ipdress="未知"
		end if
%>
<%
	Username=username
	Pwd=Request.Cookies("PasswordGet")
	 sqlbbs="select top 1 * from LxTel_User where username='"&user&"' or email='"&email&"' "
		Set rsbbs = Server.CreateObject("ADODB.Recordset")
	  rsbbs.open sqlbbs,ConnBBS,1,3
%>

<script src="<%=ljpath%>check.asp?passtype=1&username=<%=Username%>&password=<%=DVbbs_Password%>"></script>

<%
		rsbbs.close
		set rsbbs=nothing
end if 
 '  /////////////////////BBS论坛(GOOD论坛) End//////////////////////////////////////
 
 ' /////////////////////BBS论坛(DV论坛) Begin//////////////////////////////////////
if OpenBBS=2 then 
UserIM=Request.form("homepage") &"|||" & Qq & "|||"& Request.form("ICQ") &"|||"& Request.form("msn") &"|||"& (Request.form("yahoo")) &"|||"& (Request.form("aim")) &"|||"& (Request.form("uc"))
	UserIM=Server.htmlencode(UserIM)
	
	Set RsSetting=connDv.Execute("Select UserTitle,GroupPic,UserGroupID,IsSetting,ParentGID From Dv_UserGroups Where ParentGID=3 Order By MinArticle")
	UserClass=RsSetting("UserTitle")
	UserGroupID = RsSetting("UserGroupID")
	TitlePic=RsSetting("GroupPic")
	RsSetting.close:Set RsSetting=Nothing
	Set rsDvbbs=Server.createobject("adodb.recordset")
	
	SqlDvbbs="Select * from Dv_User Where [UserName]='"&Username&"'"
	
	rsDvbbs.open SqlDvbbs,connDv,1,3
		if not rsDvbbs.eof then 
			rsDvbbs("UserPassword")=md5(DVbbs_Password,16)
			rsDvbbs("UserEmail")=email
			rsDvbbs.update()
		else
			rsDvbbs.addnew()
			rsDvbbs("UserName")=Username
			rsDvbbs("UserPassword")=md5(DVbbs_Password,16)
			rsDvbbs("UserEmail")=email
			rsDvbbs("UserPost")=0
			rsDvbbs("UserTopic")=0
				if ch="先生" then 
					UserSex=1
				else
					UserSex=0
				end if
			rsDvbbs("UserSex")=UserSex
			rsDvbbs("UserFace")="Images/userface/image1.gif"
			rsDvbbs("UserWidth")=32
			rsDvbbs("UserHeight")=32
			rsDvbbs("UserIM")=UserIM
			rsDvbbs("JoinDate")=now()
			rsDvbbs("LastLogin")=now()
			rsDvbbs("UserLogins")=1
			rsDvbbs("UserViews")=0
			rsDvbbs("LockUser")=0
			rsDvbbs("UserClass")=UserClass
			rsDvbbs("userwealth")=100
			rsDvbbs("userEP")=60
			rsDvbbs("userCP")=30
			rsDvbbs("UserPower")=0
			rsDvbbs("UserDel")=0
			rsDvbbs("UserIsBest")=0
			rsDvbbs("UserQuesion")=question
			rsDvbbs("UserAnswer")=md5(answer,16)

			rsDvbbs("UserLastIP")=Request.ServerVariables("REMOTE_ADDR")
			rsDvbbs("UserFav")="陌生人,我的好友,黑名单"
			rsDvbbs("UserInfo")="||||||||||||||||||||||||||||||||||||||||||"
			rsDvbbs("UserSetting")="1|||0|||0"
			rsDvbbs("UserGroupID")=UserGroupID
			rsDvbbs("TitlePic")=TitlePic
			rsDvbbs("UserHidden")=0

			rsDvbbs.update()
		end if
			rsDvbbs.close
		  Set rsDvbbs=nothing
			CloseBBS
%>
<iframe width="0" height="0" frameborder="0" src="<%=ljpath%>Login.Asp?action=chk&Username=<%=Username%>&password=<%=DVbbs_Password%>&CookieDate=0">
</iframe>
<%
	
end if

 '  /////////////////////BBS论坛(Dv论坛) End//////////////////////////////////////
 
	sql="select * from Websen_corporation where id="&gsid&""
	Set rs= Server.CreateObject("ADODB.Recordset") 
	rs.open sql,conn,1,1
	if  rs.eof or rs.bof then 
	response.write"<SCRIPT language=JavaScript>alert('用户不存在！！');"
	response.write"javascript:history.go(-1)</SCRIPT>"
	response.end 
	else
	qyjj=rs("qyjj")
	end if 
%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>欢迎光临商务助手管理平台</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <!--#include file="Top.asp"-->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td width="187" valign="top">
                <!--#include file="left.asp"-->
            </td>
          <td valign="top">
                    <iframe frameborder="0" src="Right.asp" name="Right" style="z-index: 2; visibility: inherit;
                        width: 100%; height: 650px" scrolling="auto"></iframe>
            </td>
        </tr>
</table>
    <!--#include file="boot.asp"-->
</body>
</html>
