<%@ LANGUAGE = VBScript CodePage = 936%>
<%

Response.Buffer=true
Dim db,IsSqlDataBase
%>
<!--#Include File="data_config.Asp"-->
<%
Dim Startime
'Dim Dvbbs,template
Dim SqlNowString,Conn,connstr
'定义数据库类别，1为SQL数据库，0为Access数据库

'论坛缓存名称，如果一个站点有多个论坛请更改成不同名称
Const Forum_CacheName = "aspsky"
'定义运行模式，测试的时候设置1，正常运行的时候设置为0,不输出错误信息有利于安全，

Startime = Timer()

If IsSqlDataBase = 0 Then
	SqlNowString = "GetDate()"
Else
	SqlNowString = "Now()"
End If
set conn=server.createobject("adodb.connection")
If IsSqlDataBase=1 Then
'''''''''''''''''''''''''''''' Access数据库 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Else
Dim SqlLocalName
Dim SqlUserName
Dim SqlPassword
Dim SqlDatabaseName
'''''''''''''''''''''''''''''' SQL数据库 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SqlLocalName   ="(local)"     '连接IP  [ 本地用 (local) 外地用IP ]
SqlUsername    ="sa"          '用户名
SqlPassword    ="wmjwmj"           '用户密码
SqlDatabaseName="Myzone1"       '数据库名
ConnStr = "Provider=Sqloledb; User ID=" & SqlUsername & "; Password=" & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source=" & SqlLocalName & ";"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
End If
conn.open ConnStr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错，请检查连接字串。"'注释，需要把这几个字翻译成英文。
Response.End
End If
On Error Resume Next
%>

<!--#Include File="zone_class.Asp"-->
