📄 admin_count.asp
字号:
<!--#include file="head.asp"-->
<!--#include file="AdminSession.asp"-->
<%
dim totalPut
dim CurrentPage
dim MaxPerPage
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
MaxPerPage=20
%>
<%
'如果要删除记录,建议定期删除流量记录,不然对数据库的负荷及程序运行时间都有很大影响
if request("Sel")="Del" then
conn.execute ("Delete from [Count]")
response.write "<script>alert('操作成功');document.URL='admin_Count.asp';</script>"
response.End()
end if
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="6" cellspacing="1" bgcolor="#0099CC" >
<tr bgcolor="e9effe">
<td height="30" colspan="8" align="center"><b>+ 流 量 跟 踪 记 录 +</b> (同一个IP的同一个URL来的,在短时间内访问记录过多,一定是在作弊。这样定义对不对?)</td>
</tr>
<tr align="center" bgcolor="e9effe">
<td height="25">ID</td>
<td>什么时间</td>
<td>谁的站点</td>
<td>哪个URL</td>
<td>来自什么IP</td>
<td>弹出了谁的站点</td>
<td>被弹站点页面</td>
<td> </td>
</tr>
<tr bgcolor="e9effe">
<td height="25" colspan="8">
<a href="?NewPage=1">全部记录</a> <a href="?Sel=Day&d=0">今天的记录</a> <a href="?Sel=Day&d=1">昨天的记录</a> <a href="?Sel=Day&d=2">前天的记录</a> <a href="?Sel=Del&d=0" onClick="{if(!confirm('此操作将删除全部流量记录信息!\n\n确定要执行此项操作吗?'))return false;}">删除记录</a>
<%
if request("Sel")="UIdIn" then
SelStr=" PopInUserId="&request("id")
elseif request("Sel")="UIdOut" then
SelStr=" PopOutUserId="&request("id")
elseif request("Sel")="Ip" then
SelStr=" PopIp='"&request("p") &"'"
elseif request("Sel")="Day" then
SelStr="datediff('d',PopTime,now()) = "&request("d")
end if
if SelStr<>"" then
session("SelStr")=SelStr
end if
if request.QueryString(("NewPage"))=1 then
session("SelStr")=""
end if
if session("SelStr")<>"" then
Sql = "Select * from [Count] where "&session("SelStr")&" order by Id desc"
else
Sql = "Select * from [Count] order by Id desc"
end if
rs.open sql,conn,1,1
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
'showpage totalput,MaxPerPage,"admin_Count.asp"
showContent
showpage totalput,MaxPerPage,"admin_Count.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
'showpage totalput,MaxPerPage,"admin_Count.asp"
showContent
showpage totalput,MaxPerPage,"admin_Count.asp"
else
currentPage=1
'showpage totalput,MaxPerPage,"admin_Count.asp"
showContent
showpage totalput,MaxPerPage,"admin_Count.asp"
end if
end if
rs.close
set rs = nothing
sub showContent
dim i
i=0
%> </td>
</tr>
<form action="" name="form1" method="post">
<%do while not rs.eof%>
<tr bgcolor="e9effe">
<td height="25" align="center"><%=rs("Id")%></td>
<td height="25" align="left"><%=rs("PopTime")%></td>
<td height="25" align="left"><a href="?sel=UIdIn&id=<%=rs("PopInUserId")%>"><%=GetName(rs("PopInUserId"))%></a></td>
<td height="25" align="left"><a href=<%=rs("PopUrl")%> target=_blank><%=(rs("PopUrl"))%></a></td>
<td height="25" align="left"><a href="?sel=Ip&p=<%=rs("PopIp")%>"><%=(rs("PopIp"))%></a></td>
<td height="25" align="left"><a href="?sel=UIdOut&id=<%=rs("PopOutUserId")%>"><%=GetName(rs("PopOutUserId"))%></a></td>
<td height="25" align="left"><a href=<%=rs("PopWhoUrl")%> target=_blank><%=rs("PopWhoUrl")%></a></td>
<td height="25" align="left"> </td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<tr bgcolor="e9effe">
<td height="25" colspan="8"><a href="?NewPage=1">全部记录</a> <a href="?Sel=Day&d=0">今天的记录</a> <a href="?Sel=Day&d=1">昨天的记录</a> <a href="?Sel=Day&d=2">前天的记录</a> <a href="?Sel=Del&d=0" onClick="{if(!confirm('此操作将删除全部流量记录信息!\n\n确定要执行此项操作吗?'))return false;}">删除记录</a></td>
</tr>
</form>
<tr bgcolor="e9effe">
<td height="25" colspan="8">
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
'on error resume next
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<table cellspacing=1 width='100%' border=0 colspan='4' ><form method=Post action="""&filename&"""><tr><td align=right> "
if CurrentPage<2 then
response.write "共<b><font color=red>"&totalnumber&"</font></b>条记录 首页 上一页 "
else
response.write "共<b><font color=red>"&totalnumber&"</font></b>条记录 <a href="&filename&"?page=1>首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>条记录/页 "
%>
转到:
<select name='page' size='1' style="font-size: 9pt" onchange='javascript:submit()'>
<%for i = 1 to n%>
<option value='<%=i%>' <%if CurrentPage=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
<%next%>
</select>
<%
response.write "</td></tr></FORM></table>"
end function
Function GetName(UserId)
if UserId="" or isnull(UserId) then
GetName=""
else
sql="select UserName from Users where Id="&UserId
set rs_User=conn.execute (sql)
if not rs_User.eof then
GetName=rs_User(0)
else
GetName=""
end if
rs_User.close
end if
End Function
%></td>
</tr>
</table>
<SCRIPT language=javascript>
var menu=new Array(["流量跟踪记录"]);
drawMenu(menu);
setFrameActive();
</SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -