%
Dim connection, rs
set connection=server.createobject("adodb.connection")
connection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & database
if Request.Form("order") = "url" then
set rs = connection.Execute("SELECT * FROM download order by fldURL")
elseif Request.Form("order") = "times" then
set rs = connection.Execute("SELECT * FROM download order by fldTIMES desc")
else
set rs = connection.Execute("SELECT * FROM download order by fldLAST")
End if
antal=0
do until rs.eof
antal=antal+1
rs.movenext
loop
if Request.Form("order") = "url" then
set rs = connection.Execute("SELECT * FROM download order by fldURL")
elseif Request.Form("order") = "times" then
set rs = connection.Execute("SELECT * FROM download order by fldTIMES desc")
else
set rs = connection.Execute("SELECT * FROM download order by fldLAST")
End if
set rs2 = connection.Execute("SELECT * FROM dntable order by dndate")
%>
Bohlin´s Downloader - Stats
Download stats
Number of files: <%=antal%>
| URL to file |
Downloads |
Last Download |
Downloads/day |
<%
do until rs.EOF
dagar=DateDiff("d", rs("fldStart"), rs("fldlast"))+1
dagar=cInt(rs("fldTimes"))/dagar
if color="#EEEEEE" then
color="#DDDDDD"
else
color="#EEEEEE"
end if
%>
| "><%=rs("fldURL")%> |
<%=rs("fldTIMES")%> |
<%=rs("fldLAST")%> |
<%=Formatnumber(dagar, 2)%> |
<%rs.movenext
loop
%>
| Download Date |
# of Downloads |
<%
do until rs2.EOF
%>
| <%=rs2("dndate")%> |
<%=rs2("cnt")%> |
<%rs2.movenext
loop
%>
<%
rs.close
connection.close
%>