<%
dim UserTableType,Conn_User,db_bbs
UserTableType = "MyPower"					 
Response.Charset="gb2312"
Response.Buffer=True
IsSqlDataBase=1		'定义数据库类别，0为Access数据库，1为SQL数据库
If IsSqlDataBase=0 Then
'''''''''''''''''''''''''''''' Access数据库设置 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
	SqlDataBase	= "../date/516data.mdb"	'数据库路径
	SqlProvider	= "Microsoft.Jet.OLEDB.4.0"	'驱动程序[ Microsoft.Jet.OLEDB.4.0  Microsoft.ACE.OLEDB.12.0 ]
	Connstr="Provider="&SqlProvider&";Data Source="&Server.MapPath(SqlDataBase)
	SqlNowString="Now()"
	SqlChar="'"
	IsSqlVer="ACCESS"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Else
'''''''''''''''''''''''''''''' SQL数据库设置 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
	'Dim ConnStr
	SqlLocalName	="."	'连接IP  [ 本地用 (local) 外地用IP ]
	SqlUserName	="sa"		'SQL用户名
	SqlPassword	="516data516data"		'SQL用户密码
	SqlDataBase	="516data"	'数据库名
	SqlProvider	="SQLOLEDB"	'驱动程序 [ SQLOLEDB  SQLNCLI ]
	Connstr = "PROVIDER="&SqlProvider&";DATA SOURCE="&SqlLocalName&";UID="&SqlUserName&";PWD="&SqlPassword&";DATABASE="&SqlDataBase 
	SqlNowString="GetDate()"
	IsSqlVer="MSSQL"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
END IF
On Error Resume Next
Set Conn_User = Server.CreateObject("ADODB.Connection")
Conn_User.open ConnStr
If Err Then
	Response.Write ""&IsSqlVer&"数据库连接出错，请检查连接字串。<br><br>"&Err.Source&" ("&Err.Number&")"
	Set Conn = Nothing
	err.Clear
	Response.End
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
sub CloseConn_User()
	Conn_User.close
	set Conn_User=nothing
end sub


Const db_User_Table="[User]"


Const db_User_ID="UserID"						'用户ID
Const db_User_Name="UserName"					'用户名
Const db_User_Sex="Sex"	
Const db_User_city="city"							'性别
Const db_User_Email="UserEmail"					'Email地址
Const db_User_Homepage="homepage"				'个人简介
Const db_User_QQ="Oicq"							'QQ
Const db_User_ddlYear="ddlYear"							'年
Const db_User_YueSelect="YueSelect"							'月
Const db_User_RiSelect="RiSelect"							'日
Const db_User_age="age"							'生日
Const db_User_xinz="xinz"							'星座
Const db_User_xiaolaba="xiaolaba"							'小喇叭

Const db_User_Password="UserPassword"			'密码
Const db_User_Question="Quesion"				'忘记密码的提示问题
Const db_User_Answer="Answer"					'问题答案
Const db_User_Face="face"						'头像
Const db_User_FaceWidth="width"					'头像宽度
Const db_User_FaceHeight="height"				'头像高度
Const db_User_RegDate="addDate"					'注册日期
Const db_User_LoginTimes="logins"				'登录次数
Const db_User_LastLoginTime="lastlogin"			'最后登录时间
Const db_User_LastLoginIP="UserLastIP"			'最后登录IP
Const db_User_UserClass="userclass"				'论坛用户等级（登录时用到）
Const db_User_Userg="userg"      '挂件



Const db_User_LockUser="lockuser"				'是否锁定用户
Const db_User_ArticleCount="ArticleCount"		'发表文章数
Const db_User_ArticleChecked="ArticleChecked"	'已审核文章数
Const db_User_PhotoChecked="PhotoChecked"	    '已审核图片数
Const db_User_UserLevel="UserLevel"				'用户等级（权限）
Const db_User_intor="intor"
Const db_User_intorcolor="intorcolor"
Const db_User_intorsize="intorsize"
Const db_User_hits="hits"
Const db_User_UserPoint="UserPoint"				'用户点数
Const db_User_love="love"
Const db_User_link="link"
Const db_User_titlecolor="titlecolor"
Const db_User_ChargeType="ChargeType"			'计费方式
Const db_User_photok="photok"			'背景
Const db_User_shouwo="shouwo"
Const db_User_BeginDate="BeginDate"				'开始日期
Const db_User_Valid_Num="Valid_Num"				'有效期数值
Const db_User_Valid_Unit="Valid_Unit"			'有效期单位



Const db_User_BbsType="bbstype"
Const db_User_Article="Article"
Const db_User_UserGroup="UserGroup"
Const db_User_UserWealth="userWealth"
Const db_User_UserEP="userEP"
Const db_User_UserCP="userCP"
Const db_User_Title="title"
Const db_User_Showre="showre"
Const db_User_Reann="reann"
Const db_User_UserCookies="usercookies"
Const db_User_Birthday="birthday"
Const db_User_UserPhoto="UserPhoto"
Const db_User_UserPower="UserPower"
Const db_User_UserDel="UserDel"
Const db_User_UserIsBest="UserIsBest"
Const db_User_UserInfo="UserInfo"
Const db_User_UserSetting="UserSetting"
Const db_User_UserGroupID="UserGroupID"
Const db_User_TitlePic="TitlePic"
%>
