日期:2013-07-22  浏览次数:21042 次

<!--#Include File="Statistics_Connection.asp"-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title>Statistics Details</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Author" content="Jack Ma">
<link rel="stylesheet" type="text/css" href="Statistics_CSS.css">

<SCRIPT LANGUAGE="javascript">
<!--
function ChangeColor(argPtr, argColor)
{
argPtr.style.backgroundColor=argColor;
}
-->
</script>

</head>

<body>
<div align="center">
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="ColorBottomL1">
<tr>
<td>
<%
Dim rstStatisticsDay
Dim strWriteHTML, colorOver, colorOut, ColorDbClick

Set rstStatisticsDay = Server.CreateObject("ADODB.Recordset")
With rstStatisticsDay
.ActiveConnection = cnnStatistics
.CursorType = adOpenForwardOnly
.LockType = adLockReadOnly
.Source = "Select VisitDate, Count(ID) As VisitsDaily From IPs Group By VisitDate Order By VisitDate Desc"
.Open
End With

strWriteHTML = _
"<table class='ColorBottomL1_Back' border='0' width='100%' cellpadding='5' cellspacing='1'>" & vbCrLf & _
"<tr class='ColorBottomL2_ItemTop'><td><B>Date</B></td><td><B>Visits</B></td></tr>" & vbCrLf
colorOver = Chr(34) & "#ffcc66" & Chr(34)
colorOut = Chr(34) & "#cccccc" & Chr(34)

Do While Not rstStatisticsDay.EOF
strWriteHTML = strWriteHTML _
& ( _
"<tr class='ColorBottomL2_ItemBody' " _
& "> " _
& rstStatisticsDay("VisitsDaily") & "</td>" & vbCrLf _
& "</tr>" & vbCrLf _
)
rstStatisticsDay.MoveNext
Loop
strWriteHTML = strWriteHTML & "</table>"

Response.Write strWriteHTML

rstStatisticsDay.Close
Set rstStatisticsDay = Nothing

Call CloseDatabase
%>
<td>
<tr>
</table>
</div>
</body>
</html>