📄 read_art_sub.asp
字号:
<%
'==============================================================================
'软件名称:星空社区 VER 1.0.15
'当前版本:starcity club V1.0.15
'最新更新:2004.9
'==============================================================================
'Copyright (C) 2002-2004 Googln.com All rights reserved.
'商业注册联系:010-64410364
'技术支持QQ:6370639(限商业用户)
'程序开发:Googln Studio(BeiJing)
'Email:Avram@163.com
'论坛支持:星空社区(http://www.starcity.cn/bbs)
'官方网站:www.Googln.com 演示站点:www.starcity.cn/bbs 都市星空:www.starcity.cn 阳光商城:www.sunmall.com.cn
'==============================================================================
'免费版本请在首页保留版权信息,并做上本站LOGO友情连接
'都市星空在线保留此程序的法律追究权利
'==============================================================================
%>
<!--#include file="include/conn.asp"-->
<!-- #include file="inc.asp" -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="include/style_.css">
<%
'建立str语句
boardid=trim(request("boardid"))
if boardid="" then
show_error("请选择论坛版块进入")
end if
'添加验证输入信息合法性 2004/05/11
if instr(boardid,"'")<>0 or instr(boardid,"=")<>0 or instr(boardid,"&")<>0 or instr(boardid,"%")<>0 or instr(boardid,"or")<>0 then
show_error("出现非法字符,对不起!")
end if
'判断自己是否为斑竹
set rscheckmaster=server.createobject("adodb.recordset")
sqltext="select * from db_board where boardid="&boardid
'response.write sqltext
rscheckmaster.open sqltext,conn,1,1
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from db_board where boardid='"& boardid & "'"
rs.open sql,conn,3,1
%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40" bgcolor="#FFFFFF"><table width="465" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="73" valign="top" bgcolor="#F7F7F7"><img src="images/08.gif" width="73" height="24"></td>
<td background="images/09.gif" bgcolor="#F7F7F7"><%=rs("boardmaster")%></td>
<td width="9" valign="top" bgcolor="#F7F7F7"><img src="images/10.gif" width="9" height="24"></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#EFF7FF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
当前位置:<a href="main.asp">论坛</a>>><%=rs("boardname")%> </td>
<td width="170"><table border="0" align="right" cellpadding="2" cellspacing="2">
<tr>
<td width="33%"><a href="reg.asp"><img src="images/05.gif" width="35" height="20" border="0"></a></td>
<td><a href="login.asp"><img src="images/06.gif" width="35" height="20" border="0"></a></td>
<td><a href="post_art.asp?boardid=<%=request("boardid")%>"><img src="images/07.gif" width="35" height="20" border="0"></a></td>
</tr>
</table></td>
<td width="180"><div align="right">快速通道:
<select name="selectboard" onchange="window.navigate(this.value)">
<%
rsboard.movefirst
do while not rsboard.eof
%>
<option value="main.asp?boardid=<%=rsboard("boardid")%>" <% if cint(rsboard("boardid"))=cint(request("boardid")) then response.write "selected" %>><%=rsboard("boardname")%></option>
<%
rsboard.movenext
loop
rsboard.close
set rsboard=nothing
%>
</select>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<%
set rs2=server.createobject("adodb.recordset")
sqltext2="select db_bbs.bbsid,db_bbs.boardid,db_bbs.title,db_bbs.pic,db_bbs.author,db_bbs.putdate,db_bbs.replynum,db_bbs.clicknum,db_bbs.replydate,db_user.id,db_user.username,db_user.name from db_bbs,db_user where db_bbs.author=db_user.username and db_bbs.boardid="&boardid&" and db_bbs.puttop='1' order by db_bbs.replydate desc"
rs2.open sqltext2,conn,1,1
set rs1=server.createobject("adodb.recordset")
sqltext1="select db_bbs.bbsid,db_bbs.boardid,db_bbs.title,db_bbs.pic,db_bbs.author,db_bbs.putdate,db_bbs.replynum,db_bbs.clicknum,db_bbs.replydate,db_user.id,db_user.username,db_user.name from db_bbs,db_user where db_bbs.author=db_user.username and db_bbs.boardid="&boardid&" and db_bbs.distillate='1' order by db_bbs.replydate desc"
rs1.open sqltext1,conn,1,1
set rs=server.createobject("adodb.recordset")
sqltext="select db_bbs.bbsid,db_bbs.boardid,db_bbs.title,db_bbs.pic,db_bbs.author,db_bbs.putdate,db_bbs.replynum,db_bbs.clicknum,db_bbs.replydate,db_user.id,db_user.username,db_user.name from db_bbs,db_user where db_bbs.author=db_user.username and db_bbs.boardid="&boardid&" and db_bbs.rootid=0 and db_bbs.puttop=0 and db_bbs.distillate=0 order by db_bbs.replydate desc"
'response.write sqltext
rs.open sqltext,conn,1,1
'添加验证输入信息合法性 2004/05/11
pg=request("page")
if instr(pg,"'")<>0 or instr(pg,"=")<>0 or instr(pg,"&")<>0 or instr(pg,"%")<>0 or instr(pg,"or")<>0 then
show_error("出现非法字符,对不起!")
end if
page_size=20
rs.PageSize=page_size
page=CLng(pg)
if page="" or page<1 then
page=1
elseif page>rs.pagecount then
page=rs.pagecount
end if
if not rs.eof then rs.absolutepage=page else page=0
%>
<table width=100% border=0 align=center cellpadding=3 cellspacing=1>
<tr bgcolor="#738AD6" class=7>
<td width="40" height="25" bgcolor="#738AD6"><div align="center"><strong>状态</strong></div></td>
<td bgcolor="#738AD6"><strong>标题</strong></td>
<td width="60"><div align="center"><strong>作者</strong></div></td>
<td width="60"><div align="center"><strong>点击</strong></div></td>
<td width="80"><div align="center"><strong>回复</strong></div></td>
<td width="80" bgcolor="#738AD6"><div align="center"><strong>最后回复</strong></div></td>
</tr>
<%
if rs2.recordcount=0 then
else
for p2=1 to rs2.recordcount
%>
<tr>
<td width="40"><div align="center"><img src="ubb/<%=rs2("pic")%>"></div></td>
<td> <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>置顶:<a href="read_art_display.asp?boardid=<%=rs2("boardid")%>&bbsid=<%=rs2("bbsid")%>"><%=rs2("title")%></a>
</td>
<td width="40"><div align="right">
<%if DateDiff("d", rs2("replydate"),Now )<1 then
response.write "<img src=images/new.gif>"
end if
%>
<img src="images/b09b.gif"></div></td>
</tr>
</table> </td>
<td width="60"><div align="center"><%=rs2("author")%></div></td>
<td width="60"><div align="center"><%=rs2("clicknum")%></div></td>
<td width="80"><div align="center"><%=rs2("replynum")%></div></td>
<td width="80">
<div align="center">
<% if rs2("replydate")="" or isnull(rs2("replydate")) then
response.write "未回复"
else
response.write month(rs2("replydate"))&"-"&day(rs2("replydate"))&" "&hour(rs2("replydate"))&":"&minute(rs2("replydate"))
end if%>
</div></td>
</tr>
<%
rs2.movenext
next
end if
%>
<%
if rs2.recordcount<>0 then
%>
<%
end if
rs2.close
%>
<%
if rs1.recordcount=0 then
else
for p2=1 to rs1.recordcount
%>
<tr>
<td><div align="center"><img src="ubb/<%=rs("pic")%>"></div></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>精华:<a href="read_art_display.asp?boardid=<%=rs1("boardid")%>&bbsid=<%=rs1("bbsid")%>"><%=rs1("title")%></a>
</td>
<td width="40"><div align="right">
<%if DateDiff("d", rs1("replydate"),Now )<1 then
response.write "<img src=images/new.gif>"
end if
%>
<img src="images/distillate.gif" width="15" height="15"></div></td>
</tr>
</table></td>
<td><div align="center"><%=rs1("author")%></div></td>
<td><div align="center"><%=rs1("clicknum")%></div></td>
<td><div align="center"><%=rs1("replynum")%></div></td>
<td><div align="center">
<% if rs1("replydate")="" or isnull(rs1("replydate")) then
response.write "未回复"
else
response.write month(rs1("replydate"))&"-"&day(rs1("replydate"))&" "&hour(rs1("replydate"))&":"&minute(rs1("replydate"))
end if%>
</div></td>
</tr>
<%
rs1.movenext
next
end if
%>
<%
if rs1.recordcount<>0 then
%>
<%
end if
rs1.close
%>
<%
if rs.recordcount=0 then
%>
<tr bgcolor="#FFFFFF">
<td colspan="6">
<div align="center"><font color=red>该论坛还没有任何主题!</font></div></td>
</tr>
<%
else
i=0
for p=1 to rs.PageSize
i=i+1
%>
<tr <% if i mod 2 =0 then response.write "bgcolor=#F7F3F7" %>>
<td width="40"><div align="center"><img src="ubb/<%=rs("pic")%>"></div></td>
<td><a href="read_art_display.asp?boardid=<%=rs("boardid")%>&bbsid=<%=rs("bbsid")%>"><%=rs("title")%></a>
<%if DateDiff("d", rs("replydate"),Now )<1 then
response.write "<img src=images/new.gif>"
end if
%></td>
<td width="60"><div align="center"><%=rs("author")%></div></td>
<td width="60"><div align="center"><%=rs("clicknum")%></div></td>
<td width="80"><div align="center"><%=rs("replynum")%></div></td>
<td width="80">
<div align="center">
<% if rs("replydate")="" or isnull(rs("replydate")) then
response.write "未回复"
else
response.write month(rs("replydate"))&"-"&day(rs("replydate"))&" "&hour(rs("replydate"))&":"&minute(rs("replydate"))
end if%>
</div></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
end if
%>
</table></td>
</tr>
<tr>
<td><div align="right">共<%=rs.recordcount%>条主题 第
<select name="select" onChange="window.navigate(this.value)" class="inpud">
<%for i=1 to rs.PageCount
response.write "<option value=read_art_sub.asp?boardid="&boardid&"&page="&i
if i=page then response.write " selected"
response.write ">" & i & vbcrlf
next%>
</select>
页(每页<%=rs.pagesize%>条) 共<%=rs.PageCount%>页
<%
if page>1 then
response.write "<a href=""read_art_sub.asp?boardid="&boardid&"&page=1"">"
response.write "首页</a>"
else
response.write "首页"
end if
response.write " "
if page-1>=1 then
response.write "<a href=""read_art_sub.asp?boardid="&boardid&"&page="&(page-1)&""">"
response.write "上页</a>"
else
response.write "上页"
end if
response.write " "
if page+1<=rs.pagecount then
response.write "<a href=""read_art_sub.asp?boardid="&boardid&"&page="&(page+1)&""">"
response.write "下页</a>"
else
response.write "下页"
end if
response.write " "
if page<rs.pagecount then
response.write "<a href=""read_art_sub.asp?boardid="&boardid&"&page="&rs.pagecount&""">"
response.write "末页</a>"
else
response.write "末页"
end if
rs.close
%></div></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table border="0" align="center" cellpadding="4" cellspacing="2">
<tr>
<td><img src="images/b09b.gif" width="15" height="15"></td>
<td>固顶帖</td>
<td><img src="images/new.gif" width="15" height="15"></td>
<td>新帖子</td>
<td><img src="images/distillate.gif" width="15" height="15"></td>
<td>精华帖</td>
</tr>
</table></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -