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

    <!--#include file="inc_show.asp"-->
<!--#include file="inc_class_DrawPieGraph.asp"-->
<%

public strsql, tTitle, tMainName

tTabTop = "<tr class=""fonts"" height=""16"" align=""center""><td width=""80"">&nbsp;</td><td width=""40"">"&Lang_Visitors&"</td><td width=""35"">"&Lang_Percent&"</td></tr>"

tDay=Request("D")

set ajgra=new ajgraph

ajgra.reArr ubound(Lang_sc_engine,1),6

if Site_BigSite then
  strOB="B"
else
  strOB="O"
end if

select case tDay
case "T"
  strsql = strOB & "_Today"
  tTitle = Site_Name & "-" & Lang_Me & "-" & Lang_Item_S_Engine & "(" & Lang_Today & ")"
  tMainName = Lang_Item_S_Engine & "(" & Lang_Today & ")"
case "Y"
  strsql = strOB & "_Yesterday"
  tTitle = Site_Name & "-" & Lang_Me & "-" & Lang_Item_S_Engine & "(" & Lang_Yesterday & ")"
  tMainName = Lang_Item_S_Engine & "(" & Lang_Yesterday & ")"
case else
  strsql = strOB & "_Total"
  tTitle = Site_Name & "-" & Lang_Me & "-" & Lang_Item_S_Engine
  tMainName = Lang_Item_S_Engine
end select

for i= 0 to ubound(Lang_sc_engine,1)
  ajgra.ArrData(i,0)=Lang_sc_engine(i,1)
  ajgra.ArrData(i,2)=getCl(Lang_sc_engine(i,0))
next


ajgra.Exec

' 绘制饼图对象
set bb=new DrawPieGraph
bb.Diameter =65
bb.Shadow = true
bb.ShowLegend =false
bb.ShowValues =true
bb.LegendSize = 10
bb.FontDef ="<font style='font-family:宋体;font-size:12'>&nbsp;"
bb.HTMLinnerTableDef = "<table cellspacing='5' align='center' cellpadding='0' border='0'>"
bb.HTMLouterTableDef = "<table cellspacing='0' align='center' cellpadding='0' border='0'>"

vAgent		= Request.ServerVariables("HTTP_USER_AGENT")
if instr(vAgent,"MSIE 6") or instr(vAgent,"MSIE 5.5") then
for i=0 to ubound(lang_sc_engine,1)
  if ajgra.arrdata(i,3)>1 then
    bb.AddValue clng(ajgra.arrdata(i,2)),cstr(ajgra.arrdata(i,0)),cstr(lang_sc_engine(i,2))
    ajgra.arrdata(i,0)="<img align=absmiddle src='style/images/touming.gif' border=1 width='10' height='10' style='background:"&lang_sc_engine(i,2)&";'> " & ajgra.arrdata(i,0)
    iiiis=iiiis+1
  else
    oooother=oooother + ajgra.arrdata(i,2) + 0
    ajgra.arrdata(i,0)="<img align=absmiddle src='style/images/touming.gif' border=1 width='10' height='10' style='background:#ffffff;'> " & ajgra.arrdata(i,0)
  end if
next

if iiiis<6 then bb.showlegend=true
if oooother>0 then bb.addvalue oooother,"Other","#ffffff"
end if

ajgra.TabHeader = tTabTop
ajgra.TabRow = "<tr height=""16"" align=""right""><td align=""left"">&nbsp;$0</td><td>$2&nbsp;</td><td>$3%&nbsp;</td></tr>"


Response.Write replace(Style_Header,"$Title",tTitle)
Response.Write Style_Top
if tTips <> "" then Response.Write replace(Style_Tips,"$Tips",tTips)
Response.Write replace(Style_MainTop,"$MainName",tMainName)

Response.Write "<table align=""center""><tr><td valign=""top""><br><br><div>"
bb.draw
Response.Write "</div></td><td>" & ajgra.TabGra(3) & "</td><td>" & ajgra.Gra("i") & "</td></tr></table>"

Response.Write Style_MainBottom
Response.Write Style_Bottom


function getCl(strsl)
  if Site_BigSite then
    sql="select sum("&strsql&") from Bigsite where site_id="&siteid&" and b_type=0 and b_content like '%" & strsl & "%'"
  else
    sql="select sum("&strsql&") from Origin_Page where site_id="&siteid&" and O_Type=0 and O_Content like '%" & strsl & "%'"
  end if
  set rss = conn.execute(sql)
  getCl = rss(0)
  if isnull(getCl) then getCl=0
end function
%>