<%@ codepage=65001%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!–#include file="conn.asp"–>
<%
nowtime=now()
nowtime1=DateAdd("m", -1, nowtime)
nowtime2=DateAdd("m", -2, nowtime)
nowtime3=DateAdd("m", -3, nowtime)
nowtime4=DateAdd("m", -4, nowtime)
nowtime5=DateAdd("m", -5, nowtime)
nowtime6=DateAdd("m", -6, nowtime)
nowtime7=DateAdd("m", -7, nowtime)
nowtime8=DateAdd("m", -8, nowtime)
nowtime9=DateAdd("m", -9, nowtime)
nowtime10=DateAdd("m", -10, nowtime)
nowtime11=DateAdd("m", -11, nowtime)
nowtime12=DateAdd("m", -12, nowtime)

thisDay = day(nowtime)
thisMonth = month(nowtime)
thisYear = year(nowtime)

thisDay1 = day(nowtime1)
thisMonth1 = month(nowtime1)
thisYear1 = year(nowtime1)

thisDay2 = day(nowtime2)
thisMonth2 = month(nowtime2)
thisYear2 = year(nowtime2)

thisDay2 = day(nowtime2)
thisMonth2 = month(nowtime2)
thisYear2 = year(nowtime2)

thisDay3 = day(nowtime3)
thisMonth3 = month(nowtime3)
thisYear3 = year(nowtime3)

thisDay4 = day(nowtime4)
thisMonth4 = month(nowtime4)
thisYear4 = year(nowtime4)

thisDay5 = day(nowtime5)
thisMonth5 = month(nowtime5)
thisYear5 = year(nowtime5)

thisDay6 = day(nowtime6)
thisMonth6 = month(nowtime6)
thisYear6 = year(nowtime6)

thisDay7 = day(nowtime7)
thisMonth7 = month(nowtime7)
thisYear7 = year(nowtime7)

thisDay8 = day(nowtime8)
thisMonth8 = month(nowtime8)
thisYear8 = year(nowtime8)

thisDay9 = day(nowtime9)
thisMonth9 = month(nowtime9)
thisYear9 = year(nowtime9)

thisDay10 = day(nowtime10)
thisMonth10 = month(nowtime10)
thisYear10 = year(nowtime10)

thisDay11 = day(nowtime11)
thisMonth11 = month(nowtime11)
thisYear11 = year(nowtime11)

thisDay12 = day(nowtime12)
thisMonth12 = month(nowtime12)
thisYear12 = year(nowtime12)

call openDB()

set rs1= Server.CreateObject("adodb.recordset")
sql1="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear&" and month(dataandtime)="&thisMonth&" and why=’銀行のチャージ’"
rs1.open sql1,conn,3,3
number1=CLNG(rs1("SUMMONEY"))

set rs2= Server.CreateObject("adodb.recordset")
sql2="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear1&" and month(dataandtime)="&thisMonth1&" and why=’銀行のチャージ’"
rs2.open sql2,conn,3,3
number2=CLNG(rs2("SUMMONEY"))

set rs3= Server.CreateObject("adodb.recordset")
sql3="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear2&" and month(dataandtime)="&thisMonth2&" and why=’銀行のチャージ’"
rs3.open sql3,conn,3,3
number3=CLNG(rs3("SUMMONEY"))

set rs4= Server.CreateObject("adodb.recordset")
sql4="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear3&" and month(dataandtime)="&thisMonth3&" and why=’銀行のチャージ’"
rs4.open sql4,conn,3,3
number4=CLNG(rs4("SUMMONEY"))

set rs5= Server.CreateObject("adodb.recordset")
sql5="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear4&" and month(dataandtime)="&thisMonth4&" and why=’銀行のチャージ’"
rs5.open sql5,conn,3,3
number5=CLNG(rs5("SUMMONEY"))

set rs6= Server.CreateObject("adodb.recordset")
sql6="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear5&" and month(dataandtime)="&thisMonth5&" and why=’銀行のチャージ’"
rs6.open sql6,conn,3,3
number6=CLNG(rs6("SUMMONEY"))

set rs7= Server.CreateObject("adodb.recordset")
sql7="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear6&" and month(dataandtime)="&thisMonth6&" and why=’銀行のチャージ’"
rs7.open sql7,conn,3,3
number7=CLNG(rs7("SUMMONEY"))

set rs8= Server.CreateObject("adodb.recordset")
sql8="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear7&" and month(dataandtime)="&thisMonth7&" and why=’銀行のチャージ’"
rs8.open sql8,conn,3,3
number8=CLNG(rs8("SUMMONEY"))

set rs9= Server.CreateObject("adodb.recordset")
sql9="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear8&" and month(dataandtime)="&thisMonth8&" and why=’銀行のチャージ’"
rs9.open sql9,conn,3,3
number9=CLNG(rs9("SUMMONEY"))

set rs10= Server.CreateObject("adodb.recordset")
sql10="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear9&" and month(dataandtime)="&thisMonth9&" and why=’銀行のチャージ’"
rs10.open sql10,conn,3,3
number10=CLNG(rs10("SUMMONEY"))

set rs11= Server.CreateObject("adodb.recordset")
sql11="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear10&" and month(dataandtime)="&thisMonth10&" and why=’銀行のチャージ’"
rs11.open sql11,conn,3,3
number11=CLNG(rs11("SUMMONEY"))

set rs12= Server.CreateObject("adodb.recordset")
sql12="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear11&" and month(dataandtime)="&thisMonth11&" and why=’銀行のチャージ’"
rs12.open sql12,conn,3,3
number12=CLNG(rs12("SUMMONEY"))

set rs13= Server.CreateObject("adodb.recordset")
sql13="select SUM(how) AS SUMMONEY from record where how>=0 and year(dataandtime)="&thisYear12&" and month(dataandtime)="&thisMonth12&" and why=’銀行のチャージ’"
rs13.open sql13,conn,3,3
number13=CLNG(rs13("SUMMONEY"))

  
‘参数含义(数组,横坐标,纵坐标,图表的宽度,图表的高度,图表标题,X轴单位,Y轴单位)  
function   table1(stat_array,table_left,table_top,all_width,all_height,table_title,X_unit,Y_unit)  
dim   bg_color(13)  
bg_color(1)="#ff1919"  
bg_color(2)="#ffff19"  
bg_color(3)="#1919ff"  
bg_color(4)="#19ff19"  
bg_color(5)="#fc0"  
bg_color(6)="#3cc"  
bg_color(7)="#ff19ff"  
bg_color(8)="#993300"  
bg_color(9)="#f60"  
bg_color(10)="#ffff19"
bg_color(11)="#19ff19"  
bg_color(12)="#ff1919"
bg_color(13)="#19ff19"

   
if   X_unit<>""   then  
X_unit=X_unit  
end   if  
if   Y_unit<>""   then  
Y_unit=Y_unit  
end   if  
   
num   =ubound(stat_array,1)  
item_width   =   cint(20000/num+0.5)  
begin_x=   cint((item_width-1200)/2)+2200  
   
value_Max=0  
for   i=1   to   num  
if   value_Max<stat_array(i,1)   then   value_Max=stat_array(i,1)  
next  
value_Max   =   clng(value_Max)  
value_Max_str   =cstr(value_Max)    
if   value_Max>9   then  
temp=mid(value_Max_str,2,1)  
if   temp>4   then    
temp2=(int(value_Max/(10^(len(value_Max_str)-1)))+1)*10^(len(value_Max_str)-1)  
else  
temp2=(int(value_Max/(10^(len(value_Max_str)-1)))+0.5)*10^(len(value_Max_str)-1)  
end   if  
else  
if   value_Max>4   then   temp2=10   else   temp2=5  
end   if  
item_hight   =   temp2/5  
‘下一句改变柱状体的3d模式  
response.Write   "<v:shapetype   id=’Box’   coordsize=’21600,21600′   o:spt=’16’   adj=’5400′></v:shapetype>"  
   
‘绘制灰色背景  
response.Write   "<v:rect   id=’background’   style=’position:absolute;left:"&table_left&"px;top:"&table_top&"px;WIDTH:"&all_width&"px;HEIGHT:"&all_height&"px;’   fillcolor=’#EFEFEF’   strokecolor=’gray’>"  
response.Write   "   <v:shadow   on=’t’   type=’single’   color=’silver’   offset=’4pt,4pt’/>"  
response.Write   "</v:rect>"  
‘绘制图的主体  
response.Write   "<v:group   ID=’table’   style=’position:absolute;left:"&table_left&"px;top:"&table_top&"px;WIDTH:"&all_width&"px;HEIGHT:"&all_height&"px;’   coordsize   =   ‘23500,12700’>"    
‘绘制标题层  
response.Write   "   <v:Rect   style=’position:relative;left:1500;top:200;width:20000;height:800’filled=’false’   stroked=’false’>"  
response.Write   "   <v:TextBox   inset=’0pt,0pt,0pt,0pt’>"  
response.Write   "   <table   width=’100%’   border=’0′   align=’center’   cellspacing=’0′>"  
response.Write   "   <tr>"  
response.Write   "   <td   align=’center’   valign=’middle’><div   style=’font-size:15pt;   font-family:黑体;’><B>"&table_title&"</B></div></td>"  
response.Write   "   </tr>"  
response.Write   "   </table>"  
response.Write   "   </v:TextBox>"  
response.Write   "   </v:Rect>   "  
‘绘制图表主体的蓝色渐变背景  
response.Write   "   <v:rect   id=’back’   style=’position:relative;left:1700;top:1200;width:20500;   height:10500;’   fillcolor=’#9cf’   strokecolor=’#DFDFDF’>"  
response.Write   "   <v:fill   rotate=’t’   angle=’-45′   focus=’100%’   type=’gradient’/>"  
response.Write   "   </v:rect>"  
‘横坐标轴  
response.Write   "   <v:line   ID=’X’   from=’1700,11700′   to=’22700,11700′   style=’z-index:2′   strokecolor=’#000000′   strokeWeight=1pt><v:stroke   EndArrow=’Classic’/></v:line>"  
‘纵坐标轴  
response.Write   "   <v:line   ID=’Y’   from=’1700,900′   to=’1700,11700′   style=’z-index:2′   strokecolor=’#000000′   strokeWeight=1pt><v:stroke   StartArrow=’Classic’/></v:line>"  
‘写x、y轴单位  
response.Write   "   <v:Rect   style=’position:relative;left:100;top:700;width:1500;height:500′   filled=’false’   stroked=’false’>"  
response.Write   "   <v:TextBox   inset=’0pt,0pt,0pt,0pt’   style=’font-size:9pt;’><div   align=’right’>"&Y_unit&"</div></v:TextBox>"  
response.Write   "   </v:Rect>   "    
response.Write   "   <v:Rect   style=’position:relative;left:22200;top:11700;width:2000;height:500′   filled=’false’   stroked=’false’>"  
response.Write   "   <v:TextBox   inset=’0pt,0pt,0pt,0pt’   style=’font-size:9pt;’><div   align=’left’>"&X_unit&"</div></v:TextBox>"  
response.Write   "   </v:Rect>   "    
‘4根纵坐标校准线  
for   i=0   to   4  
response.Write   "   <v:line   from=’1200,"&i*2000+1700&"’   to=’1700,"&i*2000+1700&"’   style=’z-index:2′   strokecolor=’#000000′></v:line>"  
response.Write   "   <v:line   from=’1700,"&i*2000+1700&"’   to=’2200,"&i*2000+1200&"’   style=’z-index:2′   strokecolor=’#0099FF’></v:line>"  
response.Write   "   <v:line   from=’2200,"&i*2000+1200&"’   to=’22200,"&i*2000+1200&"’   style=’z-index:2′   strokecolor=’#0099FF’></v:line>"  
response.Write   "   <v:line   from=’2200,"&i*2000+2200&"’   to=’22200,"&i*2000+2200&"’   style=’z-index:2′   strokecolor=’#0099FF’>"  
response.Write   "   <v:stroke   dashstyle=’Dot’/>"  
response.Write   "   </v:line>"  
‘写y轴刻度  
response.Write   "   <v:Rect   style=’position:relative;left:100;top:"&i*2000+1250&";width:1500;height:500′   filled=’false’   stroked=’false’>"  
response.Write   "   <v:TextBox   inset=’0pt,0pt,0pt,0pt’   style=’font-size:9pt;’><div   align=’right’>"&item_hight*(5-i)&"</div></v:TextBox>"  
response.Write   "   </v:Rect>   "    
next  
‘3根坐标轴基准线x,y,z  
response.Write   "   <v:line   from=’2200,11200′   to=’22200,11200′   style=’z-index:2′   strokecolor=’#0099FF’></v:line>"  
response.Write   "   <v:line   from=’2200,1200′   to=’2200,11200′   style=’z-index:2′   strokecolor=’#0099FF’></v:line>"  
response.Write   "   <v:line   from=’1700,11700′   to=’2200,11200′   style=’z-index:2′   strokecolor=’#0099FF’></v:line>"  
‘写柱子  
for   i=1   to   num  
this_hight   =   cint(stat_array(i,1)/(5*item_hight)*10000+420)  
response.Write   "   <v:shape   id=’Box"&i&"’   type=’#Box’   fillcolor=’"&bg_color(i)&"’   strokecolor=’#5f5f5f’   style=’position:relative;   left:"&(i-1)*item_width+begin_x&";top:"&cint(10000-this_hight+1620)&";width:1200;height:"&this_hight&";z-index:10′>"  
response.Write   "   <v:fill   o:opacity2=’52429f’   rotate=’t’   angle=’-45′   focus=’100%’   type=’gradient’/>"  
response.Write   "   </v:shape>"  
   
response.Write   "   <v:Rect   style=’position:relative;left:"&(i-1)*item_width+2200&";top:"&cint(10000-this_hight+1150)&";width:"&item_width&";height:500′   filled=’false’   stroked=’false’>"  
response.Write   "   <v:TextBox   inset=’0pt,0pt,0pt,0pt’   style=’font-size:9pt;’><div   align=’center’>"&stat_array(i,1)&"</div></v:TextBox>"  
response.Write   "   </v:Rect>   "    
   
response.Write   "   <v:Rect   style=’position:relative;left:"&(i-1)*item_width+2200&";top:11850;width:"&item_width&";height:500′   filled=’false’   stroked=’false’>"  
response.Write   "   <v:TextBox   inset=’0pt,0pt,0pt,0pt’   style=’font-size:9pt;’><div   align=’center’>"&stat_array(i,2)&"</div></v:TextBox>"  
response.Write   "   </v:Rect>   "    
next  
response.Write   "</v:group>"  
end   function  
%>  
<html   xmlns:v="urn:schemas-microsoft-com:vml"   xmlns:o="urn:schemas-microsoft-com:office:office">  
<head>  
<title>
</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW">
<STYLE>  
v\:*   {   Behavior:   url(#default#VML)   }  
o\:*   {   behavior:   url(#default#VML)   }  
</STYLE>  
</head>  
<body>  
<%  
dim   total(13,2)
total(1,1)=number13
total(2,1)=number12
total(3,1)=number11
total(4,1)=number10
total(5,1)=number9  
total(6,1)=number8
total(7,1)=number7  
total(8,1)=number6  
total(9,1)=number5  
total(10,1)=number4  
total(11,1)=number3
total(12,1)=number2
total(13,1)=number1
   
total(1,2)="一年前"
total(2,2)="前11个月"  
total(3,2)="前10个月"  
total(4,2)="前9个月"  
total(5,2)="前8个月"  
total(6,2)="前7个月"  
total(7,2)="前6个月"  
total(8,2)="前5个月"  
total(9,2)="前4个月"  
total(10,2)="前3个月"  
total(11,2)="前2个月"  
total(12,2)="前1个月"  
total(13,2)="当前月"
   
call   table1(total,20,20,750,400,"Bitcash充值统计图","","日元")  
%>  
</body>  
</html>