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

📄 goodlist.asp

📁 一个小巧的论坛程序 本程序基本功能:  可开设任意数目的讨论区类别和版块 使用Cookies
💻 ASP
字号:
<!--#include file="up.asp"-->
<script language="javascript">
function Check(){var Name=document.form.topage.value;
document.location='?bd=<%=bd%>&topage='+Name+'';
}
</script>
<%
bdlogin(1)
if bdtype<>2 or canre="yes" or admin=3 then 
fbt="<a target='_self' href='say.asp?bd="&bd&"&re=no'><img border=0 src=pic/fabiao.gif align='middle'></a>"
end if
%>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" height="40">
    <tr>
      <td width="100%"><%=fbt%></td>
    </tr>
  </table>
  </center>
</div>
<%

dim rs
dim sql
set rs = server.createobject("adodb.recordset")

sql = "select * from bbstl where type=1 and bd="&bd&" order by orders desc"
count=myconn.execute("select count(id)from bbstl where type=1 and bd="&bd&"")(0)
href1="<a href=?topage=1&bd="&bd&">"

on error resume next
pagesetup=20
rs.Open sql,myConn,1
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
PageCount= 0
RS.MoveFirst
if Request.QueryString("ToPage")<>"" then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
RS.Move (PageCount-1) * pagesetup
%>
<div align=center><center>
<table bgcolor=<%=c2%> border=1 cellpadding=0 cellspacing=0 style="border-collapse:collapse; border-left-width:1px; border-right-width:1px; border-top-width:1px" bordercolor=<%=c1%> width="98%" id=AutoNumber5 height="27">
<tr>
  <td width=4% align=center background="pic/<%=sp%>3.gif">
  <b><font color="#FFFFFF">状态</font></b></td>
  <td width=42% align=center background="pic/<%=sp%>3.gif">
  <b><font color="#FFFFFF">主 题</font><font color="#FFFFFF"> ( 点小图标在新窗口浏览 )</font></b></td>
<td width=9% align=center background="pic/<%=sp%>3.gif"><b><font color="#FFFFFF">作 者</font></b></td>
  <td width=9% align=center background="pic/<%=sp%>3.gif">
  <b><font color="#FFFFFF">回复/</font><font color="#FFFFFF">人气</font></b></td>
<td width=16% align=center background="pic/<%=sp%>3.gif">
<b><font color="#FFFFFF">最后更新时间</font></b></td>
  <td width=9% align=center background="pic/<%=sp%>3.gif">
  <b><font color="#FFFFFF">最后回复</font></b></td></tr></table></center></div>
<%
i=1
do while not rs.eof
rrzz=kbbs(rs("zhuti"))
lastre=kbbs(rs("lastre"))
lbs=split(lastre,"|?|")
zui=""&lbs(0)&""
tltl="最后更新:"&lbs(1)&""
bno1=rs("bnum")
remy=10
if bno1/remy>(bno1\remy) then
repage=(bno1\remy)+1
else
repage=bno1\remy
end if
leftn=40
if repage>4 then leftn=30
if repage>10 then leftn=20
response.write"<div align=center><center><table class=list width='98%' border=1 cellpadding=0 cellspacing=0 style='TABLE-LAYOUT: fixed; WORD-BREAK: break-all;border-collapse:collapse; border-left-width:1px; border-right-width:1px; border-top-width:1px' bordercolor="&c1&"  id=AutoNumber5><tr><td width=4% height=23 align=center><a target=_blank href=show.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"><img border=0 src=face/jing.gif></a></td><td width=42% height=27 align=left onmouseover=javascript:this.bgColor='#fafafa' onmouseout=javascript:this.bgColor=''>&nbsp;<a  target=_self href=show.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&" title="&LeftTrue(tltl,25)&">"&LeftTrue(rrzz,44)&"</a>"
if repage>1 then
response.write" <img align=absmiddle border=0 src=pic/hot.gif><font color="&c2&">[</font><b> "
if repage<=4 then
for nnre=1 to repage
response.write"<a target=_self href=show.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&nnre&"><font color="&c2&">"&nnre&"</font></a> "
next
else
for nnnre=1 to 3
response.write"<a target=_self href=show.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&nnnre&"><font color="&c2&">"&nnnre&"</font></a> "
next
response.write"... <a target=_self href=show.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&repage&"><font color="&c2&">"&repage&"</font></a> "
end if
response.write" </b><font color="&c2&">]</font>"
end if
response.write"</td><td width=9% height=23 align=center><a href='userinfo.asp?name="&kbbs(rs("name"))&"'>"&kbbs(rs("name"))&"</a></td><td width=9% height=23 align=center>"&bno1&"/"&rs("hits")&"</td><td width=16% height=23 align=center>"&rs("orders")&"</td><td width=9% height=23 align=center>"&zui&"</td></tr></table></center></div>"
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
rs.Close
%>
  <div align="center">
    <center>
<TABLE bgcolor=<%=c2%> borderColor=<%=c1%> cellSpacing=0 cellPadding=0 width="98%" border=1 style="border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px">
<TBODY>
<TR height=25>
<TD height=2>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0 background="pic/<%=sp%>3.gif" style="border-collapse: collapse; border-left-width:0; border-top-width:0; border-bottom-width:0">
<TBODY>
<TR>
<TD><b><font color="#FFFFFF">&nbsp;<img border="0" src="pic/fl.gif"> 本论坛共有</font><font color="#00FFFF"> <%=TotalPage%> </font><font color="#FFFFFF">页,<font color="#00FFFF"> <%=count%> </font>个话题,每页有<font color="#00FFFF"> <%=pagesetup%> </font> 张贴子 >> [
<%
ii=PageCount-5
iii=PageCount+5
if ii < 1 then
ii=1
end if
if iii > TotalPage then
iii=TotalPage
end if

if PageCount > 6 then
Response.Write ""&href1&"<font color=yellow>1</font></a> ... "
end if

for i=ii to iii
If i<>PageCount then

href2="<a href=?topage="& i &"&bd="&bd&">"
href3="<a href=?topage="&TotalPage&"&bd="&bd&">"

Response.Write ""&href2&"<font color=yellow>" & i & "</font></a> "
else
Response.Write " <font color=red><b>"&i&"</b></font> "
end if
next

if TotalPage > PageCount+5 then
Response.Write " ... "&href3&"<font color=yellow>"&TotalPage&"</font></a>"
end if
%> ]</font></b></TD>
<form name=form method="POST" action=javascript:Check()>
<TD height=2 align="right"><font color="#FFFFFF">页码:<input style=FONT-SIZE:9pt maxLength="6" size="6" name="topage" value="<%=PageCount%>">
<input style=FONT-SIZE:9pt value="GO!" type="submit"></font></TD></form>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</center>
  </div><div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" height="40">
    <tr>
      <td width="100%" align="right">
<%response.write"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;} style='font-size: 9pt'><option selected>跳转论坛至...</option>"
set shsh=myconn.execute("select bdname,bn from bdinfo where key='0'")
do while not shsh.eof
response.write"<option>+"&shsh("bdname")&"</option>"
set fen=myconn.execute("select bdname,bn from bdinfo where key='"&shsh("bn")&"'")
do while not fen.eof
response.write"<option value='list.asp?bd="&fen("bn")&"'>-"&fen("bdname")&"</option>"
fen.movenext
loop
set fen=nothing
shsh.movenext
loop
set shsh=nothing
response.write"</select>"%>
</td>
    </tr>
  </table>
  </center>
</div>
<!--#include file="line.asp"-->
<div align=center>
  <center>
<table bgcolor=<%=c2%> border=1 cellpadding=0 cellspacing=0 style="border-collapse:collapse;" bordercolor=<%=c1%> width="98%" height="28" >
<tr>
<td width=100% background="pic/<%=sp%>3.gif">
<font color="#FFFFFF">&nbsp;<b><img border="0" src="pic/tj.gif" align="absmiddle"> 
在线统计:</b>目前论坛总共有 <b><%=lineno%></b> 人在线。其中有 <b><%=usno%></b> 位会员, <b><%=nusno%></b> 位游客。 </font></td>
</tr>
</table>
  </center>
</div>
<br>
</div>
<!--#include file="down.asp"-->

⌨️ 快捷键说明

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