<%
Dim DbPath,DbPath_U,DbPath_L
Dim Conn,Conn_U,Conn_L,Conn_Count
Dim Db,Cl,Template,PageData,Count,ClUbb,TempStr
Dim IsSqlDataBase,IsSqlDataBase_U,IsSqlDataBase_L
Dim SqlNowString,FalseType,TrueType
Dim SqlNowString_U,FalseType_U,TrueType_U
Dim SqlDatabaseName,SqlUsername,SqlPassword,SqlLocalName
Dim SqlDatabaseName_U,SqlUsername_U,SqlPassword_U,SqlLocalName_U
Dim SqlDatabaseName_L,SqlUsername_L,SqlPassword_L,SqlLocalName_L
Dim CreateHtmlIng,DefaultPage,CreateFilePre
Set Db = New Cls_DataBase
Set Cl = New Cls_CMSSysTem
Set Template = New Cls_Templates
CreateHtmlIng=False : DefaultPage="Index"  Rem 是否正在生成HTML
Const SaveLog	= 1			Rem 是否保存攻击日志       0为否，1为是
Const InstallDir= "/CL/"		Rem 网站安装目录，根目录用“/”，请用"/"开头及结尾：如安装在Cl3目录下，则值为：“/Cl3/”
Const BbsDir	= "/Bbs/"	Rem 论坛安装目录，根目录用“/”，请用"/"结尾，整合论坛时生效
Const SysTemVersion = 0		Rem 系统版本，请不要更改，否则会出错
Const UserTableType = "Aspoo"	'Aspoo=不整合论坛，Dvbbs=整合动网7
IsSqlDataBase	= 0		'主数据库类型(1=SQL，0=AC)
IsSqlDataBase_U = 0		'用户数据库类型(1=SQL，0=AC)整合论坛时才生效,不整合论坛，则自动取主数据库类型
IsSqlDataBase_L = 0		'Log数据库类型(1=SQL，0=AC)
DbPath	= InstallDir & "Data/Cl_CreateLiveCMSv3.Asp"	'Access版主数据库文件的位置(请用绝对路径)
DbPath_U	= BbsDir & "Data/Dvbbs7.mdb"  'Access版论坛数据库文件的位置(整合论坛时生郊)
DbPath_L	= InstallDir & "Data/Cl_Log.Asp"  '管理员及SQL注入记录数据库
'====SQL版主站 数据库参数=================================================
SqlDatabaseName		= "ClCMS3"		'主数据库名
SqlUsername			= "ClCMS3"		'主数据库登录用户
SqlPassword			= "123456"		'主数据库登录密码
SqlLocalName		= "(local)"		'数据库服务器，本机用“(local)”
'====SQL版论坛 数据库参数 (整合论坛时生郊)================================
SqlDatabaseName_U	= "bbs"			'论坛数据库名
SqlUsername_U		= "bbs"			'论坛数据库登录用户
SqlPassword_U		= "123456"		'论坛数据库登录密码
SqlLocalName_U		= "(local)"		'论坛数据库服务器，本机用“(local)”
'====SQL Log数据库========================================================
SqlDatabaseName_L	= "ClLog"		'Log数据库名
SqlUsername_L		= "ClLog"		'Log数据库登录用户
SqlPassword_L		= "123456"		'Log数据库登录密码
SqlLocalName_L		= "(local)"		'Log数据库服务器，本机用“(local)”
'===========================================================================
'以下部分，不需要再改！=====================================================
If UserTableType = "Dvbbs" Then
Db.UserTable		= "[Dv_User]"
Db.MessageTable		= "[Dv_Message]"
Db.FriendTable		= "[Dv_Friend]"
Db.UserFaceWidth	= "Userwidth"			'头像宽度
Db.UserFaceHeight	= "Userheight"		    '头像高度
Db.UserTPassWord	= "WebTruePassWord"
Else
Db.UserTable		= "[Cl_User]"
Db.MessageTable		= "[Cl_Message]"
Db.FriendTable		= "[Cl_Friend]"
Db.UserFaceWidth	= "FaceWidth"			'头像宽度
Db.UserFaceHeight	= "FaceHeight"		    '头像高度
Db.UserTPassWord	= "TruePassWord"
DbPath_U			= DbPath
SqlDatabaseName_U	= SqlDatabaseName
SqlUsername_U		= SqlUsername
SqlPassword_U		= SqlPassword
SqlLocalName_U		= SqlLocalName
IsSqlDataBase_U		= IsSqlDataBase
End If
Db.UserID			= "UserID"				'用户ID
Db.UserName			= "UserName"			'用户名
Db.UserPassword		= "UserPassword"		'密码
Db.UserEmail		= "UserEmail"			'Email地址
Db.UserSex			= "UserSex"				'性别
Db.UserFace			= "UserFace"			'头像
Db.UserJoinDate		= "JoinDate"			'注册日期
Db.UserLastLogin	= "LastLogin"		    '最后登录时间
Db.UserLogins		= "UserLogins"		    '登录次数
Db.UserQuestion		= "UserQuesion"         '忘记密码的提示问题
Db.UserAnswer		= "UserAnswer"          '问题答案
Db.UserLastIP		= "UserLastIP"		    '最后登录IP
'=============================
Db.UserIM			= "UserIM"				'用户IM,0123456,bbsxp(012345)
Db.UserLock			= "LockUser"			'是否锁定用户
Db.UserWealth		= "UserWealth"			'用户金钱（整合DVBBS用）
Db.UserMoney		= "UserMoney"			'用户金币
Db.UserMsg			= "UserMsg"				'短消息状态
'=============================
Db.UserReName		= "UserReName"			'真实姓名
Db.UserTelePhone	= "UserTelePhone"		'办公电话
Db.UserAddRess		= "UserAddRess"			'通讯地址
Db.UserBirthday		= "UserBirthday"		'用户生日
Db.IDCard			= "IDCard"				'身份证号
Db.CityInfo			= "CityInfo"			'城市
Db.ZipCode			= "ZipCode"				'邮编
Db.SchoolAge		= "SchoolAge"			'学历
Db.UserWorking		= "UserWorking"			'工作
Db.UserHomePhone	= "UserHomePhone"		'家庭电话
Db.UserMobile		= "UserMobile"			'手机
Db.WaitReceive		= "WaitReceive"			'待签收文章
Db.Received			= "Received"			'已签收文章
Db.TotalExp			= "TotalExp"			'个人购物积分
Db.UserReMark		= "UserReMark"			'备注
Db.UserDataNum		= "DataCount"  			'发表文章数
Db.UserLevel		= "UserLevel"			'用户等级
Db.UserPoint		= "UserPoint"			'用户点数
Db.ChargeType		= "ChargeType"		    '计费方式
Db.BeginDate		= "BeginDate"			'开始日期
Db.ValidNum			= "Valid_Num"			'有效期数值
Db.UserCheckNum		= "UserCheckNum"		'注册认证码
if IsSqlDataBase=1 then
TrueType			= "1"
FalseType			= "0"
SqlNowString		= "GetDate()"
else
TrueType			= "True"
FalseType			= "False"
SqlNowString		= "Now()"
end if
if IsSqlDataBase_U=1 then
TrueType_U			= "1"
FalseType_U			= "0"
SqlNowString_U		= "GetDate()"
else
TrueType_U			= "True"
FalseType_U			= "False"
SqlNowString_U		= "Now()"
end if
'主站数据库链接过程
Sub OpenConn()
	if IsObject(Conn) then Exit Sub
	if IsSqlDataBase=1 then
		Db.ConnValue =  "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
	else
		Db.ConnValue="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DbPath)
	end if
	Set Conn=Db.OpenConnection("主数据库")
End Sub
'用户主站数据库链接过程
Sub OpenConn_U()
	if IsObject(Conn_U) then Exit Sub
	if IsSqlDataBase_U=1 then
		Db.ConnValue = "Provider = Sqloledb; User ID = " & SqlUsername_U & "; Password = " & SqlPassword_U & "; Initial Catalog = " & SqlDatabaseName_U & "; Data Source = " & SqlLocalName_U & ";"
	else
		Db.ConnValue = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DbPath_U)
	end if
	Set Conn_U=Db.OpenConnection("用户数据库")
End Sub
'Log数据库链接过程
Sub OpenConn_L()
	if IsObject(Conn_L) then Exit Sub
	if IsSqlDataBase_L=1 then
		Db.ConnValue = "Provider = Sqloledb; User ID = " & SqlUsername_L & "; Password = " & SqlPassword_L & "; Initial Catalog = " & SqlDatabaseName_L & "; Data Source = " & SqlLocalName_L & ";"
	else
		Db.ConnValue = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DbPath_L)
	end if
	Set Conn_L=Db.OpenConnection("Log数据库")
End Sub
Sub CloseAllObj()
	'On Error Resume Next
	TempStr				= Empty
	Template.html		= Empty
	Set Db				= Nothing
	Set Cl				= Nothing
	Set Template		= Nothing
	Set PageData		= Nothing
End Sub
'if Err then
'	Response.Write "执行程序发现错误<BR>"
'	Response.Write "错 误 号: " & Err.Number & "<BR>"
'	Response.Write "错误描述：" & Err.Description & "<BR>"
'	Response.Write "错误来源：" & Err.Source & "<BR>"
'	Response.end
'end if
%>
<%
'==================================================
'CreateLive CMS Version 3.1
'							Powered by Aspoo.Net
'
'邮箱: aspoo@126.com		Info@aspoo.cn
'ＱＱ: 3315263				596197794
'网站: www.aspoo.cn			www.aspoo.com
'论坛: bbs.aspoo.cn			bbs.aspoo.com
'
'Copyright (C) 2005 Aspoo.Net All Rights Reserved.
'==================================================
%>
