📄 list.asp
字号:
<!--#include file="Connections.asp" -->
<!--#include file="top.asp" -->
<%
errornum=0
if h_viewcpb=1 and isuser=false then response.redirect("login.asp")
if request.querystring("l_id")="" then
errornum=1
errormsg="<li>很抱歉,您没有选择论坛,请从论坛首页正确登陆</li>"
end if
l_id=chktopic(Request("l_id"))
if errornum<>1 then
isbanzhu=false
sql="select l_password,l_access,l_banzhu from lanmu where l_id="&l_id&""
set rs=conn.execute(sql)
if not rs.eof then
l_banzhu=rs("l_banzhu")
if issupermaster=false and ismaster=false then
if not isnull(l_banzhu) and l_banzhu<>"" and isuser and isbordermaster then
if instr(l_banzhu,cpbusername)>0 then
isbanzhu=true'获得斑竹的身份
end if
end if
'此段检查是否为加密区
if isbanzhu=false then
if rs("l_password")<>"" and session("fy_lpassword")<>rs("l_password") then response.redirect"login.asp?action=password&l_id="&l_id&""
if rs("l_access")=2 and isbordermaster=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有版主和总版主才可以进入!</li>"
elseif rs("l_access")=1 and isuser=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有注册用户才可以进入!</Li>"
elseif rs("l_access")=4 and isvipuser=false and isbordermaster=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有认证用户才可以进入!</Li>"
end if
end if
end if
else
errornum=1
errormsg="<Li>很抱歉,无此论坛!</Li>"
end if
set rs=nothing
end if
if errornum=1 then
call toptitle(l_title,cpbtitle)
call error(errormsg)
call login()
call bq()
response.end
end if
'写出栏目
sqllanmu="select l_id,l_title,l_access from lanmu where l_id="&l_id&""
set rslanmu=conn.execute(sqllanmu)
'查看最近主题
Days = Request.Cookies("feiyuedays")
cpbtime = Request.Cookies("feiyuecpbtime")
cpbselect = Request.Cookies("cpbselect")
if request.form("action")="true" then
Response.Cookies("feiyuedays") = chktopic(Request.Form("days"))
Response.Cookies("feiyuecpbtime") = chktopic(Request.Form("cpbtime"))
Response.Cookies("feiyuecpbselect") = chktopic(Request.Form("cpbselect"))
Days = chktopic(Request.Form("Days"))
cpbselect= chktopic(Request.Form("cpbselect"))
cpbtime= chktopic(Request.Form("cpbtime"))
End If
if Days = "" then Days = 0
if cpbtime="" then cpbtime="t_lasttime"
if cpbselect="" then cpbselect="desc"
defDate = dateadd("d", -cint(Days), date)
'更新统计
sqltt="select tongjiip from total"
set rstt=conn.execute(sqltt)
tongjiip=rstt("tongjiip")
set rstt=nothing
if o_ip<>tongjiip then
sqltongji="update total set tongji=tongji+1,tongji1=tongji1+1, tongjiip='"&o_ip&"'"
conn.execute(sqltongji)
end if
dim h_viewonline,h_rtoph_servertext
sql="select h_viewonline,h_rtop,h_servertext from home"
set rsconn1=conn.execute(sql)
if not rsconn1.eof then
h_rtop=rsconn1("h_rtop")
h_viewonline=rsconn1("h_viewonline")'查看在线人数字段
h_servertext=rsconn1("h_servertext")'论坛所在时区
end if
set rsconn1=nothing
cpbtitle="浏览论坛:"&rslanmu("l_title")
sqlonline = "update online set o_lanmu = "&l_id&" ,o_topic=0 where o_ip = '" & o_ip & "'"
conn.Execute (sqlonline)
sqlo1="select count(o_username) as o_username1 from online"
set rso1 = conn.Execute (sqlo1)
o_namenum1=rso1("o_username1")
set rsonline1=nothing
sqlonline="select count(o_username) as o_username1 from online where o_lanmu = "&l_id&""
set rsonline = conn.Execute (sqlonline)
o_namenum=rsonline("o_username1")
set rsonline=nothing
ltitle=rslanmu("l_title")
call toptitle(l_title,cpbtitle)
call head(1,"论坛信息",Request.ServerVariables("HTTP_REFERER"),cpbtitle)
%>
<%=top1%>
<table border="0" cellspacing="1" cellpadding="1" class=tb1>
<tr><td <%=tColor%> class="tdc1" height="22">目前论坛总共有<%=o_namenum1%>人在线 本版块当前共有<%=o_namenum%>人在线 <a href=fyonline.asp target=_blank>[在线列表]</a> <%if request("viewuser")="on" or (h_viewonline=1 and request("viewuser")<>"off") then%><a href=?l_id=<%=request("l_id")%>&viewuser=off>[关闭详细列表]</a><%else%><a href=?l_id=<%=request("l_id")%>&viewuser=on>[查看详细列表]</a><%end if%></td><td <%=tColor%> class="tdc1" height="22" align=right> <a href="mameven.asp?l_id=<%=request.querystring("l_id")%>" title="查看本版发生的事件">事件</a> <a href="lockuser.asp?l_id=<%=request.querystring("l_id")%>" title="查看在本版被屏蔽和禁止发言的用户">禁止</a> </td></tr>
<%if request("viewuser")="on" or (h_viewonline=1 and request("viewuser")<>"off") then%><tr>
<td bgcolor=<%=tColor2%> class="tdc" colspan="2"><table border=0 width=100%><%
sqlonline="select o_username,o_hidden from online where o_lanmu = "&request.querystring("l_id")&""
set rsonline = conn.Execute (sqlonline)
if rsonline.eof or rsonline.bof then
Response.Write "无此用户"
else
response.write("<tbody><tr class=tdc>")
i_online=0
do while not rsonline.Eof
response.write("<td width=""16%"" >")
if rsonline("o_username") = "客人" then
Response.Write " <img src=image/icon4.gif>" & rsonline("o_username") &""
elseif rsonline("o_hidden")=1 and issupermaster=false then
Response.Write " <img src=image/icon4.gif> 隐身会员"
else
sql="select grade from user where username='"&rsonline("o_username")&"'"
set rs=conn.execute(sql)
if not rs.eof then
u_grade=rs("grade")
if u_grade="0" then
response.write("<img src=image/icon0.gif>")
elseif u_grade="1" then
response.write("<img src=image/icon.gif>")
elseif u_grade="2" then
response.write("<img src=image/icon1.gif>")
elseif u_grade="3" then
response.write("<img src=image/icon2.gif>")
else
response.write("<img src=image/icon3.gif>")
end if
end if
set rs=nothing
if cpbusername=rsonline("o_username") then
Response.Write "<a href='viewuser.asp?username=" & rsonline("o_username") & "' target=_blank><b>"& rsonline("o_username") & "</b></a>"
else
Response.Write "<a href='viewuser.asp?username=" & rsonline("o_username") & "' target=_blank>"& rsonline("o_username") & "</a>"
end if
end if
response.write("</td>")
if i_online=5 then
response.write("</tr><tr class=tdc>")
i_online=0
else
i_online=i_online+1
end if
rsonline.movenext
loop
end if
set sqlonline=nothing
%>
</tr></table>
</td></tr><%end if%></table>
<table border=0 cellspacing=0 cellPadding=1 class=tb2>
<tbody><tr class=tdc>
<td width="13%" bgcolor=<%=tColor1%>><a href=postnew.asp?l_id=<%=request.querystring("l_id")%>>
<img alt=发表新主题 src="<%=t_reply%>" border="0"></a></td>
<td width="13%" bgcolor=<%=tColor1%>><a href=postnew.asp?l_id=<%=request.querystring("l_id")%>&action=vote>
<img alt=发起新投票 src="<%=v_reply%>" border="0"></a></td>
<%response.write"<td align=center width=""50%"" valign=middle bgcolor="&tColor1&" align=left class=tdc>"&_
"<table align=center border=0 width=""400"">"&_
"<tr>"&_
"<td width=""100%"" class=tdc>"
sql="select top 1 a_title,a_time from announce where a_num="&l_id&" order by a_time desc"
set rs=conn.execute(sql)
if rs.bof and rs.eof then
an_list="<b><a href='announce.asp?l_id="&l_id&"' target=_blank>本版面当前没有公告</a></b> ("&nowtime&")"
else
an_list="<b><a href='announce.asp?l_id="&l_id&"' target=_blank>"& rs("a_title") &"</a></b> ("& rs("a_time") &")"
end if
set rs=nothing
response.write "<marquee onmouseover=""this.stop()"" onmouseout=""this.start()"" scrollAmount=""3"">"&an_list&"</marquee>"&_
"</td>"&_
"</tr>"&_
"</table>"&_
"</td>"
%>
<td bgcolor=<%=tColor1%> align=right>版主列表:<% '写出斑竹
response.write("<select name=banzhu class=bdtj3>"&_
"<option>本版版主</option>")
if not isnull(l_banzhu) and l_banzhu<>"" then
l_banzhu1=split(l_banzhu,",")
for i=0 to (ubound(l_banzhu1)-1)
response.write("<option>"&l_banzhu1(i)&"</option>")
next
end if
response.write("</select>")
set rs_banzhu=nothing
response.write("</td>")%>
</tr>
</tbody>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -