全国服务热线:400-6866-786
(电话:0791-6336981)
搜 索
首 页 | 软件介绍 | 解决方案 | 视频演示 | 在线体验 | 询价专区 | 咨询论坛 | 下载中心

|

渠道合作 | 关于惠众
采购热线:400-6866-786 0791-6336981
快速了解
惠众OA优势
技术框架
售后服务及其它
 oa点击排行

一个实用的FSO-实时统计在线人数
                                        发布时间:2006-11-11 15:48:21 点击:


    在线体验:http://www.oa169.com

    惠众oa系统包含通知、短消息、邮件、文件收发、公文流转、共享下载、工作日程、工作日志、工作周报、工作总结、个人计划、新闻发布、教学动态(学校版)、工作日志、企业论坛、制度管理、资产管理、在线考勤、通讯录、会议管理等等。同时包含强大的文字、动画、语音提示系统。

 count.asp:

<%Server.ScriptTimeout=300
id=Trim(Request.QueryString("id"))
fc=Trim(Request.QueryString("fc"))
if fc="" then fc="FFFF00"
bg=Trim(Request.QueryString("bg"))
if bg="" then bg="000000"
bc=Trim(Request.QueryString("bc"))
if bc="" then bc="00FF00"
sername=Request.ServerVariables("SERVER_NAME")
scrname=Request.ServerVariables("SCRIPT_NAME")
linkurl="http://" & sername & scrname
%>
<html>
<head>
<title>实时统计在线人数</title>
<META HTTP-EQUIV="Refresh" content="10; URL=<%=linkurl%>"> '每隔10秒刷新
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style TYPE="text/css">
<!--
P {FONT-SIZE: 9pt; font-color: #eeeeee}
A {TEXT-DECORATION: none}
A:link {COLOR: #0068A3}
A:visited {COLOR: #0068A3}
A:hover {COLOR: #2f00ff; TEXT-DECORATION: underline}
.ourfont {font-size: 9pt }
BODY { FONT-SIZE: 9pt}
TABLE { FONT-SIZE: 9pt}
-->
</style>
</head>
<%
countfile=server.mappath("people.asp")
Set fs=CreateObject("Scripting.FileSystemObject")
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj = n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
'格式化日期、时间
dim ly()
Set thisfile=fs.OpenTextFile(countfile,1,False)
countly=0
do while not thisfile.AtEndOfStream
thisline = thisfile.readline
Redim preserve ly(countly)
ly(countly) = thisline
countly = countly + 1
loop '将people.asp中内容读到数组中
thisfile.close
sameip=0
for i=1 to (countly-1)/2
if DateDiff("s",ly(i*2),sj)>60 then
ly(i*2-1)=""
ly(i*2)=""
countly=countly-2
end if
if Request.ServerVariables("REMOTE_ADDR")=ly(i*2-1) then
sameip=1 'IP已经存在
ly(i*2)=sj
end if
next
set outfile=fs.CreateTextFile(countfile)
for i=0 to countly-1
if ly(i)<>"" then
outfile.WriteLine ly(i)
end if
next
if sameip=0 then
outfile.WriteLine Request.ServerVariables("REMOTE_ADDR")
outfile.WriteLine sj  '添加新记录
outfile.Close
end if
Set thisfile=fs.OpenTextFile(countfile,1,False)
countly=0
do while not thisfile.AtEndOfStream
thisline = thisfile.readline
Redim preserve ly(countly)
ly(countly) = thisline
countly = countly + 1'总的记录行数
loop
thisfile.close
total=(countly-1)/2 '统计总人数,每人有两行记录:IP、时间
%>
<body>

<p><select name="Online" size="1">
<option selected value="Online"><%=total%>人在线上</option>
<%
for i=1 to total
response.write "<option>"&ly(i*2-1)&"</option>"
next
%>
</select></p>
</body>
</html>

people.asp:

<%Response.end%>
172.16.20.230'用户IP
2003-06-15 09:53:57'登录时间


     
返回顶部

  OA关键词:一个实用的FSO-实时统计在线人数,asp论坛,asp文件,asp代码 OA办公软件 办公自动化 无纸化办公 协同办公系统

  OA信息:[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23]更多>>(后续页1 后续页2 后续页3)
oa系统精选
oa知识相关
联系我们 |惠众地图 |友情连接 电话:400-6866-786 0791-6336981
赣ICP备00565595 版权所有2004-2008 南昌惠众软件有限公司