⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 online.asp

📁 生活者姿态整站程序 生活者姿态整站程序 生活者姿态整站程序
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/char.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="chkuser.asp" -->
<!--#include file="inc/theme.asp"-->
<%
	stats="论坛在线"
	dim rs,sql,boardid
	boardid=request("boardid")
	call nav()
	call headline(1)
	if founderr then
	call error()
	else
	call main()
	end if
	call endline()
	sub main()
	set rs=server.createobject("adodb.recordset")
	if BoardID="" then
		sql="select * from online order by userclass desc"
	elseif not isInteger(BoardID) then
		sql="select * from online order by userclass desc"
	else
		BoardID=clng(request("BoardID"))
		sql="select boardtype from board where boardid="&boardid
		rs.open sql,conn,1,1
		if rs.eof and rs.bof then
		sql="select * from online order by userclass desc"
		else
		boardtype=rs(0)
		sql="select * from online where stats like '%"&boardtype&"%' order by userclass desc"
		end if
	end if
	dim totalPages,currentPage
	currentPage=request.querystring("page")
%>
    <table width="<%=tablewidth%>" bgcolor=<%=Tablebackcolor%>  cellspacing=0 border=0 bordercolor=<%=Tablebackcolor%> align=center>
    	<tr>
	        <td>
        	
<table cellpadding=6 cellspacing=1 border=0 width=100%>
<tr bgcolor=<%=aTableTitlecolor%>> 
<td colspan=5 align=center><font color="<%=TableContentColor%>">
<%if boardtype<>"" then%>当前论坛共有<B><%=allonline()%></B>位用户在线,其中<%=boardtype%>有<B><%=online()%></B>位在线用户与<B><%=guest()%></B>位客人<%else%>当前论坛共有<B><%=allonline()%></B>位用户在线<%end if%></font>
</td>
</tr>
<tr bgcolor=<%=TabletitleColor%> style=color:<%=TableFontColor%>> 
<td align=center width="10%"><font color="<%=TableFontColor%>"><b>用户名</b></font></td>
<td align=center width="35%"><font color="<%=TableFontColor%>"><b>当前位置</b></font></td>
<td align=center width="20%"><font color="<%=TableFontColor%>"><b>用户信息</b></font></td>
<td align=center width="18%"><font color="<%=TableFontColor%>"><b>来源鉴定</b></font></td>
<td align=center width="22%"><font color="<%=TableFontColor%>"><b>登陆时间</b></font></td>
</tr>
<%
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
%>
<tr bgcolor=<%=TableBodyColor%>> 
<td colspan=5>  还没有任何用户数据。</td>
</tr>
<%
	else
		rs.pagesize=20
		totalpages=rs.pagecount
		if currentpage="" then currentpage=1
		if not isNumeric(currentpage) then
			currentpage=1
		elseif Cint(currentpage)>totalpages then
			currentpage=totalpages
		end if
		currentpage=Cint(currentpage)
		rs.absolutepage=currentpage

		for i=1 to 20
			if rs.eof then exit for
%>
<tr bgcolor=<%=TableBodyColor%>> 
<td align=center><a href="javascript:openScript('dispuser.asp?name=<%=htmlencode(rs("username"))%>',350,300)"><%=htmlencode(rs("username"))%></a></td>
<td align=center><font color="<%=TableContentColor%>"><%=rs("stats")%></font></td>
<td align=center><font color="<%=TableContentColor%>"><%=replace(system(rs("browser")),"操作系统:","")%>,<%=replace(replace(browser(rs("browser")),"浏 览 器:",""),"Internet Explorer","IE")%></font></td>
<td align=center><font color="<%=TableContentColor%>"><%if FromFlag=0 then%><%if memberclass=grade(19) or memberclass=grade(20) then%><%=rs("comefrom")%><%else%>已设置保密<%end if%><%else%><%=rs("comefrom")%><%end if%></font></td>
<td align=center><font color="<%=TableContentColor%>"><%=formatdatetime(rs("startime"),2)%>&nbsp;<%=formatdatetime(rs("startime"),4)%></font></td>
</td>
</tr>
<%
		rs.movenext
		next
	end if
	rs.close
	set rs=nothing
%>
</table>
</td></tr>
</table>
<table width="<%=tablewidth%>" align="center" >
<tr><td align=right><font color="<%=bodyfontColor%>">
<% if currentpage=0 then currentpage=1
response.write "共 "&totalpages&" 页 第 "&currentpage&" 页 "
if currentpage=1 or totalpages=0 then
			response.write "<font color=gray>首页 前页</font>"
		else
			response.write "<a href=?page=1&boardid="&boardid&">首页</a> <a href=?page="&currentpage-1&"&boardid="&boardid&">前页</a>"
		end if
		
		if currentpage=totalpages or totalpages=0 then
			response.write " <font color=gray>后页 尾页</font>"
		else
			response.write " <a href=?page="&currentpage+1&"&boardid="&boardid&">后页</a> <a href=?page="&totalpages&"&boardid="&boardid&">尾页</a>"
		end if
%></font>
</td></tr></table>
<%
	end sub

	function online()
		guests="客人"
			tmprs=conn.execute("Select count(id) from online where username<>'"&guests&"' and stats like '%"&boardtype&"%'") 
			online=tmprs(0) 
		set tmprs=nothing 
		if isnull(online) then online=0
	end function 
	function allonline()
		tmprs=conn.execute("Select count(id) from online") 
		allonline=tmprs(0) 
		set tmprs=nothing 
		if isnull(allonline) then allonline=0
	end function 

	function guest()
		guests="客人"
			tmprs=conn.execute("Select count(id) from online where username='"&guests&"' and stats like '%"&boardtype&"%'") 
			guest=tmprs(0) 
		set tmprs=nothing 
		if isnull(guest) then guest=0
	end function 
%>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -