以文本方式查看主题

-  堕落街论坛  (http://duoluojie.1314179.com.cn:443/index.asp)
--  游戏体育  (http://duoluojie.1314179.com.cn:443/list.asp?boardid=331)
----  【请求帮助:IP流量统计出错】  (http://duoluojie.1314179.com.cn:443/dispbbs.asp?boardid=331&id=25623)

--  作者:恐龙
--  发布时间:2004/4/18 21:16:00
--  【请求帮助:IP流量统计出错】
IP流量统计的每月时段流量分析 出错 Microsoft VBScript 运行时错误 错误 \'800a005e\' /bbs/plus_count_show.asp,行170
[此贴子已经被作者于2004-4-18 21:18:04编辑过]

--  作者:我最简单
--  发布时间:2004/4/18 21:45:00
--  

..

你能不能发段代码上来我给你分析下

这我没做过,不过看看或许能给你点建议


--  作者:恐龙
--  发布时间:2004/4/19 10:09:00
--  

<!--#include file=conn.asp--> <!-- #include file=inc/const.asp --> <!--#include file="plus_count_conn.asp"--> <% dim theyear,themonth,theday if Request("theyear")="" Then theyear=Year(Date) else theyear=CInt(Request("theyear")) end if if Request.form("themonth")="" Then themonth=Month(Date) else themonth=CInt(Request("themonth")) end if if Request.form("theday")="" Then theday=day(Date) else theday=CInt(Request("theday")) end if

Dvbbs.LoadTemplates("") Dvbbs.stats="IP流量统计" Dvbbs.Nav() Dvbbs.Head_var 2,0,"",""

call main()

Dvbbs.ActiveOnline() Dvbbs.footer()

sub main() dim theaction,i theaction=request("action") if theaction="" then theaction=1 %> <table border="0" align="center" cellpadding="0" cellspacing="1" class=tableborder1> <tr> <th height="25">论坛IP流量统计</th> </tr> <tr> <td class=tablebody1><br>      <img src="plus/count/li.gif" width="15" height="15"><a href="?action=1">每月日流量分析</a>      <img src="plus/count/li.gif" width="15" height="15"><a href="?action=2">每月时段流量分析</a>     <img src="plus/count/li.gif" width="15" height="15"><a href="?action=3">每日时段流量分析</a>     <img src="plus/count/li.gif" width="15" height="15"><a href="?action=4">今日最新<%= mycount(5) %>IP</a><br> <br> <% If theaction<>4 Then %> <form method="post" action="plus_count_show.asp"> <table width="80%" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td> <select name="theyear"> <% for i = 2003 to Year(date) response.write "<option value=\'"&i&"\'" if i=theyear then response.write " selected" end if response.write ">"&i&"</option>" next %> </select> 年 <select name="TheMonth"> <% for i = 1 to 12 response.write "<option value=\'"&i&"\'" if i=themonth then response.write " selected" end if response.write ">"&i&"</option>" next %> </select> 月 <% If theaction=3 Then %> <select name="theday"> <% for i = 1 to 31 response.write "<option value=\'"&i&"\'" if i=theday then response.write " selected" end if response.write ">"&i&"</option>" next %> </select> 日 <% End If %> <input name="Submit" type="submit" class="button" value="查询"> <input name="action" type="hidden" id="action" value="<%=theaction%>"> </td> </tr> </table> </form> <br> <% End If %>

<% select case theaction case 1 Call count1() case 2 Call count2() case 3 Call count3() case 4 Call count4() end select %><br><br></td> </tr> </table> <% end sub

sub count1() dim sql,rs,i sql="select theday,thecount*"&mycount(1)&" from countday where theyear="&theyear&" and themonth="&themonth Set Rs=Server.CreateObject("ADODB.Recordset") Rs.open sql,ConnCount,3,2 if Rs.recordcount=0 then setAlert("没有这个月的记录") else %> <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <% dim color,countall,rijun countall=0 color="#FF0000" for i =1 to Rs.recordcount %> <td align="center" valign="bottom"><font color="<%= color %>"><%=clng(Rs(1))%></font><br> <img src="plus/count/1.gif" width="10" height="<%=clng(clng(Rs(1))*mycount(2))%>"> <%if color="#FF0000" then color="#0000FF" else color="#FF0000" end if countall=countall+Rs(1) %> <br> <%= Rs(0) %></td> <%rs.movenext next countall=clng(countall) rijun=clng(countall/Rs.recordcount) %> <td align="center" valign="bottom"><font color="<%= color %>"><%=countall%></font><br> <%if color="#FF0000" then color="#0000FF" else color="#FF0000" end if %> <br> 总计</td> <td align="center" valign="bottom"><font color="<%= color %>"><%=rijun%></font><br> <img src="plus/count/1.gif" width="10" height="<%=clng(rijun*mycount(2))%>"> <br> 日均</td> </tr> </table> <% end if end sub

sub count2() dim sql,rs,i,a,b(23),pinjun sql="select thecount from countmonth where theyear="&theyear&" and themonth="&themonth Set Rs=connCount.execute(sql) if rs.eof then setAlert("没有这个月的记录")

a=0 for i=0 to 23 sql="select Sum(thecount)*"&mycount(1)&" from counthour where theyear="&theyear&" and themonth="&themonth&" and thehour="&i set rs=connCount.execute(sql) if rs.eof then b(i)=0 else if rs.eof then b(i)=0 else b(i)=clng(rs(0)) a=a+b(i) end if end if next pinjun=clng(a/24) %> <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <% dim color,rijun color="#FF0000" for i =0 to 23 %> <td align="center" valign="bottom"><font color="<%= color %>"><%=clng(b(i))%></font><br> <img src="plus/count/1.gif" width="10" height="<%=clng(b(i)*mycount(3))%>"> <%if color="#FF0000" then color="#0000FF" else color="#FF0000" end if %> <br> <%= i %></td> <% next %> <td align="center" valign="bottom"><font color="<%= color %>"><%=a%></font><br> <%if color="#FF0000" then color="#0000FF" else color="#FF0000" end if %> <br> 总计</td> <td align="center" valign="bottom"><font color="<%= color %>"><%=pinjun%></font><br> <img src="plus/count/1.gif" width="10" height="<%=clng(pinjun*mycount(3))%>"> <br> 平均</td> </tr> </table> <% end sub

sub count3() dim sql,rs,i sql="select thehour,thecount*"&mycount(1)&" from counthour where theyear="&theyear&" and themonth="&themonth&" and theday="&theday Set Rs=Server.CreateObject("ADODB.Recordset") Rs.open sql,ConnCount,3,2 if Rs.recordcount=0 then setAlert("没有这一天的记录") else %> <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <% dim color,countall,rijun countall=0 color="#FF0000" for i =1 to Rs.recordcount %> <td align="center" valign="bottom"><font color="<%= color %>"><%=clng(Rs(1))%></font><br> <img src="plus/count/1.gif" width="10" height="<%=clng(clng(Rs(1))*mycount(4))%>"> <%if color="#FF0000" then color="#0000FF" else color="#FF0000" end if countall=countall+Rs(1) %> <br> <%= Rs(0) %></td> <%rs.movenext next countall=clng(countall) rijun=clng(countall/Rs.recordcount) %> <td align="center" valign="bottom"><font color="<%= color %>"><%=countall%></font><br> <%if color="#FF0000" then color="#0000FF" else color="#FF0000" end if %> <br> 总计</td> <td align="center" valign="bottom"><font color="<%= color %>"><%=rijun%></font><br> <img src="plus/count/1.gif" width="10" height="<%=clng(rijun*mycount(4))%>"> <br> 日均</td> </tr> </table> <% end if end sub

sub count4() dim sql,rs,i sql="select top "&mycount(5)&" ip,thetime,language from ip order by thetime desc" Set Rs=Server.CreateObject("ADODB.Recordset") Rs.open sql,ConnCount,3,2 if Rs.recordcount=0 then setAlert("暂时还没有任何记录") else %><table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" class=tableborder1 style="width:500px;"> <tr> <th height="25">&nbsp;</th> <th>IP</th> <th>时间</th> <th>语言</th> </tr><% for i =1 to Rs.recordcount %> <tr align="center"> <td class=tablebody1><%=i %></td> <td class=tablebody1><%= Rs(0) %></td> <td class=tablebody1><%= Rs(1) %></td> <td class=tablebody1><%= Rs(2) %></td> </tr> <%rs.movenext next %> </table>

<% end if end sub %> 谢谢


--  作者:我最简单
--  发布时间:2004/4/19 20:43:00
--  

真是不好意思

帮你调试了半天没看找出错误

不过我的错误和你的不一样

我的是

Microsoft VBScript 编译器错误 错误 \'800a03f6\'

缺少 \'End\'

/iisHelp/common/500-100.asp,行242

和你的行数不同

我仔细查了下,这几行没有错误

建议你去CSDN问问

或许会有更多的帮助


--  作者:恐龙
--  发布时间:2004/4/21 10:10:00
--  
开心在吗?
--  作者:41℃-狐
--  发布时间:2004/4/22 15:59:00
--  

楼上的,

你的签名网站???????????????


--  作者:恐龙
--  发布时间:2004/4/23 0:27:00
--  
以下是引用41℃-狐在2004-4-22 15:59:00的发言:

楼上的,

你的签名网站???????????????

怎么了,有问题吗?
--  作者:41℃-狐
--  发布时间:2004/4/23 1:11:00
--  

你的超链接错误,后面多了个引号,呵呵!其它的就没什么了!

而且进入“enter”是乱码!

还行不错