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

📄 topiclist.asp

📁 一个功能很全面的设计网站,可以作为工作室、个人主页、技术网站等
💻 ASP
字号:
<!--#include file="up.asp"-->
<%
checklg()
dim sql,pagesetup,count,totalpage,pagecount,ii,iii,href1,href2,href3,topicinfo,retopic,reinfo,gonggao,online,renum,repage,n,nn,hot,width,face
response.write"<script language='javascript'>function Check(){var Name=document.form.topage.value;document.location='?bd="&bd&"&action="&action&"&topage='+Name+'';}</script>"
if usertype>3 or (usertype=3 and instr("|"&adminbd&"|","|"&bd&"|"))>0 then
%><table align="center" border="1" cellpadding="0" bordercolor="#cccccc" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" height="28">
  <tr>
    <td width="120" bgcolor="f2f2f2" >&nbsp; <img border="0" src="pic/gl.gif">
    <a href="adminbd.asp?bd=<%=bd%>"><b>&nbsp;&nbsp;<font color="#999999">管理选项:</font></b></a></td>
    <td bgcolor="<%=c2%>">&nbsp;·<a href="adminbd.asp?bd=<%=bd%>&action=gonggao">发布公告</a>·<a href="adminbd.asp?bd=<%=bd%>&action=gonggaogl">公告管理</a><%if bdtype=3 then%>·<a href="adminbd.asp?action=passuser&bd=<%=bd%>"> 认证用户</a><%end if%>·<a href="adminbd2.asp?action=recycle&bd=<%=bd%>">回 收 站</a>·</td>
  </tr>
</table><br><%end if%>
<%
gonggao=checknum(request.Cookies(prefix&"1")("gonggao"))
online=checknum(request.Cookies(prefix&"1")("online"))

if isnull(lguserid) or lguserid="" then
if conn.execute("select userid from online where ip='"&ip&"'").eof then
sql="insert into online(ip,lasttime,onbd,nowon) values('"&ip&"',now(),"&bd&",'"&bdinfo(0)&"')"
else
sql="update online set userid=0,name='',lasttime=now(),pic=0,onbd="&bd&",nowon='"&bdinfo(0)&"' where ip='"&ip&"'"
end if
else
if conn.execute("select userid from online where userid="&lguserid&" or ip='"&ip&"'").eof then
sql="insert into online(userid,name,ip,lasttime,pic,onbd,nowon) values("&lguserid&",'"&lgname&"','"&ip&"',now(),"&usertype&","&bd&",'"&bdinfo(0)&"')"
else
sql="update online set userid="&lguserid&",name='"&lgname&"',ip='"&ip&"',lasttime=now(),pic="&usertype&",onbd="&bd&",nowon='"&bdinfo(0)&"' where userid="&lguserid&" or ip='"&ip&"'"
end if
end if
conn.execute(sql)
conn.execute("delete*from online where now()-lasttime>"&onlinetime&"/24")

%><style>.list{BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 1px;}.td {BORDER-RIGHT: 0px; BORDER-TOP: 0px;}</style><table align="center" border="1" cellpadding="0" bordercolor="#cccccc" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
    <tr>
      <td class=td1 width="120" bgcolor="#f2f2f2"  height="28">&nbsp; <img border="0" src="pic/gl.gif">&nbsp;&nbsp;<font color=#999999> 版面信息:</font></td>
      <td bgcolor="<%=c2%>">
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
            <tr>
              <td width="60%">&nbsp;·本版帖数:<%=topicnum%>&nbsp;&nbsp;&nbsp; ·今日帖数:<font color=red><%=todaynum%></font></td>
              <td width="40%" align="right"><%if isnull(thisbdadmin) or thisbdadmin="" then:response.write"本版面还没有版主":else:response.write"本版版主:"&replace(kbbs(thisbdadmin),"|","&nbsp; ")&"":end if%>&nbsp;&nbsp;</td>
            </tr>
          </table>
      </td>
    </tr>
   
  </table>
<br>
  <div align="center">
    <center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cccccc" width="<%=tbw%>" height="34">
    <tr>
      <td>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="748" height="30">
    <tr>
      <td width="300" bgcolor="<%=c2%>">&nbsp;<a href="addtopic.asp?bd=<%=bd%>&topictype=1"><img border="0" src="pic/fabiao.gif"></a>&nbsp; <a href="addtopic.asp?bd=<%=bd%>&topictype=1&vote=1"><img border="0" src="pic/vote.gif"></a>&nbsp; <a href="?bd=<%=bd%>&action=good"><img border="0" src="pic/good.gif"></a></td>
      <td bgcolor="<%=c2%>"><%if gonggao=1 or gonggao="" then%><SCRIPT src=inc/menu.js></script><%dim papern,paper,papers
papern=0
response.write"<script>messages = new Array()"
set papers=conn.execute("select*from paper where bd="&bd&" order by id desc")
if papers.eof then%>
messages[0]="&nbsp;当前没有公告"
<%
else
do while not papers.eof
paper=papers("paper")
paper=split(paper,"|")
%>

messages[<%=papern%>]="&nbsp;<a href=# onclick=openscript('paper.asp?id=<%=papers("id")%>')><b><font color=<%=c1%>><%=kbbs(lefttrue(paper(0),45))%> [ <%=paper(2)%> ]</font></b></a>"

<%
papern=papern+1
papers.movenext
loop
end if
set papers=nothing
response.write"</script>"
%><div id=content></div><SCRIPT>jspaper()</SCRIPT><%end if%></td>
            
    </tr>
  </table></td></tr></table>

    </center>
</div>

<br>
<%=ttop%><table align="center" class=td1  border="0" cellpadding="0" cellspacing="0" width="<%=tbw%>" bordercolor='#cccccc' bgcolor="<%=c1%>" background="<%=tbg%>" height="28">
    <tr>
      <td width="5%" align="center">表情</td>
      <td align="center" width="45%">主题 (点击表情在新窗口打开)</td>
      <td align="center" width="10%">作者</td>
      <td align="center" width="10%">回复/人气</td>
      <td align="center" width="20%">最后更新时间</td>
      <td align="center" width="10%">最后回复</td>
    </tr>
</table>

