ip.asp
来自「本程序修改自花香盈路6.0版。所有版权归原作者所有 本站修改后加入了些小偷程」· ASP 代码 · 共 190 行
ASP
190 行
<!--飞天网络统计程序 V1.0 Powered by flymorn,ftwl.cb35.com-->
<!--#include file="inc/conn.asp" -->
<!--#include file="inc/function.asp" -->
<!--#include file="inc/sqlfilter.asp"-->
<%
listnum=30 '每页显示数
'今日IP
function todayip()
sql="Select count(id) from ip"
set ips=conn.execute(sql)
todayip=ips(0)
ips.close
set ips=nothing
end function
'今日PV
function todaypv()
sql="Select sum(n) from ip"
set rs=conn.execute(sql)
If rs.eof and rs.bof Then
todaypv=0
Else
todaypv=rs(0)
end if
rs.close
set rs=nothing
end function
'在线人数
function online()
sql="Select count(id) from ip WHERE DATEDIFF('s', lastime, now()) < "&kicktime&"*60"
set ips=conn.execute(sql)
online=ips(0)
ips.close
set ips=nothing
end function
%>
<html>
<head>
<title>在线IP - 飞天网络统计程序 V1.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="css.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style1 {
font-size: 14pt;
font-weight: bold;
}
-->
</style>
</head>
<body>
<!--#include file="head.asp"-->
<!--飞天网络统计程序 V1.0 Powered by flymorn,ftwl.cb35.com-->
<div align="center"><br>
<span class="style1">IP列表 - 飞天网络统计程序 V1.0</span><br>
<br>
(为节约系统开支,仅保留当天所有即时IP数据!)
</div>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="756" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td><hr noshade size="1">[ 当前在线:<font color=red><b><%=online()%></b></font>人 ] [ 今日IP:<b><%=todayip()%></b> ] [ 今日PV:<b><%=todaypv()%></b> ]<br>
<b>当前IP列表:</b> </td>
</tr>
</table></td>
</tr>
</table>
<!--Powered by flymorn,www.cn-pn.com-->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="biao_bdr3">
<tr>
<td><table width="758" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#DADCE4" class="xi">
<tr>
<td width="40"><div align="center"><strong>用户</strong></div></td>
<td width="100"><div align="center"><strong>IP</strong></div></td>
<td width="150"><div align="center"><strong>活跃时间</strong></div></td>
<td width="80"><div align="center"><strong>操作系统</strong></div></td>
<td width="150"><div align="center"><strong>浏览器</strong></div></td>
<td width="206"><div align="center"><strong>当前位置</strong></div></td>
<td width="30"><div align="center"><strong>PV</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="758" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#DADCE4" class="xi">
<%
sql="select * from ip order by lastime desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
If rs.eof and rs.bof Then
response.Write("当前列表为空。")
Else
recordcountnum=Rs.recordcount
Rs.pagesize = listnum
page = SafeRequest("page",1)
If page = "" Then
page=1
End If
If (page-Rs.pagecount) > 0 Then
page=Rs.pagecount
End If
if page < 1 Then
page = 1
End If
Rs.absolutepage=page
j=rs.recordcount
j=j-(page-1)*listnum
i=0
x=1+listnum*(page-1)
do while not rs.eof and i<listnum
ip=rs("ip")
if rs("dlip")<>"" then
ip=rs("dlip")
end if
startime=rs("startime")
lastime=rs("lastime")
ie=browser(rs("browser"))
sys=system(rs("browser"))
url=rs("url")
if url="" then
url="直接输入访问"
end if
url1=url
if len(url)>30 then
url=left(url,30)&"…"
end if
n=rs("n")
%>
<tr class="table001" onmouseover="this.className='table002'" onmouseout="this.className='table001'">
<td width="40"><div align="center"><%=x%></div></td>
<td width="100"><div align="center"><%=ip%></div></td>
<td width="150"><div align="center"><%=lastime%></div></td>
<td width="80"><div align="center"><%=sys%></div></td>
<td width="150"><div align="center"><%=ie%></div></td>
<td width="206"><a href=<%=url1%> target=_blank title=<%=url1%>><%=url%></a></td>
<td width="30"><div align="center"><%=n%></div></td>
</tr>
<%
i=i+1
x=x+1
rs.movenext
loop
end if
%>
<tr>
<td colspan="7">
<%
Dim filename
filename="ip.asp?a=2&"
%>
<table width="680" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#DADCE4">
<tr>
<td><form method="post" action="<%=filename%>">
<div align="center">总共<strong><%=Rs.recordcount%></strong>人 <%=page%>/<%=Rs.pagecount%>页 每页<%= listnum %>人
<a href="<%=filename%>page=1">首页</a>
<% if page<>1 then %>
<a href="<%=filename%>page=<%=page-1%>">上一页</a>
<%end if%>
<% if Rs.pagecount-page <> 0 then %>
<a href="<%=filename%>page=<%=page+1%>">下一页</a>
<%End If%>
<a href="<%=filename%>page=<%=Rs.pagecount%>">尾页</a>
<input type="text" name="page" size="3" maxlength="5" value="<%=page+1%>" />
<input type="submit" value="Go" name="cndok" />
</div>
</form></td>
</tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
<!--Powered by flymorn,www.cn-pn.com-->
<br>
<!--#include file="foot.asp"-->
<!--飞天网络统计程序 V1.0 Powered by flymorn,ftwl.cb35.com-->
</body>
</html>
<%
rs.close
set rs=nothing
call closedb
%><!--飘易网站统计程序 V1.5 Powered by flymorn,www.cn-pn.com-->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?