Archive for June 2006
日志0052——广义相对论与OGAME Leave a comment
日志0051——篮球、考试、电影与网游 Leave a comment
日志0050——小说、淋雨、报告与网志 4 comments
日志0049——废话一箩筐 Leave a comment
决战 1 comment
网站流量统计与分析程序(ASP版) Leave a comment
Strconn="DRIVER=Microsoft Access Driver (*.mdb);DBQ=E:Inetpubwwwrootboard.MDB"
Set Conn=server.createobject("ADODB.CONNECTION")
conn.open strconn
Set Rs=server.CreateObject("adodb.recordset")
rs.open "select * from datedata",conn,1,2
if rs.bof and rs.eof then
rs.addnew
rs("date")=date
rs(cstr(hour(time)))=1
rs("total")=1
rs.update
else
rs.movelast
do while not(rs.bof)
if cstr(rs("date"))=cstr(date) then
aa=rs(cstr(hour(time)))
rs(cstr(hour(time)))=aa+1
aa=rs("total")
rs("total")=aa+1
rs.update
exit do
end if
rs.moveprevious
loop
end if
if rs.bof then
rs.addnew
rs("date")=date
rs(cstr(hour(time)))=1
rs("total")=1
rs.update
end if
rs.close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站总流量统计图</title>
<style>
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #FF00FF;
text-decoration: underline;
}
a:active {
color: #FF0000;
text-decoration: underline overline;
}
</style>
</head>
<body>
<%
Dim Strconn
Dim Conn
dim RS
Strconn="DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("board.mdb")
Set Conn=server.createobject("ADODB.CONNECTION")
conn.open strconn
Set Rs=server.CreateObject("adodb.recordset")
Dim DH
Dim Max
Dim Min
Dim Average
Dim Total
Dim I
Dim T
Dim CD
Dim Days
Dim JQ
jq=10
dh=15
cd=request.QueryString("Days")
if cd=0 then cd=10
rs.open "select * from datedata",conn,1,1
rs.movefirst
days=0
do while not rs.eof
days=days+1
rs.movenext
loop
rs.movelast
dim TT
dim tmp
tt=hour(time)
dim Temp
dim MM()
redim mm(cd+1)
if tt>0 then
temp=0
for j=0 to tt
temp=temp+cint(rs(cstr(j)))
next
rs.moveprevious
for i=1 to cd
if rs.eof then exit for
tmp=0
for j=0 to tt-1
tmp=tmp+rs(cstr(j))
next
tmp=tmp+rs(cstr(tt))/60*(minute(time)+second(time)/60)
if tmp=0 then tmp=rs("total")
mm(i)=temp*rs("total")/tmp
rs.moveprevious
next
end if
%>
<div id="DataShow">总工作日数:<%=days%>;日期:<%=date%></div>
<div>
<table border="1" cellspacing="1" cellpadding="1">
<tr align="center">
<td>流量:</td>
<%
rs.movefirst
min=100
i=0
do while not rs.eof
if rs("Total")>max then max=rs("Total")
if rs("Total")<min then min=rs("Total")
total=total+rs("Total")
i=i+1
rs.movenext
loop
rs.movefirst
do while not rs.eof
%>
<td onMouseOver="DataShow.innerHTML=’总工作日数:<%=days%>;日期:<%=rs("date")%>’"><a href="showdatedata.asp?date=<%=rs("date")%>"><font color="#<%if rs("total")=max then response.Write("FF0000") else if rs("total")=min then response.Write("0000FF") else response.Write("000000")%>"><%=rs("Total")%></font></a></td>
<%
rs.movenext
loop
average=total/i
rs.movefirst
%>
</tr>
</table>
<form method="send" action="showdatedata.asp"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">您要检索的日期:<input name="Date" type="text" value="<%=date%>"><input name="sub" type="submit" value="确定"> <a href="counter.asp" target="_blank">返回</a></font>
</form>
</div>
<div id="ShowData" style="position:absolute; left:5px; top:130px; width:298px; height:10px; z-index:4; background-color: #FFFFFF;" align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">总流量:<%=Total%>;工作日平均流量:<%=int(average*100)/100%><br>最高日流量:<%=Max%>;最低日流量:<%=Min%></font></div>
<div id="ShowData" style="position:absolute; left:90px; top:150px; width:<%=24*(30*1.1)%>px; height:49px; z-index:3; background-color: #FFFFFF;" align="center">网站总流量分日统计图</div>
<%
i=0
do while not rs.eof
%>
<div id="ShowData" style="position:absolute; left:<%=90+i*(dh*1.1)-dh*0.1%>px; top:180px; width:<%=dh%>px; height:10px; z-index:3; background-color: #FFFFFF;" align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=rs("Total")%></font></div>
<div onMouseOver="ShowDays.innerHTML='<%=rs("date")%>’;ShowDays.style.left=event.x-45;ShowDays.style.top=450" id="ShowData" style="position:absolute; left:<%=90+i*(dh*1.1)%>px; top:150px; width:<%=dh%>px; height:<%=50+250*rs("Total")/max%>px; z-index:2; background-color:<%if rs("Total")=max then response.Write("#FF0000") else if rs("total")=min then response.Write("#0000FF") else response.Write("#666666")%>;"> </div>
<%
i=i+1
rs.movenext
loop
%>
<div id="ShowData" style="position:absolute; left:<%=90-dh*0.1/2%>px; top:150px; width:<%=i*(dh*1.1)%>px; height:<%=50+250*average/max%>px; z-index:1; background-color:#FFFF00;"> </div>
<div id="ShowDays" style="position:absolute; left:0px; top:0px; width:100px; height:10px; z-index:3;" align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></div>
<%
dim NN(25)
rs.movefirst
do while not rs.eof
for i=1 to 25
nn(i)=nn(i)+rs(i+1)
next
rs.movenext
loop
max=0
min=100
t=0
for i=1 to 24
if nn(i)>max then max=nn(i)
if nn(i)<min and nn(i)>0 then min=nn(i)
if nn(i)>0 then t=t+1
next
tmp=0
if tt>0 then
for i=1 to tt
tmp=tmp+nn(i)
next
tmp=tmp+nn(tt+1)*(minute(time)+second(time)/60)/60
mm(cd+1)=temp/tmp*nn(25)
tmp=0
for i=1 to cd
tmp=tmp+mm(i)*(cd+1-i)
next
tmp=tmp+mm(cd+1)*(cd-cd/(days/100+1))*jq
temp=tmp
tmp=0
for i=1 to cd
tmp=tmp+cd+1-i
next
tmp=tmp+(cd-cd/(days/100+1))*jq
temp=temp/tmp
end if
%>
<div id="ForSee" style="position:absolute; top:122px; z-index:4; left: 310px; width: 600px;">
<form method="send" action="daydata.asp"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">预测今日总流量:<%=int(temp*1000)/1000%> 预测依赖的天数:<input name="Days" type="text" value=<%=cd%> size="2"><input name="sub" type="submit" value="确定"> <a href="ForSeeAnalyze.asp?days=<%=cd%>" target="_blank">进一步分析</a> <a href="ForSeeStatistic.asp?days=<%=cd%>">预测分析</a></font></form></div>
<%
average=total/t
dh=30
%>
<div id="ShowData" style="position:absolute; left:5px; top:475px; width:100%; height:118px; z-index:3; background-color: #FFFFFF;" align="center">
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<table width="85%" border="1" cellspacing="1" cellpadding="1">
<tr align="center">
<th width="10%" scope="col">时间段:</th>
<th width="2%" scope="col">0</th>
<th width="2%" scope="col">1</th>
<th width="2%" scope="col">2</th>
<th width="2%" scope="col">3</th>
<th width="2%" scope="col">4</th>
<th width="2%" scope="col">5</th>
<th width="2%" scope="col">6</th>
<th width="2%" scope="col">7</th>
<th width="2%" scope="col">8</th>
<th width="2%" scope="col">9</th>
<th width="2%" scope="col">10</th>
<th width="2%" scope="col">11</th>
<th width="2%" scope="col">12</th>
<th width="2%" scope="col">13</th>
<th width="2%" scope="col">14</th>
<th width="2%" scope="col">15</th>
<th width="2%" scope="col">16</th>
<th width="2%" scope="col">17</th>
<th width="2%" scope="col">18</th>
<th width="2%" scope="col">19</th>
<th width="2%" scope="col">20</th>
<th width="2%" scope="col">21</th>
<th width="2%" scope="col">22</th>
<th width="2%" scope="col">23</th>
<th width="5%" scope="col">Total</th>
</tr>
<tr align="center">
<td>流量:</td>
<%
for i=1 to 25
%>
<td><font color="#<%if nn(i)=max then response.Write("FF000") else if nn(i)=min then response.Write("0000FF") else response.Write("000000")%>"><%=nn(i)%></font></td>
<%
next
%>
</tr>
</table>
</font>
</div>
<div id="ShowData" style="position:absolute; left:5px; top:580px; width:320px; height:10px; z-index:4; background-color: #FFFFFF;"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">总流量:<%=Total%>;平均工作时流量:<%=int(average*100)/100%><br>最高总时流量:<%=Max%>;最低总时流量:<%=Min%></font></div>
<div id="ShowData" style="position:absolute; left:90px; top:600px; width:<%=24*(dh+5)%>px; height:49px; z-index:3; background-color: #FFFFFF;" align="center">网站总流量分时统计图</div>
<%
for i=1 to 24
%>
<div id="ShowData" style="position:absolute; left:<%=90+(i-1)*(dh+5)%>px; top:630px; width:<%=dh%>px; height:10px; z-index:3; background-color: #FFFFFF;" align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=nn(i)%></font></div>
<div onMouseOver="ShowDays.innerHTML='<%=i-1%>’;ShowDays.style.left=event.x-45;ShowDays.style.top=900" id="ShowData" style="position:absolute; left:<%=90+(i-1)*(dh+5)%>px; top:600px; width:<%=dh%>px; height:<%=50+250*nn(i)/max%>px; z-index:2; background-color:<%if nn(i)=max then response.Write("#FF0000") else if nn(i)=min then response.Write("#0000FF") else response.Write("#666666")%>;"> </div>
<%
next
%>
<div id="ShowData" style="position:absolute; left:<%=90-dh*0.1/2%>px; top:600px; width:<%=24*(dh+5)%>px; height:<%=50+250*average/max%>px; z-index:1; background-color:#FFFF00;"> </div>
<div id="ShowData" style="position:absolute; left:5px; top:925px; width:100%; height:10px; z-index:3; background-color: #FFFFFF;" align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">请使用1024*768分辨率 IE6.0浏览本站为最佳效果<br><script src="image1/Email.js"></script><BR>Copyright©2002-2005 梦幻工作室</font></div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站流量预测统计图</title>
</head>
<body>
<%
Dim Strconn
Dim Conn
Dim RS
Strconn="DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("board.mdb")
Set Conn=server.createobject("ADODB.CONNECTION")
conn.open strconn
Set Rs=server.CreateObject("adodb.recordset")
rs.open "select * from datedata",conn,1,1
CD=request.QueryString("Days")
if CD=0 then CD=5
Dim TT
TT=hour(time)
Redim MM(CD+1)
Dim J
Dim TTT
dim NN(25)
rs.movefirst
do while not rs.eof
for i=1 to 25
nn(i)=nn(i)+rs(i+1)
next
rs.movenext
loop
Dim PP(25)
rs.movelast
for i=1 to 25
pp(i)=rs(i+1)
nn(i)=nn(i)-pp(i)
next
nn(25)=0
for i=0 to tt-1
nn(25)=nn(25)+nn(i+1)
next
nn(25)=nn(25)+nn(tt+1)/60*(minute(time)+second(time)/60)
Dim Tmp
Dim Temp
Dim Tmps
For i=1 to cd
response.Write("第" & cstr(i) & "天数据 ")
rs.moveprevious
tmps=0
temp=0
if tt<23 then
for j=tt+3 to 25
tmps=tmps+rs(j)’计算此日剩余时间总流量
next
tmps=tmps+rs(tt+2)*(1-(minute(time)+second(time)/60)/60)
end if
response.Write("剩余总量额度:" & cstr(int(tmps*100)/100) & "<BR>")
mm(i)=pp(25)
if tt>0 then
for j=0 to tt-1
tmp=rs(j+2)
if tmp=0 then tmp=tmps
if tmp=0 then tmp=1
temp=pp(j+1)/tmp*tmps’计算由此日单个时间流量得到的剩余时间总流量
response.Write(cstr(j) & "点:" & cstr(int(temp*100)/100) & ";")
temp=temp*nn(j+1)/nn(25)’得到按流量加权值
response.Write(cstr(int(temp*100)/100) & " ")
mm(i)=mm(i)+temp
if int((j+1)/4)*4=(j+1) then response.Write("<BR>")
next
tmp=rs(tt+2)/60*(minute(time)+second(time)/60)
if tmp=0 then tmp=tmps
if tmp=0 then tmp=1
temp=pp(tt+1)/tmp*tmps
response.Write(cstr(tt) & "点:" & cstr(int(temp*100)/100) & ";")
temp=temp*nn(tt+1)/nn(25)
response.Write(cstr(int(temp*100)/100) & " ")
mm(i)=mm(i)+temp
end if
response.Write("<BR>")
next
tmps=0
if tt<23 then
for j=tt+1 to 23
tmps=tmps+nn(j+1)
next
end if
response.Write("平均值统计数据 剩余总量额度:" & cstr(int(tmps*100)/100) & "<BR>")
if tt>0 then
for j=0 to tt-1
tmp=nn(j+1)
if tmp=0 then tmp=tmps
if tmp=0 then tmp=1
temp=pp(j+1)/tmp*tmps
response.Write(cstr(j) & "点:" & cstr(int(temp*100)/100) & ";")
temp=temp*nn(j+1)/nn(25)
response.Write(cstr(int(temp*100)/100) & " ")
mm(cd+1)=mm(cd+1)+temp
if int((j+1)/4)*4=(j+1) then response.Write("<BR>")
next
tmp=nn(tt+1)/60*(minute(time)+second(time)/60)
if tmp=0 then tmp=tmps
if tmp=0 then tmp=1
temp=pp(tt+1)/tmp*tmps
response.Write(cstr(tt) & "点:" & cstr(int(temp*100)/100) & ";")
temp=temp*nn(tt+1)/nn(25)
response.Write(cstr(int(temp*100)/100) & " ")
mm(cd+1)=mm(cd+1)+temp
end if
for i=1 to cd
total=total+mm(i)*(cd+1-i)
next
total=total+mm(cd+1)*(cd-cd/(days/100+1))
total=total/((1+cd)*cd/2+(cd-cd/(days/100+1)))
%>
<P>预测值:<%=total%></P>
<P>
</P>
<form name="form1" method="send" action="forseeanalyze.asp">
请输入预测倚赖的天数:<input name="days" type="text" size="5" value="<%=cd%>">
<input type="submit" name="Submit" value="确定">
</form>
<P><a href="TimeAnalyze.asp?Days=<%=cd*2%>" target="_blank"><font color="#000000">分时分析</font></a></P>
</body>
</html>
<%
‘DYGHBL
‘AZYC
‘BZYC
‘SJXS
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>预测结果统计</title>
</head>
<body>
<%
Dim Strconn
Dim Conn
Dim RS
Strconn="DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("board.mdb")
Set Conn=server.createobject("ADODB.CONNECTION")
conn.open strconn
Set Rs=server.CreateObject("adodb.recordset")
rs.open "select * from datedata",conn,1,1
CD=request.QueryString("Days")
if CD=0 then CD=10
Dim DD
DD=request.QueryString("DataDay")
if dd=0 then dd=0
Dim JQ
JQ=request.QueryString("Power")
if jq=0 then jq=10
Dim TT
if dd=0 then
tt=hour(time)
if tt<9 then tt=23
else
tt=23
end if
Dim WCA()
redim wca(tt)
Dim QCA()
redim qca(tt)
Dim FSA()
redim fsa(tt)
forseea=0
if cd<=0 then exit function
dim a
rs.movelast
dim i
for i=0 to dd
rs.moveprevious
next
rs.movenext
for i=0 to tt
a=a+rs(cstr(i))
next
dim b()
dim c()
redim b(cd)
redim c(cd)
dim j
for j=1 to cd
if not rs.bof then
rs.moveprevious
if not rs.bof then
for i=0 to tt
tmp=b(j)
tmp=rs(cstr(i))
b(j)=b(j)+rs(cstr(i))
next
c(j)=rs("total")
if b(j)=0 then b(j)=c(j)
end if
end if
if b(j)=0 then b(j)=1
next
rs.movelast
for i=0 to dd
rs.moveprevious
next
dim Days
do while not rs.bof
for i=0 to tt
b(0)=b(0)+rs(cstr(i))
next
c(0)=c(0)+rs("total")
days=days+1
rs.moveprevious
loop
days=days+1-dd
if days<0 then days=0
if b(0)=0 then b(0)=c(0)
if b(0)=0 then b(0)=1
dim d()
redim d(cd)
for j=1 to cd
d(j)=a/b(j)*c(j)
next
d(0)=a/b(0)*c(0)
a=0
for i=1 to cd
a=a+d(i)*(cd+1-i)
next
a=a+d(0)*(cd-cd/(days/100+1))*jq
dim Tmp
tmp=(cd+1)*cd/2+(cd-cd/(days/100+1))*jq
a=a/tmp
dim wc
dim qc
for i=1 to cd
qc=qc+abs(d(i)-a)*(d(i)-a)*(cd+1-i)
wc=wc+(d(i)-a)^2*(cd+1-i)
next
wc=wc+(d(0)-a)^2*(cd-cd/(days/100+1))*jq
qc=qc+abs(d(0)-a)*(d(0)-a)*(cd-cd/(days/100+1))*jq
wc=wc/tmp
qc=qc/tmp
wc=sqr(wc)
wca(tt)=wc
qca(tt)=qc
if qca(tt)>0 then
qca(tt)=sqr(qca(tt))
else
qca(tt)=-1*sqr(-1*qca(tt))
end if
forseea=a
End Function
dim Data()
redim data(CD+1,TT+3)
rs.movelast
dim i
for i=0 to dd
rs.moveprevious
next
rs.movenext
for i=0 to tt
data(0,i)=rs(cstr(i))
data(0,tt+2)=data(0,tt+2)+data(0,i)
next
for i=tt+1 to 23
data(0,tt+1)=data(0,tt+1)+rs(cstr(i))
next
dim j
for i=1 to cd
if not rs.bof then
rs.moveprevious
if not rs.bof then
for j=0 to tt
data(i,j)=rs(cstr(j))
data(cd+1,j)=data(cd+1,j)+data(i,j)
data(cd+1,tt+2)=data(cd+1,tt+2)+data(i,j)
next
for j=tt+1 to 23
data(i,tt+1)=data(i,tt+1)+rs(cstr(j))
data(cd+1,tt+1)=data(cd+1,tt+1)+rs(cstr(j))
next
end if
end if
next
for i=1 to cd+1
data(i,tt+3)=data(0,tt+2)
for j=0 to tt
if data(i,j)=0 then data(i,j)=data(i,tt+1)
if data(i,j)=0 then data(i,j)=1
data(i,tt+3)=data(i,tt+3)+data(0,j)/data(i,j)*data(i,tt+1)*data(cd+1,j)/data(cd+1,tt+2)
next
next
for i=1 to cd
forseeb=forseeb+data(i,tt+3)*(cd+1-i)
next
forseeb=forseeb+data(cd+1,tt+3)*(cd-cd/(days/100+1))*jq
forseeb=forseeb/((cd+1)*cd/2+(cd-cd/(days/100+1))*jq)
dim WC
dim QC
dim Tmp
for i=1 to cd
for j=0 to tt
tmp=(data(0,tt+2)+data(0,j)/data(i,j)*data(i,tt+1)-forseeb)^2*data(cd+1,j)/data(cd+1,tt+2)*(cd+1-i)/((cd+1)*cd/2+(cd-cd/(days/100+1))*jq)
wc=wc+tmp
if data(0,tt+2)+data(0,j)/data(i,j)*data(i,tt+1)>forseeb then
qc=qc+tmp
else
qc=qc-tmp
end if
next
next
for j=0 to tt
tmp=(data(0,tt+2)+data(0,j)/data(i,j)*data(i,tt+1)-forseeb)^2*data(cd+1,j)/data(cd+1,tt+2)*(cd-cd/(days/100+1))*jq/((cd+1)*cd/2+(cd-cd/(days/100+1))*jq)
wc=wc+tmp
if data(0,tt+2)+data(0,j)/data(i,j)*data(i,tt+1)>forseeb then
qc=qc+tmp
else
qc=qc-tmp
end if
next
wca(tt)=sqr(wc)
if qc<0 then
qca(tt)=-sqr(-qc)
else
qca(tt)=sqr(qc)
end if
End Function
aa=int(aa*100)/100
change=cstr(aa)
if bb>=len(cstr(aa)) then
change=space(bb-len(cstr(aa))) & cstr(aa)
change=replace(change," "," ")
end if
End Function
Dim TTS(1)
Dim AVERAGE
if dd=0 then
for i=0 to tt
average=average+data(i)
next
average=average/(tt+1)
else
average=data(tt)
end if
Dim Tmp,Tmps
for i=0 to tt
tmp=tmp+(data(i)-average)^2
tmps=tmps+abs(data(i)-average)*(data(i)-average)
next
tmp=tmp/(tt+1)
tmps=tmps/(tt+1)
tts(0)=sqr(tmp)
tts(1)=tmps
if tmps>0 then
tts(1)=sqr(tmps)
else
tts(1)=-1*sqr(-1*tmps)
end if
t(0)=tts(0)
t(1)=tts(1)
End Sub
Dim I
Dim T
Dim B
ReDim B(TT)
Dim C
rs.movelast
for i=0 to dd
rs.moveprevious
next
do while not rs.bof
for i=0 to tt
b(i)=b(i)+rs(cstr(i))
next
rs.moveprevious
loop
for i=0 to tt
if tmp(i)>0 then
ttt=ttt+tmp(i)*b(i)
c=c+b(i)
end if
next
ttt=ttt/c
End Function
%>
<%’以上是待用函数和变量DYGHBL%>
<div id="ForSeeAData" style="position:absolute; top:20px; left:50px; width:900px; height:300px; z-index:8; overflow: scroll; background-color: #FFFFFF;" align="center">
<font size="2">
<%
rs.movelast
for i=0 to dd
rs.moveprevious
next
rs.movenext
response.Write("<b>A种预测结果统计(" & cd & "天预测,")
if dd>0 then response.Write("当天") else response.Write("目前") end if
response.Write("总流量:" & rs("total") & "):</b><BR>")
Dim I
Dim Max
Dim MMax
Dim Min
min=100
Dim DH
DH=24
Dim HD
HD=1.5
Dim ST
st=50
Dim Average
average=rs("total")
for i=0 to tt
fsa(i)=forseea(i)
if fsa(i)>0 then
if fsa(i)>max then max=fsa(i)
if fsa(i)<min then min=fsa(i)
if fsa(i)+wca(i)/2>mmax then mmax=fsa(i)+wca(i)/2
response.Write("时间:" & change(i,2) & ",预测值:" & change(fsa(i),7) & ",离散程度:" & change(wca(i),7) & ",趋势值:" & change(qca(i),7) & ",误差大小:" & change((fsa(i)-average),7) & ",误差:" & change(((fsa(i)-average)/average*100),7) & "%<br>")
end if
next
Dim T(1)
wcfx fsa,T
%>
<BR>总预测误差:<%=change((t(0)/average*100),7)%>%,总误差趋势:<%=change((t(1)/average*100),7)%>%
<BR>最大预测值:<%=change(max,7)%>,最小预测值:<%=change(min,7)%>,峰值差:<%=change((max-min),7)%>
</font>
</div>
<div id="ShowSetting" style="position:absolute; top:320px; left:50px; width:800px; height:5px; z-index:8;">
<form action="forseestatistic.asp" method="send">
预测统计的天数:<input name="Days" type="text" value="<%=cd%>" size="5">
预测统计的日期:<input name="DataDay" type="text" value="<%=dd%>" size="5">天前
平均流量权重:<input name="Power" type="text" value="<%=jq%>" size="5">
<input type="submit" value="确定">
</form>
</div>
<div id="ShowData" style="position:absolute; background-color:#FFFFFF; top:650px; left:<%=st-dh/3*5%>px; width:<%=24*dh*hd+dh/3*5%>; height:50; z-index:7;"> </div>
<div id="ShowTime" style="position:absolute; background-color:#FFFFFF; top:680px; left:900px; width:350px; height:10px; z-index:8;" align="center"><font size="2"> </font></div>
<%
if mmax=0 then mmax=average
for i=0 to tt
%>
<div onMouseMove="ShowTime.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#0099FF; top:650px; left:<%=st+i*(dh*hd)%>px; width:<%=dh%>; height:<%=50+250/mmax*fsa(i)%>; z-index:3;"> </div>
<div onMouseMove="ShowTime.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#00FF00; top:650px; left:<%=st+i*(dh*hd)%>px; width:<%=dh%>; height:<%=50+250/mmax*(fsa(i)-wca(i)/2)%>; z-index:4;"> </div>
<div onMouseMove="ShowTime.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#FF00FF; top:650px; left:<%=st+i*(dh*hd)%>px; width:<%=dh%>; height:<%=50+250/mmax*(fsa(i)+wca(i)/2)%>; z-index:2;"> </div>
<div onMouseMove="ShowTime.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#FFFF00; top:650px; left:<%=st+i*(dh*hd)+dh/4%>px; width:<%=dh/4%>; height:<%=50+250/mmax*(fsa(i)-qca(i)/2)%>; z-index:6;"> </div>
<div onMouseMove="ShowTime.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#000000; top:650px; left:<%=st+i*(dh*hd)+dh/4*2%>px; width:<%=dh/4%>; height:<%=50+250/mmax*(fsa(i)+qca(i)/2)%>; z-index:5;"> </div>
<%
next
for i=9 to tt-1
min=abs(fsa(i+1)-fsa(i))
max=abs(fsa(i)-fsa(i-1))
if max>min and fsa(i-1)>0 then
if wca(i)/fsa(i)<0.5 and abs(qca(i)/fsa(i))<0.2 then
%>
<div id="ShowData" style="position:absolute; background-color:#BBBBBB; top:650px; left:<%=st-dh/3*5%>px; width:<%=dh/4+(i+1)*dh*hd%>px; height:300px; z-index:1"> </div>
<div id="ShowData" style="position:absolute; background-color:#DDDDDD; top:650px; left:<%=st+i*(dh*hd)-dh/4%>px; width:<%=dh/4+(24-i)*dh*hd%>px; height:300px; z-index:1"> </div>
<%
exit for
end if
end if
next
Dim HH
Dim TMP
hh=i
nums=tt-hh
if nums<=0 then nums=1
max=0
for i=hh to tt-1
max=max+fsa(i)
next
max=max/nums
tmp=max
max=0
for i=hh to tt-1
max=max+fsa(i)+wca(i)/2
next
max=max/nums
%>
<div onMouseMove="ShowTime.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((max/average*100-100),7)%>%’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#FF00FF; top:650px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*max%>px; z-index:4"> </div>
<%
max=0
for i=hh to tt-1
max=max+fsa(i)+abs(qca(i)/2)
next
max=max/nums
%>
<div onMouseMove="ShowTime.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((max/average*100-100),7)%>%’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#000000; top:650px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*max%>px; z-index:4"> </div>
<div onMouseMove="ShowTime.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((tmp/average*100-100),7)%>%’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#0099FF; top:650px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*tmp%>px; z-index:4"> </div>
<%
max=0
for i=hh to tt-1
max=max+fsa(i)-abs(qca(i)/2)
next
max=max/nums
%>
<div onMouseMove="ShowTime.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((max/average*100-100),7)%>%’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#FFFF00; top:650px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*max%>px; z-index:4"> </div>
<%
max=0
for i=hh to tt-1
max=max+fsa(i)-wca(i)/2
next
max=max/nums
%>
<div onMouseMove="ShowTime.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((max/average*100-100),7)%>%’;ShowTime.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#00FF00; top:650px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*max%>px; z-index:4"> </div>
<div id="ShowData" style="position:absolute; background-color:#888888; top:650px; left:<%=st-dh/3*5%>px; width:<%=24*dh*hd+dh/3*5%>; height:<%=50+250/mmax*average%>; z-index:1;"> </div>
<div id="ForSeeBData" style="position:absolute; top:370px; left:50px; width:900px; height:300px; z-index:8; overflow: scroll; background-color: #FFFFFF;" align="center">
<font size="2">
<%
rs.movelast
for i=0 to dd
rs.moveprevious
next
rs.movenext
response.Write("<b>B种预测结果统计(" & cd & "天预测,")
if dd>0 then response.Write("当天") else response.Write("目前") end if
response.Write("总流量:" & rs("total") & "):</b><BR>")
min=100
DH=24
HD=1.5
st=50
average=rs("total")
for i=0 to tt
fsa(i)=forseeb(i)
if fsa(i)>0 then
if fsa(i)>max then max=fsa(i)
if fsa(i)<min then min=fsa(i)
if fsa(i)+wca(i)/2>mmax then mmax=fsa(i)+wca(i)/2
response.Write("时间:" & change(i,2) & ",预测值:" & change(fsa(i),7) & ",离散程度:" & change(wca(i),7) & ",趋势值:" & change(qca(i),7) & ",误差大小:" & change((fsa(i)-average),7) & ",误差:" & change(((fsa(i)-average)/average*100),7) & "%<br>")
end if
next
wcfx fsa,T
%>
<BR>总预测误差:<%=change((t(0)/average*100),7)%>%,总误差趋势:<%=change((t(1)/average*100),7)%>%
<BR>最大预测值:<%=change(max,7)%>,最小预测值:<%=change(min,7)%>,峰值差:<%=change((max-min),7)%>
</font>
</div>
<div id="ShowSetting" style="position:absolute; top:970px; left:50px; width:800px; height:5px; z-index:8;">
<form action="forseestatistic.asp" method="send">
预测统计的天数:<input name="Days" type="text" value="<%=cd%>" size="5">
预测统计的日期:<input name="DataDay" type="text" value="<%=dd%>" size="5">天前
平均流量权重:<input name="Power" type="text" value="<%=jq%>" size="5">
<input type="submit" value="确定">
</form>
</div>
<div id="ShowData" style="position:absolute; background-color:#FFFFFF; top:950px; left:<%=st-dh/3*5%>px; width:<%=24*dh*hd+dh/3*5%>; height:50; z-index:7;"> </div>
<div id="ShowTimeB" style="position:absolute; background-color:#FFFFFF; top:980px; left:900px; width:350px; height:10px; z-index:8;" align="center"><font size="2"> </font></div>
<%
if mmax=0 then mmax=average
for i=0 to tt
%>
<div onMouseMove="ShowTimeB.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#0099FF; top:950px; left:<%=st+i*(dh*hd)%>px; width:<%=dh%>; height:<%=50+250/mmax*fsa(i)%>; z-index:3;"> </div>
<div onMouseMove="ShowTimeB.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#00FF00; top:950px; left:<%=st+i*(dh*hd)%>px; width:<%=dh%>; height:<%=50+250/mmax*(fsa(i)-wca(i)/2)%>; z-index:4;"> </div>
<div onMouseMove="ShowTimeB.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#FF00FF; top:950px; left:<%=st+i*(dh*hd)%>px; width:<%=dh%>; height:<%=50+250/mmax*(fsa(i)+wca(i)/2)%>; z-index:2;"> </div>
<div onMouseMove="ShowTimeB.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#FFFF00; top:950px; left:<%=st+i*(dh*hd)+dh/4%>px; width:<%=dh/4%>; height:<%=50+250/mmax*(fsa(i)-qca(i)/2)%>; z-index:6;"> </div>
<div onMouseMove="ShowTimeB.innerHTML='<%=i%>点:预测<%=change(fsa(i),6)%>,范围<%=change(wca(i),6)%>;<%=change(qca(i),6)%>’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#000000; top:950px; left:<%=st+i*(dh*hd)+dh/4*2%>px; width:<%=dh/4%>; height:<%=50+250/mmax*(fsa(i)+qca(i)/2)%>; z-index:5;"> </div>
<%
next
for i=9 to tt-1
min=abs(fsa(i+1)-fsa(i))
max=abs(fsa(i)-fsa(i-1))
if max>min and fsa(i-1)>0 then
if wca(i)/fsa(i)<1.2 and abs(qca(i))/fsa(i)<0.8 then
%>
<div id="ShowData" style="position:absolute; background-color:#BBBBBB; top:950px; left:<%=st-dh/3*5%>px; width:<%=dh/4+(i+1)*dh*hd%>px; height:300px; z-index:1"> </div>
<div id="ShowData" style="position:absolute; background-color:#DDDDDD; top:950px; left:<%=st+i*(dh*hd)-dh/4%>px; width:<%=dh/4+(24-i)*dh*hd%>px; height:300px; z-index:1"> </div>
<%
exit for
end if
end if
next
hh=i
nums=tt-hh
if nums<=0 then nums=1
max=0
for i=hh to tt-1
max=max+fsa(i)
next
max=max/nums
tmp=max
max=0
for i=hh to tt-1
max=max+fsa(i)+wca(i)/2
next
max=max/nums
%>
<div onMouseMove="ShowTimeB.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((max/average*100-100),7)%>%’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#FF00FF; top:950px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*max%>px; z-index:4"> </div>
<%
max=0
for i=hh to tt-1
max=max+fsa(i)+abs(qca(i)/2)
next
max=max/nums
%>
<div onMouseMove="ShowTimeB.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((max/average*100-100),7)%>%’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#000000; top:950px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*max%>px; z-index:4"> </div>
<div onMouseMove="ShowTimeB.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((tmp/average*100-100),7)%>%’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#0099FF; top:950px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*tmp%>px; z-index:4"> </div>
<%
max=0
for i=hh to tt-1
max=max+fsa(i)-abs(qca(i)/2)
next
max=max/nums
%>
<div onMouseMove="ShowTimeB.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((max/average*100-100),7)%>%’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#FFFF00; top:950px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*max%>px; z-index:4"> </div>
<%
max=0
for i=hh to tt-1
max=max+fsa(i)-wca(i)/2
next
max=max/nums
%>
<div onMouseMove="ShowTimeB.innerHTML=’稳值<%=change(tmp,4)%><BR><%=change((max/average*100-100),7)%>%’;ShowTimeB.style.left=event.x-175;" id="ShowData" style="position:absolute; background-color:#00FF00; top:950px; left:<%=st-dh/3*4%>px; width:<%=dh%>px; height:<%=50+250/mmax*max%>px; z-index:4"> </div>
<div id="ShowData" style="position:absolute; background-color:#888888; top:950px; left:<%=st-dh/3*5%>px; width:<%=24*dh*hd+dh/3*5%>; height:<%=50+250/mmax*average%>; z-index:1;"> </div>
<div id="ShowDataTable" style="position:absolute; background-color:#FFFFFF; top:1260px; left:10px; width:950px; height:50px; z-index:10;" align="center">
<table border="1" align="center" cellpadding="0" cellspacing="1">
<tr>
<td align="right"><B>时间:</B></td>
<%
tt=23
for i=0 to tt
%>
<td align="center"><B><%=change(i,2)%></B></td>
<%next%>
</tr>
<tr>
<td align="right"><B>当日:</B></td>
<%
rs.movelast
for i=0 to dd
rs.moveprevious
next
rs.movenext
max=0
average=0
min=100
for i=0 to tt
if rs(cstr(i))>max then max=rs(cstr(i))
if rs(cstr(i))>0 and rs(cstr(i))<min then min=rs(cstr(i))
average=average+rs(cstr(i))
%>
<td align="center"><%=rs(cstr(i))%></td>
<%
next
average=average/tt
%>
</tr>
<tr>
<td align="right"><B>总量:</B></td>
<%
Dim Data()
Redim Data(tt)
rs.moveprevious
do while not rs.bof
for i=0 to tt
data(i)=data(i)+rs(cstr(i))
next
rs.moveprevious
loop
Dim MMin
Dim MAverage
mmax=0
mmin=100
for i=0 to tt
if data(i)>mmax then mmax=data(i)
if data(i)<mmin and data(i)>0 then mmin=data(i)
maverage=maverage+data(i)
%>
<td align="center"><%=data(i)%></td>
<%
next
maverage=maverage/tt
%>
</tr>
</table>
</div>
<div id="ShowDataShadow" style="position:absolute; background-color:#FFFFFF; top:1320px; left:10px; width:950px; height:50px; z-index:5;"> </div>
<%
rs.movelast
for i=0 to dd
rs.moveprevious
next
rs.movenext
Dim CLA
Dim CLB
Dim TEMP
Dim TEMPS
temp=(max+min)/2
temps=(mmax+mmin)/2
Dim TJ
tj=2
for i=0 to tt
if rs(cstr(i))=max then
cla="009900"
else
if rs(cstr(i))=min then
cla="00CCFF"
else
if rs(cstr(i))>temp then
cla="00"
tmp=cstr(hex(int(153/(max-temp)^tj*(rs(cstr(i))-temp)^tj)))
tmp=replace(space(2-len(tmp))," ","0") & tmp
cla=cla & tmp
tmp=cstr(hex(int(255-255/(max-temp)^tj*(rs(cstr(i))-temp)^tj)))
tmp=replace(space(2-len(tmp))," ","0") & tmp
cla=cla & tmp
else
if rs(cstr(i))>0 then
cla="00"
tmp=cstr(hex(int(204/(min-temp)^tj*(rs(cstr(i))-temp)^tj)))
tmp=replace(space(2-len(tmp))," ","0") & tmp
cla=cla & tmp & "FF"
end if
end if
end if
end if
if data(i)=mmax then
clb="FF00FF"
else
if data(i)=mmin then
clb="FFAA55"
else
if data(i)>temps then
clb="FF00"
tmp=cstr(hex(int(255/(mmax-temps)^tj*(data(i)-temps)^tj)))
tmp=replace(space(2-len(tmp))," ","0") & tmp
clb=clb & tmp
else
if data(i)>0 then
clb="FF"
tmp=cstr(hex(int(170/(mmin-temps)^tj*(data(i)-temps)^tj)))
tmp=replace(space(2-len(tmp))," ","0") & tmp
clb=clb & tmp
tmp=cstr(hex(int(85/(mmin-temps)^tj*(data(i)-temps)^tj)))
tmp=replace(space(2-len(tmp))," ","0") & tmp
clb=clb & tmp
end if
end if
end if
end if
%>
<div id="ShowDataTime" style="position:absolute; top:1345px; left:<%=st+i*dh*hd%>px; width:<%=dh%>px; height:5px; z-index:6;" align="center"><%=i%></div>
<div onMouseMove="ShowDataDetail.innerHTML='<%=i & "点流量:<BR>当日:" & change(rs(cstr(i)),3) & "<BR>总量:" & change(data(i),3)%>’;ShowDataDetail.style.left=event.x-60;" id="ShowDataGraphicA" style="position:absolute; background-color:#<%=cla%>; top:1320px; left:<%=st+i*dh*hd+dh/3%>px; width:<%=dh/3%>px; height:<%=50+200*rs(cstr(i))/max%>px; z-index:4;"> </div>
<div onMouseMove="ShowDataDetail.innerHTML='<%=i & "点流量:<BR>当日:" & change(rs(cstr(i)),3) & "<BR>总量:" & change(data(i),3)%>’;ShowDataDetail.style.left=event.x-60;" id="ShowDataGraphicB" style="position:absolute; background-color:#<%=clb%>; top:1320px; left:<%=st+i*dh*hd%>px; width:<%=dh%>px; height:<%=50+200*data(i)/mmax%>px; z-index:3;"> </div>
<%
next
if (average/max)>(maverage/mmax) then
j=1
else
j=2
end if
%>
<div onMouseMove="ShowDataDetail.innerHTML='<%="平均流量:<BR>当日平均:<br>" & change(average,3) & "<BR>总量平均:<BR>" & change(maverage,3)%>’;ShowDataDetail.style.left=event.x-60;" id="ShowDataGraphicA" style="position:absolute; background-color:#CCCCCC; top:1320px; left:<%=st%>px; width:<%=dh*hd*24%>px; height:<%=50+200*average/max%>px; z-index:<%=j%>;"> </div>
<div onMouseMove="ShowDataDetail.innerHTML='<%="平均流量:<BR>当日平均:<br>" & change(average,3) & "<BR>总量平均:<BR>" & change(maverage,3)%>’;ShowDataDetail.style.left=event.x-60;" id="ShowDataGraphicB" style="position:absolute; background-color:#FFFF00; top:1320px; left:<%=st%>px; width:<%=dh*hd*24%>px; height:<%=50+200*maverage/mmax%>px; z-index:<%=3-j%>;"> </div>
<div id="ShowDataDetail" style="position:absolute; background-color:#FFFFFF; top:1575px; left:900px; width:120px; height:10px; z-index:6;" align="center"><font size="2"> </font></div>
<div id="BottomData" style="position:absolute; top:1700px; left:10px; width:1000px; height:1000px; z-index:1;" align="center">
<iframe src="counter.asp" scrolling="auto" height="2000px" width="1000px"></iframe>
</div>
<div id="BottomShow" style="position:absolute; top:1650px; left:10px; width:900px; height:50px; z-index:1;" align="center"><a href="DayData.asp"><font color="#000000" size="4"><b>返回</b></font></a></div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>每日流量统计图</title>
<style>
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #FF00FF;
text-decoration: underline;
}
a:active {
color: #FF0000;
text-decoration: underline overline;
}
</style>
</head>
<body>
<%
Dim Strconn
Dim Conn
dim RS
Strconn="DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("board.mdb")
Set Conn=server.createobject("ADODB.CONNECTION")
conn.open strconn
Set Rs=server.CreateObject("adodb.recordset")
Dim DD
Dim DH
Dim Max
Dim Min
Dim T
Dim Average
max=1
min=100
dd=request.QueryString("Date")
if dd="" then dd=date
rs.open "select * from datedata",conn,1,1
rs.movefirst
do while not rs.eof
if cstr(rs("date"))=cstr(dd) then
%>
<div align="center">
<table width="85%" border="1" cellspacing="1" cellpadding="1">
<caption align="top">
您要检索的日期:<%=dd%>
</caption>
<tr align="center">
<th width="10%" scope="col">时间段:</th>
<th width="2%" scope="col">0</th>
<th width="2%" scope="col">1</th>
<th width="2%" scope="col">2</th>
<th width="2%" scope="col">3</th>
<th width="2%" scope="col">4</th>
<th width="2%" scope="col">5</th>
<th width="2%" scope="col">6</th>
<th width="2%" scope="col">7</th>
<th width="2%" scope="col">8</th>
<th width="2%" scope="col">9</th>
<th width="2%" scope="col">10</th>
<th width="2%" scope="col">11</th>
<th width="2%" scope="col">12</th>
<th width="2%" scope="col">13</th>
<th width="2%" scope="col">14</th>
<th width="2%" scope="col">15</th>
<th width="2%" scope="col">16</th>
<th width="2%" scope="col">17</th>
<th width="2%" scope="col">18</th>
<th width="2%" scope="col">19</th>
<th width="2%" scope="col">20</th>
<th width="2%" scope="col">21</th>
<th width="2%" scope="col">22</th>
<th width="2%" scope="col">23</th>
<th width="5%" scope="col">Total</th>
</tr>
<tr align="center">
<td>流量:</td>
<td><%=rs("0")%></td>
<td><%=rs("1")%></td>
<td><%=rs("2")%></td>
<td><%=rs("3")%></td>
<td><%=rs("4")%></td>
<td><%=rs("5")%></td>
<td><%=rs("6")%></td>
<td><%=rs("7")%></td>
<td><%=rs("8")%></td>
<td><%=rs("9")%></td>
<td><%=rs("10")%></td>
<td><%=rs("11")%></td>
<td><%=rs("12")%></td>
<td><%=rs("13")%></td>
<td><%=rs("14")%></td>
<td><%=rs("15")%></td>
<td><%=rs("16")%></td>
<td><%=rs("17")%></td>
<td><%=rs("18")%></td>
<td><%=rs("19")%></td>
<td><%=rs("20")%></td>
<td><%=rs("21")%></td>
<td><%=rs("22")%></td>
<td><%=rs("23")%></td>
<td><%=rs("Total")%></td>
</tr>
</table>
<form method="send" action="showdatedata.asp"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">您要检索的日期:<input name="Date" type="text" value="<%=date%>"><input name="sub" type="submit" value="确定"> <a href="DayData.asp">更多统计信息</a> <a href="counter.asp" target="_blank">返回</a> <a href="TimeAnalyze.asp">分时分析</a></font></form>
</div>
<%
dh=30
for i=0 to 23
if rs(cstr(i))>max then max=rs(cstr(i))
if rs(cstr(i))<min and rs(cstr(i))>0 then min=rs(cstr(i))
if rs(cstr(i))>=0 then t=t+1
next
average=rs("total")/t
%>
<div id="ShowData" style="position:absolute; left:5px; top:140px; width:340px; height:10px; z-index:4; background-color: #FFFFFF;"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">当日总量:<%=rs("Total")%>;当日平均量:<%=int(average*100)/100%><br>当日最高时量:<%=Max%>;当日最低时量:<%=min%></font></div>
<div id="ShowData" style="position:absolute; left:90px; top:150px; width:<%=24*(dh+5)%>px; height:49px; z-index:3; background-color: #FFFFFF;" align="center">网站流量统计图(日期:<%=dd%>)</div>
<%
for i=0 to 23
%>
<div id="ShowData" style="position:absolute; left:<%=90+i*(dh+5)%>px; top:180px; width:<%=dh%>px; height:10px; z-index:3; background-color:#FFFFFF;" align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=rs(cstr(i))%></font></div>
<div id="ShowData" style="position:absolute; left:<%=90+i*(dh+5)%>px; top:150px; width:<%=dh%>px; height:<%=50+250*rs(cstr(i))/max%>px; z-index:2; background-color:<%if rs(cstr(i))=max then response.Write("#FF0000") else if rs(cstr(i))=min then response.Write("#0000FF") else response.Write("#666666")%>;">..</div>
<%
next
%>
<div id="ShowData" style="position:absolute; left:<%=90-dh*0.1/2%>px; top:150px; width:<%=24*(dh+5)%>px; height:<%=50+250*average/max%>px; z-index:1; background-color:#FFFF00;">.</div>
<a href="TimeAnalyze.asp">分时分析</a></body>
<%
exit do
end if
rs.movenext
loop
if rs.eof then
%>
<div align="center">
抱歉!您所检索的日期不在资料保存范围中!请重新检索:<br>
<form method="send" action="showdatedata.asp"><font size="2">您要检索的日期:<input name="Date" type="text" value="<%=date%>"><input name="sub" type="submit" value="确定"></font></form>
</div>
<%
end if
rs.close
%>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>分时流量分析</title>
</head>
<body>
<%
Dim Strconn
Dim Conn
Dim RS
Strconn="DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("board.mdb")
Set Conn=server.createobject("ADODB.CONNECTION")
conn.open strconn
Set Rs=server.CreateObject("adodb.recordset")
rs.open "select * from datedata",conn,1,1
CD=request.QueryString("Days")
if CD=0 then CD=10
Dim TT
TT=hour(time)
Dim DD()
ReDim NN(TT*(cd+1)-1)
Redim DD(cd)
Dim I
Dim J
rs.movelast
for i=0 to cd
dd(i)=rs(1)
for j=0 to tt-1
nn(i*tt+j)=rs(cstr(j))
next
rs.moveprevious
next
Dim MM()
Dim MMax()
Dim Max
Redim MM(cd)
Redim MMax(tt-1)
for i=0 to cd
for j=0 to tt-1
mm(i)=mm(i)+nn(i*tt+j)
next
next
for j=0 to tt-1
mmax(j)=0
for i=0 to cd
if mmax(j)<nn(i*tt+j) then mmax(j)=nn(i*tt+j)
next
next
max=0
for i=0 to TT*(cd+1)-1
if max<nn(i) then max=nn(i)
next
Dim PP
pp=1.5
%>
<div id="TableShow" style="position:absolute; top:10px; left:10px; width:3000;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
<%for j=0 to int(tt/pp)%>
<td colspan="2"><%=j%>点:</td>
<%next%>
</tr>
<%for i=cd to 0 step -1%>
<tr>
<td><%=dd(i)%>:</td>
<% for j=0 to int(tt/pp)%>
<td><%=nn(i*tt+j)%></td>
<td><b><font color="#<%if nn(i*tt+j)=mmax(j) then if nn(i*tt+j)=max then response.Write("000000") else response.Write("0000FF") end if else response.Write("FF0000")%>"><%=replace(space(nn(i*tt+j))," ","|")%></font></b></td>
<% next%>
</tr>
<%next%>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
<%for j=int(tt/pp)+1 to tt-1%>
<td colspan="2"><%=j%>点:</td>
<%next%>
<td colspan="2">总流量:</td>
</tr>
<%for i=cd to 0 step -1%>
<tr>
<td><%=dd(i)%>:</td>
<% for j=int(tt/pp)+1 to tt-1%>
<td><%=nn(i*tt+j)%></td>
<td><b><font color="#<%if nn(i*tt+j)=mmax(j) then if nn(i*tt+j)=max then response.Write("000000") else response.Write("0000FF") end if else response.Write("FF0000")%>"><%=replace(space(nn(i*tt+j))," ","|")%></font></b></td>
<% next%>
<td><%=mm(i)%></td>
<td><font color="#FF0000"><%=replace(space(mm(i))," ","|")%></font></td>
</tr>
<%next%>
</table>
<br>
现在时间:<%=time%>;最高时流量:<%=max%><BR>
<form name="form1" method="send" action="timeanalyze.asp">
请输入统计天数:<input name="days" type="text" size="5" value="<%=cd%>">
<input type="submit" name="Submit" value="确定">
</form>
<a href="showdatedata.asp"><font color="#000000">返回</font></a></div>
</body>
</html>
日志0048 Leave a comment
My Resume Leave a comment
日志0047 2 comments
从白宫的工资单说起 中国公务员工资探究 Leave a comment
2006年5月26日,中央政治局召开会议,专门研究深化公务员工资改革问题。公务员工资改革不是公务员自己的事情,而是人民的事情,道理很简单,人民是纳税人,是公务员的衣食父母。所以,公务员改革没有人民的参与,就是非法,是盗取人民的钱财。公务员自己给自己涨工资的罪恶比强盗的罪恶有过之而无不及,虽然都是抢夺人民钱财,但强盗会受到法律的惩罚,而公务员则总能逍遥法外。要声明的是,我也是吃“皇粮”的,所以,那些政府官员看到我的文章不要误认为我有“仇官”心理。
根据2004年7月13日《华盛顿邮报》的报道,包括总统在内的白宫工作人员共有431名,他们的平均工资为67,750美元/年,比美国公民的平均工资高出0.8倍,美国公民的平均工资约为36,764美元/年。美国总统布什的工资为40万美元/年;副总统切尼的工资为18.14万美元/年;紧跟其后的17位高官的工资为15.7万美元/年;布什的私人秘书埃什利·埃斯杰斯的工资为7.3万美元/年;白宫内从事“辅助性”工作的几十名工作人员的工资为3万—4.5万美元/年,最低的要数白宫内部的话务员和邮政人员,他们的工资只有23,621美元/年
以上是美国首脑机关的平均工资,如果计算全国公务员平均工资的话,美国公务员的平均工资肯定要低于白宫的平均工资,全国公务员的平均工资也许相当于全国公民的平均工资或低于全国人民的平均工资。但值得肯定的是,美国全国公务员的平均工资绝对不会超出美国公民平均工资的0.8倍!
在一个法治的国家,公务员的权和利都要受到严格的制约,如果公务员自己给自己涨工资,这让他们听来是天大的笑话,人民是公务员的衣食父母,公务员的待遇当然是由人民制订,也就是公务员的工资标准要经过国会的批准。即使美国公务提出涨工资的法案得到批准,为了避免自己给自己涨工资之嫌,美国法律规定“利益回避”制度,即“谁提出涨工资,不给谁涨工资。”而是让下任官员受益,这就避免了公务员利用手中的权利为自己谋取私利的可能,也避免了公务员不干正事,天天琢磨给自己涨工资的现象。因为琢磨了半天,自己一分钱也得不到,只是“前人栽树,后人乘凉。”
研究美国宪政的人会知道,美国国会议员要涨工资,等了203年才在法律上有了个说法。这就是关于国会议员薪金变动的《第27条宪法修正案》,该修正案就有一句话:“新一届众议员选出之前,任何有关改变参议员和众议员的任职报酬的法律,均不得生效。”(No law, varying the compensation for the services of the Senators and Representatives, shall take effect, until an election of Representatives shall have intervened.)这个法案是1789年9月25日提出的,直到1992年5月7日才生效。作为当官的要想涨工资,首先要经过代表人民的参众两院三分之二多数的批准,然后还要由全国超过四分之三的州议会批准。
世界上任何国家都不像中国,电视、报纸、电台、网络几乎每天都喋喋不朽地谈论公务员工资话题,给人的感觉是公务员不是为人民服务,而是为自己捞钱。中国公务员工资近些年来的增长幅度我不必多说,这是有目共睹的,也是很难说准确的。根据官方的统计,2003年全国公务员年平均工资为15487元,而同时期的全国城镇单位在岗职工年均工资为16024元。这个数字的可信度有多大,读者可以根据自己周围的情况判断。
美国第1任总统华盛顿在1789年任职时的工资为25,000美元/年,可华盛顿没有领取,白干总统,分文不要。美国总统的这一工资标准一直延续到1873年第18任总统格兰特的第二任期,这时的工资为50,000美元/年,美国历史上的第1次总统加薪等了84年!36年后,美国总统第2次加薪,1909年,第27任总统塔夫脱的工资为75,000美元/年。第3次加薪是40年后的1949年,第33任总统杜鲁门在第二任期时的工资为 100,000美元/年。20年后,从第37任总统尼克松开始,总统第4次加薪,工资涨到200,000美元/年。现在的第43任总统小布什很走运,一上台就赶上了总统涨工资,小布什的工资为400,000美元/年,这是美国总统的第5次涨工资。
在美国成立217年的历史上,美国总统5次加薪,平均加薪间隔为43年6个月。再看中国的公务员加薪频率。根据官方的说法,从1985年到 2003年,国家曾对机关和事业单位工作人员工资制度进行过8次调整,18年工资涨8次,平均2年3个月涨工资一次!公务员天天忙着给自己涨工资,还怎么有精力考虑上学贵、看病难、就业、住房等问题?这怎么不让人民怀疑现在的公务员还是人民的公仆?
美国总统涨工资,考虑的不是提高总统的待遇,而是维持总统的待遇,因为美元自身贬值的缘故,从购买力角度衡量,总统的实际待遇是下降的。如19世纪末20世纪初的1美元大致相当于现在的36美元。现在小布什的工资虽然是400,000美元/年,但也就相当于1909年塔夫脱总统时期的11,111美元/年,在将近100年的时间里,按照实际购买力计算,美国总统的工资缩水近7成。难怪有人说,美国的官越当越穷。
第三任总统托马斯·杰弗逊农场主出身,卸任总统后,他债台高筑,不得不卖掉土地和自己心爱的藏书还债,当杰弗逊经济极其困难的消息传开之后,美国各地为他捐款16000美元,但这并不足以偿还他的债务和医疗费用。第五任总统詹姆斯· 门罗也出身农场主家庭,离任总统后也像杰弗逊总统一样,卖地还债,最后连居身之地都没有了,只得搬到纽约的女儿女婿家居住,依赖女儿生活。第七任总统安德鲁·杰克逊是个庄园主,离任总统后无法还清自己的债务,在他的遗嘱要求把他剩余的所有财产出售用以偿还债务及利息,只留给后人3柄剑,要求他的子孙们在必要时用剑保卫合众国宪法。第十一任总统詹姆斯·波尔克也是出身家境殷实的庄园主,在任总统期间积劳成疾,离任不久就去世了,妻子只得变卖庄园的土地生活,后来国会给她一笔救济金,使她勉强维持生计。第十三任总统米勒德·菲尔莫尔由于总统任期内入不敷出,离任时已经债台高筑,无力偿还,所幸他1858年2月获得一位富有的寡妇卡罗琳的爱情,婚后,卡罗琳替他还清了债务。克林顿总统到了后期竟连打官支付律师的费用都没有,靠朋友捐款给他请律师。现任总统小布什也不富裕,妻子经常因为经济拮据而和他吵架。
反思一下中国的公务员工资。我没做过调查,但从现实生活中——不管在单位还是在家庭,不管在散步还是在乘车——人们谈论最多的就是工资问题,公务员嫌自己的工资低,老百姓说公务员工资高。中国公务员的实际所得谁也说不清,因为好多公务员除了工资单外,有说不清的各类收入。我广东的一个公务员朋友说,他有两个工资单,也就是说所得工资是国家规定公务员工资标准的两倍。有的公务员还有这奖金、那津贴,名目繁多。一个朋友在开发区,每个月都收到来路不明的“红包”,开始问领的是什么钱,领导告诉她说: “不要问,知道是给你的钱就行了。” 其实中国公务员还有隐性工资,那就是高福利,如公积金、住房、汽车、公款请客、带薪休假、出国旅游等,这些开支老百姓可是自己掏腰包呀。
中国的公务员工资存在着一个奇怪的现象:地区差,东部发达地区工资收入较高,西部落后地区收入则较低,这极大地阻碍了西部落后地区的人才引进。落后地区本来没人想去,工资再比发达地区低,那更没人愿去了。所以,把公务员工资按地区分类,不仅违反了公民同工同酬的基本权利,也对落后地区的经济发展起到负面影响,使人口分布更加不合理。
其实理顺公务员工资制度很简单,我们可以参照发达国家的成功的经验。如法国,他们的公务员按照不同的级别规定工资指数,最高的是812,最低的是217。从指数可以看出,法国公务员的最高工资是最低工资的3.7倍(中国公务员目前的高低工资差别为6.6倍,不包括工龄工资) 。这个指数是由法律规定的,不是公务员自己可以改变的。法国每年确定每个指数相当于多少货币,这样一乘就把各级公务员的工资算出来了,只有知道你的职务,知道你的工资质数,任何人都能准确地计算出你的工资,公务员的工资完全透明。例如,你是个处长,工资指数是450,2006年每个工资质数是50欧元/ 年,那么你的工资就是450×50=22500欧元/年,也就是1875欧元/月。明年如果涨工资,你的处长的工资质数不变,只涨每个质数的货币值。假如明年要涨到51欧元/年,那么你在2007年的工资为450×51=22950欧元/年,也就是1912.5欧元/月。他们的工资管理很简单,小学生就管理了,没有那么多的复杂计算,就是一个乘法、一个除法。需要说明的是,法国的工资并不是只许涨不许落,法国历史上也有冻结公务员的工资增长或增长为负值的情况,这主要根据国家的经济状况和公务员与普通工人的收入差距来调整。
综上所述,中国的公务员工资改革走进了死胡同,认为改革就是涨工资,改革就是把工资制度搞复杂。这样的改革只能使政府更加官僚,使腐败现象更加严重,使政府与人民更加疏远,使社会更加不和谐。我们自己承认自己是在搞市场经济,我们可以从每年报考公务员的“疯狂”程度得出结论:我们的公务员待遇不是低了,而的高了,是因为公务员的待遇太好了,才有那么多人挤破头去报考公务员;公务员不是供不应求,而是供大于求。所以,深化公务员工资改革也要应用市场经济理论,不应该把给公务员涨工资作为改革的目标,而要把给公务员降工资和同工同酬作为改革的目标,要实行“利益回避”制度,谁提涨工资,谁不得利。什么时候没人想当官了,再考虑给他们加薪。如果连“看不见的手”的作用都认识不到,那我们就别妄谈“市场经济”了。
作者: 刘植荣
插播:似乎从来都没哪个正常人说过在中国公务员是人民的公仆哦。