<%Response.buffer=true%>
<!--#include file="conn.asp"-->
<%
set Temprs5=conn.execute("select count(*),sum(titleCount) from title")
allcount_zu=Temprs5(0)
allcount_zan=Temprs5(1)
TempRs5.close:Set TempRS5=nothing
 %>
 <%
'文章统计
sql = "select count(*) as allcount from news"
set Temprs6 = conn.execute(sql)
allcount1_wen=temprs6("allcount")
Temprs6.close
set Temprs6 = nothing
%>
<%
'计数器统计
set conn=Server.CreateObject("ADODB.Connection")
dbpath=Server.MapPath("count/count.mdb")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&dbpath
    Set temprs=Server.Createobject("ADODB.Recordset")
    tmprs=conn.execute("Select vtop,starttime from vjian")
    vtotal=tmprs("vtop")
    vfirst=tmprs("starttime")
	set tmprs=nothing
	if isnull(vtotal) then vtotal=0
'在线人数
	Set rs = Server.CreateObject("ADODB.Recordset")
	sql="select vip from view where vtime >= dateadd('n',-20,now()) group by vip"
	rs.Open sql,conn,1,1
	vonline=rs.RecordCount
'今日访问量、昨日访问量（从简数据朝读取）
    tmprs=conn.execute("Select today,yesterday from vjian")
    vtoday=tmprs("today")
    vyesterday=tmprs("yesterday")
	if isnull(vtoday) then vtoday=0
	if isnull(vyesterday) then vyesterday=0
conn.close
set conn=nothing
%>