<%
dim Systemsql,conn,Random_img,Random_article,Random_shuoshuo,Agent,version,s_cd,us_cd,wz_cd,imgsql,cbpl_cd
Systemsql=1 '1=Access 2=Mssql
if Systemsql=1 then
	set conn = server.createobject("adodb.connection")  
	conn.connectionstring="Provider = Microsoft.Jet.OLEDB.4.0;Data Source="&server.mapPath("\#databases#\seablog.mdb") 
	conn.open 
elseif Systemsql=2 then
	set conn=server.CreateObject("adodb.connection")
	conn.open "provider=sqloledb;data source=116.255.136.116,1433;User ID=a0416113757;pwd=75908565;Initial Catalog=a0416113757"
end if

'随机显示文章和图片
if Systemsql=1 then
Random_img="order by Rnd(im_id-timer())"
Random_article="order by Rnd(w_id-timer())"
Random_shuoshuo="order by Rnd(s_id-timer())"
chatime="Now()"
elseif Systemsql=2 then
Random_img="order by newid()"
Random_article="order by newid()"
Random_shuoshuo="order by newid()"
chatime="getdate()"
end if

'IE版本检测脚本
Agent1=Request.ServerVariables("HTTP_USER_AGENT")
If InStr(Agent1,"MSIE")>0 Then
Agent=Split(Agent1,";")
version=Trim(Left(Replace(Agent(1),"MSIE",""),6))
else
version=100
End If

if version > 8 then
s_cd=17 
us_cd=16 
wz_cd=140 
imgsql=12 
cbpl_cd=24
a_js=85
else
s_cd=13
us_cd=12
wz_cd=130
imgsql=9
cbpl_cd=18
a_js=50
end if
%>