www.gusucode.com > 漂亮的地方旅游景点景观介绍网站源代码 > conn.asp

    <%
'建立记录集//////////////////////////////////////////////////////////////////////
sub record(rs,sql,rtype)
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,rtype
end sub
'关闭记录集
sub recordend(rs)
rs.close
set rs=nothing
end sub
'关闭CONN
sub connend()
conn.close
set conn=nothing
end sub

dim conn,mydb
mydb="/database/ice#.mdb"
sub openconn()
dim connstr
connstr="provider=microsoft.jet.oledb.4.0;Data Source="&server.MapPath(mydb)
set conn=server.CreateObject("adodb.connection")
conn.open connstr
end sub

call openconn()'打开数据库连接
dim mycons
set rs=conn.execute("select top 1 * from Jw_config")
mycons=rs.GetRows()
call recordend(rs)

'参数设置////////////////////////////////////////////////////////////////////////////////

dim config
config=mycons
dim sitename,closesite,whyclose,copyright,icp,address,postcode,email,phone,fax,uploadapi,keywords,descriptions,badword,badip,scpic,sltlx,sltbl,swidth,sheight,tjsy,sylx,sypic,syx,syy,sytext,sytextsize,sytextfont,sytextcolor,sybgcolor,syb,syi,sytmd,picwidth,picheight,jyxz,hturl,cssj,pictype,picsize,mediatype,mediasize,ziptype,zipsize,txttype,txtsize,othertype,othersize,mailzj,mailserver,mailuser,mailpsw,mailmail,jzzc,jzzf,jzyhm,zcdx,dxnr,zcyj,yjnr,lybkq,sfyxly,lynrzs,lyxysh,sfkqpl,yxfbpl,plxysh,plxzzs,siteqq,sitemoblie,sitelxr,sitemsn

sitename=config(0,0)
closesite=config(1,0)
whyclose=config(2,0)
copyright=config(3,0)
icp=config(4,0)
address=config(5,0)
postcode=config(6,0)
email=config(7,0)
phone=config(8,0)
fax=config(9,0)
uploadapi=config(10,0)
keywords=config(11,0)
descriptions=config(12,0)
badword=config(13,0)
badip=config(14,0)
scpic=config(15,0)
sltlx=config(16,0)
sltbl=config(17,0)
swidth=config(18,0)
sheight=config(19,0)
tjsy=config(20,0)
sylx=config(21,0)
sypic=config(22,0)
syx=config(23,0)
syy=config(24,0)
sytext=config(25,0)
sytextsize=config(26,0)
sytextfont=config(27,0)
sytextcolor=config(28,0)
sybgcolor=config(29,0)
syb=config(30,0)
syi=config(31,0)
sytmd=config(32,0)
picwidth=config(33,0)
picheight=config(34,0)
jyxz=config(35,0)
hturl=config(36,0)
cssj=config(37,0)
pictype=config(38,0)
picsize=config(39,0)
mediatype=config(40,0)
mediasize=config(41,0)
ziptype=config(42,0)
zipsize=config(43,0)
txttype=config(44,0)
txtsize=config(45,0)
othertype=config(46,0)
othersize=config(47,0)
jzzc=config(48,0)
jzzf=config(49,0)
jzyhm=config(50,0)
zcdx=config(51,0)
dxnr=config(52,0)
zcyj=config(53,0)
yjnr=config(54,0)
lybkq=config(55,0)
sfyxly=config(56,0)
lynrzs=config(57,0)
lyxysh=config(58,0)
sfkqpl=config(59,0)
yxfbpl=config(60,0)
plxysh=config(61,0)
plxzzs=config(62,0)
siteqq=config(64,0)
sitemoblie=config(63,0)
sitelxr=config(65,0)
sitemsn=config(66,0)
'参数设置END////////////////////////////////////////////////////////////////////////////

dim mytit
%>