<%
dim action
action=request.querystring("action")
if action="good" then
sql="select*from topic where bd="&bd&" and type=1 order by top desc,edittime desc"
else
sql="select*from topic where (bd="&bd&" or top=2) and type<>3 order by top desc,edittime desc"
end if
set rs = server.createobject("adodb.recordset")
pagesetup=checknum(application(prefix&"topiclistpage"))
rs.Open sql,conn,1
TotalPage=0
Count=rs.recordcount
conn.execute("update bdinfo set topicnum="&count&" where id="&bd&" and followid<>0")
if not rs.eof then
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
pagecount= 0
rs.moveFirst
if Request.QueryString("ToPage")<>"" and isnumeric(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
i=1
do while not rs.eof
topicinfo=rs("topicinfo")
topicinfo=split(topicinfo,"|")
retopic=rs("retopic")
if isnull(retopic) or retopic="" then
reinfo="——"
retopic="未有人回复。|——|0"
retopic=split(retopic,"|")
else
retopic=split(retopic,"|")
reinfo="<a href=userinfo.asp?userid="&retopic(2)&">"&kbbs(retopic(1))&"</a>"
end if
renum=rs("renum")
hot=checknum(application(prefix&"showbbspage"))
if renum/hot>(renum\hot) then
repage=(renum\hot)+1
else
repage=renum\hot
end if
width=35
face=topicinfo(0)
if rs("type")=1 then face="jing"
if rs("type")=2 then face="lock"

if rs("top")=1 then face="top"
if rs("top")=2 then face="alltop"
if repage>1 then width=25

response.write"<table class=list onmouseover=javascript:this.bgColor='#ffffff' onmouseout=javascript:this.bgColor='#ffffff' bgcolor='#ffffff' bordercolor='#cccccc' border=1 align=center cellpadding=0 cellspacing=0 style='border-collapse: collapse;' width="&tbw&" height=28><tr><td class=td width=5% align=center><a target=_blank href='showbbs.asp?bd="&rs("bd")&"&id="&rs("id")&"&totable="&rs("totable")&"' title='最后回复:"&kbbs(retopic(0))&"'><img border=0 src=face/"&face&".gif></a></td><td class=td width=45% >&nbsp;&nbsp;<a href='showbbs.asp?bd="&rs("bd")&"&id="&rs("id")&"&totable="&rs("totable")&"' title='最后回复:"&kbbs(retopic(0))&"'>"&topicinfo(3)&" <font color="&replacecolor(kbbs(topicinfo(1)))&">"&lefttrue(kbbs(topicinfo(1)),width)&"</font></a>"

if repage>1 then
response.write" <img align=absmiddle border=0 src=pic/hot.gif> <font color="&c1&">[</font><b> "
if repage<=4 then
for n=1 to repage
response.write"<a target=_self href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&n&"><font color="&c1&">"&n&"</font></a> "
next
else
for nn=1 to 3
response.write"<a target=_self href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&nn&"><font color="&c1&">"&nn&"</font></a> "
next
response.write"... <a target=_self href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&topage="&repage&"><font color="&c1&">"&repage&"</font></a> "
end if
response.write" </b><font color="&c1&">]</font>"
end if


response.write"</td><td class=td align=center width=10% ><a href=userinfo.asp?userid="&rs("userid")&">"&kbbs(topicinfo(2))&"</a></td><td class=td align=center width=10% >"&renum&"/"&rs("hits")&"</td><td class=td align=center width=20% >"&rs("edittime")&"</td><td class=td align=center width=10% >"&reinfo&"</td></tr></table>"
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
end if
rs.Close
set rs=nothing
href1=" <a href=?topage=1&bd="&bd&"&action="&action&">"
response.write"<div align='center'><center><TABLE bgcolor="&c1&" cellSpacing=0 cellPadding=0 width='"&tbw&"' border=0 ><TBODY><TR height=25><TD height=2><TABLE cellSpacing=0 cellPadding=3 width='100%' border=0 background='"&tbg&"' style='border-collapse: collapse; border-left-width:0; border-top-width:0; border-bottom-width:0'><TBODY><TR><TD><b><font color='#FFFFFF'><img border='0' src='pic/fl.gif'> 本版面共有</font><font color='#ffffff'> "&TotalPage&" </font><font color='#FFFFFF'>页,<font color='#ffffff'> "&count&" </font>张帖子,每页有<font color='#ffffff'> "&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&"&action="&action&">"
href3="<a href=?topage="&TotalPage&"&bd="&bd&"&action="&action&">"
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
response.write" ]</font></b></TD><form name=form method='POST' action=javascript:Check()><TD height=2 align='right'><font color='#FFFFFF'>页码:&nbsp;&nbsp;<input style=FONT-SIZE:9pt maxLength='6' size='6' name='topage' value='"&PageCount&"'>&nbsp;&nbsp;&nbsp;<input style=FONT-SIZE:9pt value='GO!' type='submit'></font></TD></form></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></center></div>"&tbottom&""
if online=1 or online="" then
dim onbd1,onbd2
onbd1=conn.execute("select count(userid) from online where onbd="&bd&"")(0)
onbd2=conn.execute("select count(userid) from online where onbd="&bd&" and userid=0")(0)
%>
<SCRIPT>var checktj;checktj=1;function tj0(){if(onlinetj.style.display==""){onlinetj.style.display = "none";}else{onlinetj.style.display="";if (checktj==1){tj.location="online.asp?onlinetj=bd&bd=<%=bd%>";}checktj=2;}}</SCRIPT>
<br>
<table align="center" border="1" bordercolor='#cccccc' cellpadding="0" cellspacing="0" style="border-collapse: collapse"  width="<%=tbw%>" height="30">
  <tr>
    <td class=td1 width="120" bgcolor=#f2f2f2 height="28">&nbsp; <img border="0" src="pic/gl.gif">&nbsp;&nbsp;&nbsp; <font color=#999999> 在线统计:</font></td>
    <td bgcolor="<%=c2%>" height="28">&nbsp;目前本版面总共有 <font color="#ff0000"><%=onbd1%></font> 人在线。其中有 <font color="#FF0000"><%=onbd1-onbd2%></font> 位会员, <%=onbd2%> 位游客。 [ <a onclick=tj0()><SPAN style='CURSOR: hand'>详细列表</span></a> ]</td>
  </tr>  
    <tr id=onlinetj style='display:none'>
    <td width="120" bgcolor="f2f2f2" height="28" align="center"> <img border="0" src="pic/fle.gif"> 详细列表:</td>
    <td bgcolor="f2f2f2" height="28"><iframe name=tj marginwidth=3 marginheight=2 width=100% border=0 frameborder=0 height=65></iframe></td>
  </tr> 
  
</table><%end if%>
<br>
<table align="center" border="1" bordercolor='#cccccc' cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" height="30">
  <tr>
    <td class=td1 width="120" bgcolor='#f2f2f2' >&nbsp; <img border="0" src="pic/gl.gif">&nbsp;&nbsp;&nbsp;<font color=#999999> 帖子类型:</font></td>
    <td bgcolor="<%=c2%>">&nbsp;<img src="face/alltop.gif" border="0" align="absmiddle"> 总置顶帖子 &nbsp;&nbsp;&nbsp;
      <img src="face/top.gif" border="0" align="absmiddle"> 置顶帖子 &nbsp;&nbsp;&nbsp;
      <img src="face/jing.gif" border="0" align="absmiddle"> 精华帖子 &nbsp;&nbsp;&nbsp;
      <img src="face/lock.gif" border="0" align="absmiddle"> 锁定帖子 &nbsp;&nbsp;&nbsp;
      <img src="face/vote.gif" border="0" align="absmiddle"> 投票帖子 &nbsp;&nbsp;&nbsp;
      <img src="pic/hot.gif" border="0" align="absmiddle"> 热门帖子</td>
  </tr>
</table>
<%call down%>

⌨️ 快捷键说明

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