📄 zxlp1.asp
字号:
<!--#include file="mConn.asp"-->
<!--#include file="mConst.asp"-->
<%
Dim Rs6
Set Rs6=Server.CreateObject("Adodb.RecordSet")
'Set Rs6=Conn.Execute("Delete from m_config")
'Set Rs6=Conn.Execute("Insert into m_config (tray_time) values (Getdate())")
Set Rs6=Conn.Execute("Select Top 1 tray_switch,tray_time from m_config")
Dim tray_time,tray_switch
If Not Rs6.Eof Then
tray_switch=Rs6("tray_switch")
tray_time=Rs6("tray_time")
End If
If DateDiff("n",tray_time,Now())>=0 And DateDiff("n",tray_time,Now())<=1446 Then
Set Rs6=Conn.Execute("Update m_config Set tray_switch=0")
Set Rs6=Conn.Execute("Select Top 1 tray_switch,tray_time,tray_show from m_config")
If Not Rs6.Eof Then
tray_switch=Rs6("tray_switch")
tray_time=Rs6("tray_time")
tray_show=Rs6("tray_show")
End If
End if
Set Rs6=Nothing
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="../css/css.css">
<title>在线统计</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: 0;
}
body {
background-color: #FFFFFF;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a {
font-size: 12px;
color: #000000;
}
a:visited {
color: #FF6600;
text-decoration: none;
}
a:link {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style></head>
<%
MaxPerPage=30
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim typename
typename=""
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim sql
dim rs
dim rstype
dim typesql
dim typeid,typename1
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"></td>
</tr>
</table>
<%
sql="select * from tj"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>暂无在线人数</p>"
else
totalPut=rs.recordcount
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,"zxlp.asp"
showContent
showpage totalput,MaxPerPage,"zxlp.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"zxlp.asp"
showContent
showpage totalput,MaxPerPage,"zxlp.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"zxlp.asp"
showContent
showpage totalput,MaxPerPage,"zxlp.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
<body>
<div align="center">
<center>
<table border="0" cellspacing="1" width="624" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="4" height="31" style="border-collapse: collapse" bordercolor="#111111">
<tr bgcolor="#CCCCCC">
<td bgcolor="#CCCCCC" height="18" align="center"><b>编号</b></td>
<td bgcolor="#CCCCCC" height="18" align="center"><b>用户名</b></td>
<td bgcolor="#CCCCCC" height="18" align="center"><strong>用户IP</strong></td>
<td width="178" height="18" align="center" bgcolor="#CCCCCC"><strong>进入时间</strong></td>
<td align="center" bgcolor="#CCCCCC" height="18"><b>用户身份状态</b></td>
</tr>
<%do while not rs.eof%>
<tr>
<td height="4" width="58" bgcolor="#FFFFFF">
<p align="center"><%=rs("id")%></td>
<td height="4" width="86" bgcolor="#FFFFFF">
<p align="center"><%=rs("username")%> </td>
<td width="130" height="4" bgcolor="#FFFFFF" align="center"><%=rs("ip")%></td>
<td height="4" bgcolor="#FFFFFF">
<p align="center"><%=rs("addate")%><font color="#000000">
</font></td>
<td width="126" height="4" align="center" bgcolor="#FFFFFF">
<%if rs("zt")=1 then
response.write "会员"
else
response.write "游客"
end if
%></td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
</center>
</div>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<p align=""center""><form method=Post action="&filename
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font> "
else
response.write "<a href="&filename&"?page=1>首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>个 <b>"&maxperpage&"</b>个/页</font> "
response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="¤tpage&">"
response.write " <input class=buttonface type='submit' value='Goto' name='cndok'></span></p></form></p>"
end function
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -