<!--#Include File="Config.Asp"-->
<!--#Include File="Conn_DbFile.Asp"-->
<%
dim conn
dim connstr
dim db
db=SitePath&dbpath&"/"&dbname
connstr="DBQ="+server.mappath(""&db&"")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
on error resume next
conn.open connstr
if err then
Err.Clear
		Call CloseConn()
		Response.Write "数据库连接出错，请打开conn.asp文件检查连接字串。"
		Response.End
end if

set Config=conn.execute("select * from Dream_Config")
if not(Config.eof and Config.bof) then
	Dream_SiteName=Config("Dream_SiteName")
	Dream_SiteTitle=Config("Dream_SiteTitle")
	Dream_SiteKeywords=Config("Dream_SiteKeywords")
	Dream_SiteDescription=Config("Dream_SiteDescription")
	Dream_Footer=Config("Dream_Footer")
	Dream_Phone=Config("Dream_Phone")
	Dream_Tel=Config("Dream_Tel")
	Dream_Biaoyu=Config("Dream_Biaoyu")
	Dream_Lxr=Config("Dream_Lxr")
	Dream_Copy=Config("Dream_Copy")
	Dream_Logo=Config("Dream_Logo")
	Dream_Banner=Config("Dream_Banner")
	Dream_Review=Config("Dream_Review")
	Dream_Ad1=Config("Dream_Ad1")
	Dream_Ad1Url=Config("Dream_Ad1Url")
	Dream_Ad2=Config("Dream_Ad2")
	Dream_Ad2Url=Config("Dream_Ad2Url")
	Dream_Map=Config("Dream_Map")
	Dream_Enter=Config("Dream_Enter")
	Dream_Ewm=Config("Dream_Ewm")
	Dream_Email=Config("Dream_Email")
	Dream_IphoneDown=Config("Dream_IphoneDown")
	Dream_AndroidDown=Config("Dream_AndroidDown")
end if
set Config=nothing

Function CloseConn()
	conn.close
	set conn=nothing
End Function

Public Function FormatDate(dt)
    if IsDate(dt) Then
 '生成日期所有所需元素:年月日
 FormatDate=year(dt)&"-"&right("00"&month(dt),2)&"-"&right("00"&day(dt),2)
 else
 FormatDate=dt
 end if
End Function

%>