<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% if(Request.ServerVariables("REMOTE_ADDR") <> "") then Command1__USR_IP = Request.ServerVariables("REMOTE_ADDR") %> <% Dim RecCount Dim RecCount_numRows Set RecCount = Server.CreateObject("ADODB.Recordset") RecCount.ActiveConnection = MM_connCounter_STRING RecCount.Source = "SELECT * FROM webCount" RecCount.CursorType = 0 RecCount.CursorLocation = 2 RecCount.LockType = 1 RecCount.Open() RecCount_numRows = 0 %> <% Dim TodayCount Dim TodayCount_numRows Set TodayCount = Server.CreateObject("ADODB.Recordset") TodayCount.ActiveConnection = MM_connCounter_STRING TodayCount.Source = "SELECT * FROM showDayCount" TodayCount.CursorType = 0 TodayCount.CursorLocation = 2 TodayCount.LockType = 1 TodayCount.Open() TodayCount_numRows = 0 %> <% set Command1 = Server.CreateObject("ADODB.Command") Command1.ActiveConnection = MM_connCounter_STRING Command1.CommandText = "INSERT INTO webCount (count_ip) VALUES ('" + Replace(Command1__USR_IP, "'", "''") + "') " Command1.CommandType = 1 Command1.CommandTimeout = 0 Command1.Prepared = true Command1.Execute() %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim RecCount_total Dim RecCount_first Dim RecCount_last ' set the record count RecCount_total = RecCount.RecordCount ' set the number of rows displayed on this page If (RecCount_numRows < 0) Then RecCount_numRows = RecCount_total Elseif (RecCount_numRows = 0) Then RecCount_numRows = 1 End If ' set the first and last displayed record RecCount_first = 1 RecCount_last = RecCount_first + RecCount_numRows - 1 ' if we have the correct record count, check the other stats If (RecCount_total <> -1) Then If (RecCount_first > RecCount_total) Then RecCount_first = RecCount_total End If If (RecCount_last > RecCount_total) Then RecCount_last = RecCount_total End If If (RecCount_numRows > RecCount_total) Then RecCount_numRows = RecCount_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (RecCount_total = -1) Then ' count the total records by iterating through the recordset RecCount_total=0 While (Not RecCount.EOF) RecCount_total = RecCount_total + 1 RecCount.MoveNext Wend ' reset the cursor to the beginning If (RecCount.CursorType > 0) Then RecCount.MoveFirst Else RecCount.Requery End If ' set the number of rows displayed on this page If (RecCount_numRows < 0 Or RecCount_numRows > RecCount_total) Then RecCount_numRows = RecCount_total End If ' set the first and last displayed record RecCount_first = 1 RecCount_last = RecCount_first + RecCount_numRows - 1 If (RecCount_first > RecCount_total) Then RecCount_first = RecCount_total End If If (RecCount_last > RecCount_total) Then RecCount_last = RecCount_total End If End If %> <% Dim RefreshTime, IdleTime, TotalUsers, OnlineUser(), Tmp(), Num, I, ID RefreshTime = 10 IdleTime = RefreshTime * 3 Application.Lock If Application(Session.SessionID & "LastAccessTime") = Empty Then If Application("TotalUsers") = Empty Then Application("TotalUsers") = 0 ReDim Tmp(Application("TotalUsers") + 1) Num = 0 If Application("TotalUsers") > 0 Then For I = LBOUND(Application("OnlineUser")) To UBOUND(Application("OnlineUser")) ID = Application("OnlineUser")(I) If ID <> Session.SessionID Then Tmp(Num) = ID Num = Num + 1 End If Next End If Tmp(Num) = Session.SessionID Application("TotalUsers") = Num + 1 ReDim Preserve Tmp(Application("TotalUsers")) Application("OnlineUser") = Tmp End If Application(Session.SessionID & "LastAccessTime") = Timer ReDim Tmp(Application("TotalUsers")) Num = 0 For I = 0 To Application("TotalUsers") - 1 ID = Application("OnlineUser")(I) If (Timer - Application(ID & "LastAccessTime")) < IdleTime Then Tmp(Num) = ID Num = Num + 1 Else Application(ID & "LastAccessTime") = Empty End If Next If Num <> Application("TotalUsers") Then ReDim Preserve Tmp(Num) Application("OnlineUser") = Tmp Application("TotalUsers") = Num End If Application.UnLock %> 计算机文化基础学习

  现在位于:首页 宁夏大学物理电气信息学院                  
在Execl中快速互换数据
禁止Word中图形随段落移动
快速定位--书签
打开影子文档
使用自定义序列排序
如何群发邮件

>>> 更多内容

07级计算机基础练习题
07级1.2班练习答案-NEW
04级计算机网络 练习题    04级计算机网络上机实验 

07j Visual Foxpro-FTP
祝贺宁夏大学首例双语教学网站开通!                                               

什么是匿名登录?
如何实现资源共享?
如何移动单元格数据?
子网掩码起什么作用?
如何使用“查找”命令?
怎样设置WINDOWS网络应用?

>>> 更多内容
 
本站总访问量
版权所有©ALL RIGHTS RESERVED  更新时间:
<% RecCount.Close() Set RecCount = Nothing %> <% TodayCount.Close() Set TodayCount = Nothing %>