• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

开放源码 - 访客统计查询(四)

发布: 2007-6-30 18:56 | 作者: admin | 来源: | 查看: 12次 | 进入软件测试论坛讨论

领测软件测试网 <!--#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‘’ " _
& "onmouseout=‘’ChangeColor(this, " & colorOut & ");‘’ " _
& "onmouseover=‘’ChangeColor(this, " & colorOver & ");‘’ " _
& "title=‘’On " & rstStatisticsDay("VisitDate") & " my homepage gots " & vbCrLf _
& rstStatisticsDay("VisitsDaily") & " visit(s)!‘’>" & vbCrLf _
& vbTab & "<td>" & rstStatisticsDay("VisitDate") & "</td>" & vbCrLf _
& vbTab & "<td><img border=‘’0‘’ src=‘’Image/Red.gif‘’ height=‘’10‘’ " _
& "width=‘’" & rstStatisticsDay("VisitsDaily") * 5 & "‘’>&nbsp;" _
& 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>

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网