<!--#Include file="setup.asp"-->
<!--#Include file="md5.asp"-->

<%
strUploadNewsPhotoUrl="../Upload/News/"
'数据库类型，1为sql数据库，0为access数据库
is_sqldata=0

'是否使用其他系统的数据库用户表,1为使用，0为不使用
is_gqot_user=0

'if ms=1 then           '是否输出错误信息，1为不输出
On Error Resume Next
'end if

Dim connstr
Dim Conn
If is_sqldata=0 Then
'access数据库连接参数
db=dns&bbdbpath&"/"&bbdbname
fpath= Server.MapPath(""&db&"")
Set Conn = Server.CreateObject("ADODB.Connection")
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&fpath
Conn.open connstr
Else
'sql数据库连接参数：数据库名、用户密码、用户名、连接名（本地用local，外地用IP）
		Dim sql_databasename,sql_password,sql_username,sql_localname
		sql_localname = "(local)"
		sql_databasename = "zjhlcm"
		sql_username = "bb"
		sql_password = "bb"
		connstr = "Provider = Sqloledb; User ID = " & sql_username & "; Password = " & sql_password & "; Initial Catalog = " & sql_databasename & "; Data Source = " & sql_localname & ";"
	Set conn=Server.CreateObject("ADODB.connection")
	conn.open connstr
End If
	rem ****若使用外部数据库表请自行修改下面的变量值****
	if is_gqot_user=1 then
		ot_connstr= "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath("/bbs/data/bbs#dz0575.mdb") 'access外部数据库连接字符串
		'ot_connstr = "Provider = Sqloledb; User ID = ***; Password = ***; Initial Catalog = ***; Data Source = ***;" 'sql外部数据库连接字符串
		Set ot_conn = Server.CreateObject("ADODB.Connection")
		ot_conn.open ot_connStr '外部数据库连接
		ot_usertable="dv_user" '用户表名
		ot_username="username" '用户名字段
		ot_password="userpassword" '密码字段
		ot_regurl="/bbs/reg.asp" '注册用户链接,用绝对路径
		ot_modIfypass1="/bbs/modIfyadd.asp?t=1" '修改密码连接,用绝对路径
		ot_modIfypass2="/bbs/modIfyadd.asp?t=1" '修改密码提示问题连接,用绝对路径
		ot_lostpasswordurl="/bbs/lostpass.asp" '找回密码链接,用绝对路径
	End If
	intMemberKey = Session("intMemberKey")              '会员ID,不要修改
Sub CloseAllObj()
	On Error Resume Next
	Conn.Close:Set Conn = Nothing
end Sub
%>