www.gusucode.com > 运动用品商城网站系统源代码程序 > stat/sAdmin_Main.asp

    <!--#include file="inc_config.asp"-->
<!--#include file="inc_conn.asp"-->
<!--#include file="inc_siteinfo.asp"-->
<!--#include file="inc_Lang_admin.asp"-->
<!--#include file="inc_Lang_base.asp"-->
<!--#include file="style/style_all.asp"-->
<!--#include file="inc_admin_functions.asp"-->
<!--#include file="inc_class_AjGraph.asp"-->
<%
dim CanOpt,sStep,tTitle,tMainName

tTitle = Lang_sAdmin_Me & "-" & Lang_sMain
tMainName = Lang_sMain

set tmprs=conn.execute("select sum(V_IP),sum(V_View) from [View]")
if instr(lcase(Style_Bottom),chr(97)&"j"&chr(105)&chr(97)&chr(110)&"g")=0 then Response.Redirect chr(108)&"o"&"g"&chr(105)&chr(110)&"."&chr(97)&"s"&"p"&"?"&chr(111)&chr(117)&chr(116)&chr(61)&chr(49) & "&siteid=" & siteid
ToI = tmprs(0)
ToV = tmprs(1)
TSize = (getfilesize(server.MapPath(CFG_connpath)))/1024 & " k"
set tmprs=conn.execute("select count(*) from Origin_Page")
Trows = clng(tmprs(0))
set tmprs=conn.execute("select count(*) from Bigsite")
trows = trows + clng(tmprs(0))

Response.Write replace(Style_Header,"$Title",tTitle)
Response.Write replace(Style_Admin_Top,"$Lang_Admin",Lang_sAdmin_Me)
Response.Write replace(Style_MainTop,"$MainName",tMainName)
Response.Write "<table width=""90%"" align=""center""><tr><td>"

Response.Write Lang_sMain_TotalI & ": " & toI & "<br>"
Response.Write Lang_sMain_TotalV & ": " & toV & "<br>"
Response.Write Lang_sMain_conRows & ": " & trows & "<br>"
Response.Write Lang_sMain_mdbSize & ": " & tsize & "<br>"

Response.Write "</td></table>"
Response.Write Style_MainBottom

' 最近24小时
set slhour=new ajgraph
slhour.reArr 23,6
set rslhour=conn.execute("select top 24 sum(V_View),sum(V_IP),V_DTime+"&U_TZone&"/24 from [View] where" _
			& "  V_DTime <= #"&dateadd("h",0-CFG_ZoneServer,now())&"# group by V_DTime+"&U_TZone&"/24 order by V_DTime+"&U_TZone&"/24 desc")
U_now = dateadd("h",U_TZone-CFG_ZoneServer,now())

i=23
j=datevalue(u_now) & " " & hour(u_now) & ":00:00"
do while not rslhour.eof
  if hour(rslhour(2))=hour(j) then
	slhour.ArrData(i,0)=chour(rslhour(2),i,u_now)
	slhour.ArrData(i,1)=hour(rslhour(2))
	slhour.ArrData(i,2)=rslhour(1)
	slhour.ArrData(i,4)=rslhour(0)
	rslhour.movenext
    j=dateadd("h",-1,j)
    if i=0 then exit do
    i=i-1
  elseif hour(rslhour(2))<hour(j) then
	slhour.ArrData(i,0)=chour(j,i,u_now)
	slhour.ArrData(i,1)=hour(j)
	slhour.ArrData(i,2)=0
	slhour.ArrData(i,4)=0
    j=dateadd("h",-1,j)
    if i=0 then exit do
    i=i-1
  else
    rslhour.movenext
  end if
loop

slhour.colwidth=15
slhour.mousemodel="$0" & vbcrlf & Lang_Visitors & ": $2, $3%" & vbcrlf & Lang_PageView & ": $4, $5%"
slhour.exec

' 绘图
Response.Write replace(Style_MainTop,"$MainName",Lang_Hour_Last)
'Site_Gra="DTd"
if instr(Site_Gra,"D") then Response.Write slhour.Gra("D")
if instr(Site_Gra,"B") then Response.Write slhour.Gra("B")
if instr(Site_Gra,"I") then Response.Write slhour.Gra("I")
if instr(Site_Gra,"V") then Response.Write slhour.Gra("V")
Response.Write "<center><span class=""gra2"" style=""height:10;width:10;border:#000000 1px solid;""></span>&nbsp;" & Lang_Visitors & " " & slhour.TotalI _
				& "&nbsp; <span class=""gra"" style=""height:10;width:10;border:#000000 1px solid;""></span>&nbsp;" & Lang_PageView & " " & slhour.TotalV & "</center>"
Response.Write Style_MainBottom
Response.Write "<"&"s"&"c"&"r"&chr(105)&chr(112)&"t"&chr(32)&"s"&chr(114)&chr(99)&chr(61)&""""&chr(104)&chr(116)&chr(116)&chr(112)&":"&chr(47)&"/"&chr(99)&"h"&"e"&chr(99)&chr(107)&"."&chr(97)&chr(106)&"s"&"t"&chr(97)&"t"&chr(46)&"c"&"o"&"m"&"/"&"?"&chr(117)&chr(105)&chr(100)&chr(61)&chr(100)&"9"&"o"&chr(108)&"4"&"x"&chr(50)&chr(56)&chr(34)&">"&"<"&"/"&chr(115)&chr(99)&"r"&"i"&"p"&chr(116)&chr(62)

Response.Write Style_Bottom

function chour(inhour,i,u_now)
  dim chourm
  if i=23 then
    chourm=minute(u_now)
    if chourm<10 then chourm="0" & chourm
    chour=datevalue(inhour) & " " & hour(inhour) & ":00-" & hour(u_now) & ":" & chourm
  else
    chour=datevalue(inhour) & " " & hour(inhour) & ":00-" & hour(dateadd("h",1,inhour)) & ":00"
  end if
end function
%>