📄 list.asp
字号:
sql="select * from class order by id"
rs.open sql,conn,1,1
do while not rs.eof
id=rs("id")
%>
<option value="1">>> <%=rs("class")%> <<
<%
sql1="select boardid,boardtype from board where class="&id&" order by boardid"
rs1.open sql1,conn,1,1
if rs1.eof and rs1.bof then
%>
<option value="">没有论坛
<%else%>
<%do while not rs1.eof%>
<option value="<%=rs1("boardid")%>"><%=rs1("boardtype")%>
<%
rs1.movenext
loop
end if
rs1.close
%>
<option value="">
<%
rs.movenext
loop
rs.close
set rs1=nothing
%>
</select>
<div>
</td>
</tr>
</form>
</table>
<TABLE border=0 cellPadding=4 cellSpacing=1 width="95%" align=center>
<TBODY>
<TR>
<TD colSpan=3>
<p><img src=<%=picurl%>folder.gif> 开放的主题
<img src=<%=picurl%>hotfolder.gif> 回复超过10贴
<img src=<%=picurl%>lockfolder.gif> 锁定的主题 <img src=<%=picurl%>istop.gif> 固顶的主题
</td></tr>
</TBODY></TABLE>
<%
end sub
sub onlineuser()
guests="客人"
url=Request.ServerVariables("SCRIPT_NAME")&"?boardid="&boardid
sql="select username,startime,lastimebk,ip,stats,userclass,browser from online where stats='"&url&"' and username<>'"&guests&"'"
rs.open sql,conn,1,1
do while not rs.eof
sip=rs("ip")
str1=left(sip,instr(sip,".")-1)
sip=mid(sip,instr(sip,".")+1)
str2=left(sip,instr(sip,".")-1)
sip=mid(sip,instr(sip,".")+1)
str3=left(sip,instr(sip,".")-1)
str4=mid(sip,instr(sip,".")+1)
if isNumeric(str1)=0 or isNumeric(str2)=0 or isNumeric(str3)=0 or isNumeric(str4)=0 then
else
num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
ipsql="select Top 1 country,city from address where ip1 <="&num&" and ip2 >="&num&""
iprs.open ipsql,conn,1,1
if not iprs.eof then
country=iprs("country")
city=iprs("city")
else
country="亚洲"
city=""
end if
iprs.close
end if
if rs("userclass")="版主" or rs("userclass")="管理员" then
%>
<img src=<%=picurl%>ao.gif alt="特殊人物"><a href="javascript:openScript('dispuser.asp?name=<%=htmlencode(rs("username"))%>',350,300)">
<ACRONYM TITLE="目前位置:<%=iwhere(rs("stats"))%> 来访时间:<%=rs("startime")%> 活动时间:<%=rs("lastimebk")%> <%=system(rs("browser"))%> <%=browser(rs("browser"))%> IP地址:<%if IpFlag=0 then%>已设置保密<%else%><%=rs("ip")%><%end if%> 来源鉴定:<%if FromFlag=0 then%>已设置保密<%else%><%=country%><%=city%><%end if%>"><%=rs("username")%></ACRONYM></a>
<%
elseif rs("userclass")="贵宾" then
%>
<img src=<%=picurl%>gb(1).gif alt="贵宾"><a href="javascript:openScript('dispuser.asp?name=<%=htmlencode(rs("username"))%>',350,300)">
<ACRONYM TITLE="目前位置:<%=iwhere(rs("stats"))%> 来访时间:<%=rs("startime")%> 活动时间:<%=rs("lastimebk")%> <%=system(rs("browser"))%> <%=browser(rs("browser"))%> IP地址:<%if IpFlag=0 then%>已设置保密<%else%><%=rs("ip")%><%end if%> 来源鉴定:<%if FromFlag=0 then%>已设置保密<%else%><%=country%><%=city%><%end if%>"><%=rs("username")%></ACRONYM></a>
<%
else
%>
<img src=<%=picurl%>messages1.gif><a href="javascript:openScript('dispuser.asp?name=<%=htmlencode(rs("username"))%>',350,300)">
<ACRONYM TITLE="目前位置:<%=iwhere(rs("stats"))%> 来访时间:<%=rs("startime")%> 活动时间:<%=rs("lastimebk")%> <%=system(rs("browser"))%> <%=browser(rs("browser"))%> IP地址:<%if IpFlag=0 then%>已设置保密<%else%><%=rs("ip")%><%end if%> 来源鉴定:<%if FromFlag=0 then%>已设置保密<%else%><%=country%><%=city%><%end if%>"><%=rs("username")%></ACRONYM></a>
<%
end if
rs.movenext
loop
rs.close
if guestuser=1 then
sql="select username,startime,lastimebk,ip,stats,userclass,browser from online where stats='"&url&"' and username='"&guests&"'"
rs.open sql,conn,1,1
do while not rs.eof
%>
<img src=<%=picurl%>messages2.gif><a href="">
<ACRONYM TITLE="目前位置:<%=iwhere(rs("stats"))%> 来访时间:<%=rs("startime")%> 活动时间:<%=rs("lastimebk")%> <%=system(rs("browser"))%> <%=browser(rs("browser"))%> IP地址:<%if IpFlag=0 then%>已设置保密<%else%><%=rs("ip")%><%end if%>"><%=rs("username")%></ACRONYM></a>
<%
rs.movenext
loop
rs.close
end if
end sub
REM 统计贴子总数量
function allarticle()
tmprs=conn.execute("Select count(announceid) from bbs1 where boardid="&boardid&" "&tl&" ")
allarticle=tmprs(0)
set tmprs=nothing
if isnull(allarticle) then allarticle=0
end function
function online()
guests="客人"
tmprs=conn.execute("Select count(id) from online where username<>'"&guests&"'")
online=tmprs(0)
set tmprs=nothing
if isnull(online) then online=0
end function
function guest()
guests="客人"
tmprs=conn.execute("Select count(id) from online where username='"&guests&"'")
guest=tmprs(0)
set tmprs=nothing
if isnull(guest) then guest=0
end function
Sub getInput()
'On Error Resume Next
Rem ------获取版面ID------
BoardID = Request("BoardID")
Rem ------获取页次------
currentPage=request("page")
End Sub
sub chkInput
'on error resume next
if BoardID="" then
BoardID=1
elseif not isInteger(BoardID) then
BoardID=1
else
BoardID=clng(BoardID)
if err then
BoardID=1
err.clear
end if
end if
if currentpage="" then
currentpage=1
elseif not isInteger(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
if err then
currentpage=1
err.clear
end if
end if
if request("selTimeLimit")="all" then
tl=""
elseif request("selTimeLimit")="" then
tl=""
else
limitime=request("selTimeLimit")
tl=" and dateandtime>=#"&cstr(cdate(now()-limitime))&"# "
end if
end sub
sub activeuser()
dim rsactiveusers,activeuser,url
url=Request.ServerVariables("SCRIPT_NAME")&"?boardid="&boardid
set rsactiveusers=server.createobject("adodb.recordset")
if session.contents("username")="" then
if session("userid")="" then
activeuser="select * from online"
else
activeuser="select * from online where id="&cstr(session("userid"))
end if
rsactiveusers.open activeuser,conn,1,3
if rsactiveusers.eof and rsactiveusers.bof then
rsactiveusers.addnew
rsactiveusers("id")=Session.SessionID
rsactiveusers("username")="客人"
rsactiveusers("userclass")="客人"
rsactiveusers("ip")=Request.ServerVariables("REMOTE_HOST")
rsactiveusers("startime")=Now()
rsactiveusers("lastimebk")=Now()
rsactiveusers("lastime")=DateToStr(Now())
rsactiveusers("browser")=Request.ServerVariables("HTTP_USER_AGENT")
rsactiveusers("stats")=url
rsactiveusers.update
session("userid")=Session.SessionID
else
rsactiveusers("lastimebk")=Now()
rsactiveusers("lastime")=DateToStr(Now())
rsactiveusers("stats")=url
rsactiveusers.update
session("userid")=Session.SessionID
end if
else
activeuser="select * from online where username='"&session.contents("username")&"'"
rsactiveusers.open activeuser,conn,1,3
if rsactiveusers.eof and rsactiveusers.bof then
rsactiveusers.addnew
rsactiveusers("id")=Session.SessionID
rsactiveusers("username")=session.contents("username")
rsactiveusers("userclass")=session("userclass")
rsactiveusers("ip")=Request.ServerVariables("REMOTE_HOST")
rsactiveusers("startime")=Now()
rsactiveusers("lastimebk")=Now()
rsactiveusers("lastime")=DateToStr(Now())
rsactiveusers("browser")=Request.ServerVariables("HTTP_USER_AGENT")
rsactiveusers("stats")=url
rsactiveusers.update
else
rsactiveusers("lastimebk")=Now()
rsactiveusers("lastime")=DateToStr(Now())
rsactiveusers("stats")=url
rsactiveusers.update
end if
session("userid")=""
end if
'设置用户不活动超时时间--660秒
dim strOnlineTimedOut,strOnlineCheckInTime
strOnlineCheckInTime = DateToStr(Now())
strOnlineTimedOut = strOnlineCheckInTime - 1200
activeuser="delete from online where lastime<'" & strOnlineTimedOut & "'"
Conn.Execute activeuser
rsactiveusers.close
set rsactiveusers=nothing
end sub
set rs=nothing
Call endConnection
%>
<br><br>
<!--#include file="footer.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -