📄 matrix3_online.asp
字号:
<!-- #include file="const.asp" -->
<%
call opendb()
checkadmin()
call position("",1)
dim name,ip,rs,sql,id,refreshtime,hide
refreshtime=request.QueryString("time")
hide=request.QueryString("hide")
name=trim1(request.QueryString("name"))
if hide<>"" then
response.Cookies("matrix3")("matrix3_online")="hidden"
name=request.Cookies("matrix3")("matrix3_name")
end if
if refreshtime="" then
refreshtime=60 '刷新时间(秒)
end if
ip=trim1(request.QueryString("ip"))
id=trim1(request.QueryString("id"))
if id<>"" then
sql="delete from m3_online where id='"&id&"'"
conn.execute(sql)
elseif name<>"" then
sql="delete from m3_online where name='"&name&"'"
conn.execute(sql)
elseif ip<>"" then
sql="delete from m3_online where ip='"&ip&"'"
conn.execute(sql)
end if
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="<%=refreshtime%>">
<link href="images/skin.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="images/effect.js"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" align="center" valign="top"> <!-- #include file="topbar.asp" --> </td>
</tr>
<tr>
<td align="center" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="12" bgcolor="#ECE9D9"> </td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="10"> </td>
<td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="100%" height="26"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="61%"><span class="v8"><img src="images/btn_face.gif" width="10" height="7">
<a href="index.asp"><%=sitename%></a> <FONT face=Webdings color="#660000">8</FONT>
<a href="matrix3_admin.asp">BBS管理</a> <FONT face=Webdings color="#660000">8</FONT>
在线用户</span></td>
<td width="39%" align="right" nowrap>本页面每 <strong><font color="#FF0000"><%=refreshtime%>秒</font></strong>
刷新一次 </td>
</tr>
</table></td>
</tr>
<tr>
<td height="1" bgcolor="#ECE9D9"></td>
</tr>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td height="12" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="150" height="16" bgcolor="#990000"> <span class="v8b"> <img src="images/fang-1.gif" align="absmiddle">
</span><span class="v7"><font color="#FFFFFF">在线用户情况</font></span></td>
<td height="16" nowrap bgcolor="#CCCCCC" class="v8b"> </td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr valign="middle" bgcolor="#E4E4E4">
<td width="4%" height="30" align="center" nowrap>N</td>
<td width="15%" height="30" align="center" nowrap>用户名</td>
<td width="19%" align="center" nowrap>活动时间</td>
<td width="10%" height="30" align="center" nowrap>在线时长</td>
<td width="46%" height="30" align="center" nowrap>当前位置</td>
<td width="6%" align="center" nowrap>清除</td>
</tr>
<%
dim i,color
i=0
sql="select * from m3_online order by lastactive desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
if (i mod 2)=0 then
color="#FFFFFF"
else
color="#F0F0F0"
end if
i=i+1
%>
<tr valign="middle" bgcolor="<%=color%>">
<td height="30" align="center" nowrap><%=i%></td>
<td height="30" align="center" nowrap title="用 户 名:<%=rs("name")%><br>活动时间:<%=rs("lastactive")%><br>上线时间:<%=rs("logintime")%><br>I P 地址:<%=rs("ip")%><br><%=usersysinfo(rs("explorer1"),", ")%><br>记录 I D:<%=rs("id")%>"><a href="profile.asp?name=<%=nohtml(rs("name"),"<无>")%>" target=_blank><%=nohtml(rs("name"),"<无>")%></a></td>
<td align="center" nowrap><%=gettime(rs("lastactive"))%>前</td>
<td height="30" align="center" nowrap><%=gettime(rs("logintime"))%></td>
<td height="30" align="center" nowrap title="用 户 名:<%=rs("name")%><br>活动时间:<%=rs("lastactive")%><br>上线时间:<%=rs("logintime")%><br>I P 地址:<%=rs("ip")%><br><%=usersysinfo(rs("explorer1"),", ")%><br>记录 I D:<%=rs("id")%>"><%=nohtml(rs("page"),"未知")%></td>
<td align="center" nowrap><a href="?id=<%=rs("id")%>">清除</a></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
call closedb()
%>
</table>
</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="2" bgcolor="#ECE9D9"></td>
</tr>
</table></td>
</tr>
</table>
</td>
<td width="10"> </td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="100" bgcolor="#ECE9D9" valign="top"> <!-- #include file="matrix3_right.asp" --></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10" align="center" valign="bottom">
<!-- #include file="bottombar.asp" -->
</td>
</tr>
</table>
</body>
</html>
<%
function usersysinfo(info,str_char)
if instr(info,";")>0 then
dim usersys
usersys=split(info,";")
if ubound(usersys)>=2 then
usersys(1)=replace(trim(usersys(1)),"MSIE","Internet Explorer")
if usersys(1)="U" then
usersys(1)="Mozilla"
end if
usersys(2)=replace(usersys(2),")","")
usersys(2)=replace(usersys(2),"NT 5.2","2003")
usersys(2)=replace(usersys(2),"NT 5.1","XP")
usersys(2)=replace(usersys(2),"NT 5.0","2000")
usersys(2)=replace(usersys(2),"9x","Me")
usersys(1)="浏 览 器:" & Trim(usersys(1))
usersys(2)="操作系统:" & Trim(usersys(2))
usersysinfo=usersys(1) & str_char & usersys(2)
else
usersysinfo="浏 览 器:未知" & str_char & "操作系统:未知"
end if
else
usersysinfo="未知" & str_char & "未知"
end if
end function
function gettime(t)
dim m
if isnull(t) or t="" then
gettime="0分钟"
exit function
end if
m=datediff("n",t,now())
if m>=60 then
gettime=cstr(cint(m/60))&" 小时 "&cstr(m mod 60)&" 分"
else
gettime=cstr(m mod 60)&" 分钟"
end if
end function
function nohtml(fString,str2)
nohtml=""
if isnull(fString) or fString="" then
fString=str2
else
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10), "<br>")
end if
nohtml = fString
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -