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

📄 boardskin1.asp

📁 应用于高等院校党团思想教育
💻 ASP
字号:
<%
	sub AnnounceList1()	
	'on error resume next

	sql="select bbs1.AnnounceID,bbs1.parentID,bbs1.boardID,bbs1.UserName,bbs1.child,bbs1.Topic,bbs1.DateAndTime,bbs1.hits,bbs1.RootID,bbs1.Expression,bbs1.times,bbs1.locktopic,board.lockboard from bbs1,board where bbs1.boardid=board.boardid and bbs1.boardID="&cstr(boardID)&" and bbs1.parentID=0 "&tl&" ORDER BY bbs1.times desc,bbs1.announceid desc"
	rs.open sql,conn,1,1
	if err.number<>0 then
		foundErr = true
		ErrMsg = "<li>数据库操作失败:" & err.description & "</li>"
	else
		if rs.bof and rs.eof then
			'论坛无内容
			call showEmptyBoard1()
			bBoardEmpty = true
		else
	      		totalrec=rs.recordcount 
      			if currentpage<1 then 
          			currentpage=1 
      			end if 

      			if (currentpage-1)*MaxAnnouncePerPage>totalrec then 
	   			if (totalrec mod MaxAnnouncePerPage)=0 then 
	     				currentpage= totalrec \ MaxAnnouncePerPage 
	   			else 
	      				currentpage= totalrec \ MaxAnnouncePerPage + 1 
	   			end if 
      			end if 
       			if currentPage=1 then 
            			call showpagelist1() 
       			else 
          			if (currentPage-1)*MaxAnnouncePerPage<totalrec then 
            				rs.move  (currentPage-1)*MaxAnnouncePerPage 
            				call showpagelist1() 
        			else 
	        			currentPage=1 
           				call showpagelist1() 
	      			end if 
	   		end if 
		end if
	end if				
		if err.number<>0 then err.clear	
	end sub

	REM 显示贴子列表	
	sub showPageList1()
	i=0
%>
<span id=forum>
            <table cellpadding=0 cellspacing=0 border=0 width=95% bgcolor=<%=Tableback%> align=center>
            <tr><td height=1>
		</td>
            </tr>
            </table>
<TABLE bgColor="<%=Tableback%>" border=0 cellPadding=0 cellSpacing=0 width="95%" align=center>
  <TBODY>
  <TR>
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD align=middle height=27 bgColor="<%=Tabletitle%>" width=32><font color=<%=TableFont%>>状态</font></TD> 
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD align=middle bgColor="<%=Tabletitle%>" width=*><font color=<%=TableFont%>>主 题  (点心情符为开新窗浏览)</font></TD> 
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD align=middle bgColor="<%=Tabletitle%>" width=80><font color=<%=TableFont%>>作 者 </font></TD> 
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD align=middle bgColor="<%=Tabletitle%>" width=64><font color=<%=TableFont%>>回复/人气</font></TD>
    <td bgcolor=<%=Tableback%> valign=middle width=1></td> 
    <TD align=middle bgColor="<%=Tabletitle%>" width=195><font color=<%=TableFont%>>回复人 | 最后更新</font></TD>
    <td bgcolor=<%=Tableback%> valign=middle width=1></td></TR> 
</TBODY></TABLE>
            <table cellpadding=0 cellspacing=0 border=0 width=95% bgcolor=<%=Tableback%> align=center>
            <tr><td height=1>
		</td>
            </tr>
            </table>
<%
       do while not rs.eof
%>
<TABLE bgColor="<%=Tableback%>" border=0 cellPadding=0 cellSpacing=0 width="95%" align=center>
  <TBODY>
  <TR> 
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD align=middle bgColor="<%=Tablebody%>" width=32 height=27><font color=<%=TableContent%>>
<%if rs("lockboard")=1 then%><img src=<%=picurl%>lockfolder.gif alt="本论坛已锁定"><%else%><%if rs("locktopic")=1 then%><img src=<%=picurl%>lockfolder.gif alt="本主题已锁定"><%else%><%if rs("child")>=10 then%><img src=<%=picurl%>hotfolder.gif><%else%><img src=<%=picurl%>folder.gif><%end if%><%end if%><%end if%></font>
    </TD> 
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD bgColor=<%=Tablebody%> width="*"><font color=<%=TableContent%>><a href='dispbbs.asp?boardID=<%=boardID%>&RootID=<%=rs("RootID")%>&ID=<%=rs("announceID")%>&skin=<%=skin%>' target=_blank><img src='images/<%=rs("Expression")%>' border=0 alt="开新窗口浏览此主题"></a> <a href='dispbbs.asp?boardID=<%=boardID%>&RootID=<%=rs("RootID")%>&ID=<%=rs("announceID")%>&skin=<%=skin%>'><%=htmlencode(rs("topic"))%></a>
<%if rs("child")>Maxtitlelist then%>
&nbsp;&nbsp;[分页:
<%
Pnum=Cint(rs("child")/Maxtitlelist)+1
for p=1 to Pnum
response.write " <a href='dispbbs.asp?boardID="&boardID&"&RootID="&rs("RootID")&"&ID="&rs("announceID")&"&star="&P&"&skin="&skin&"'><b>"&p&"</b></a> "
next
%>
]
<%end if%></font>
    </TD> 
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD align=middle bgColor="<%=aTablebody%>"  width=80><font color=<%=TableContent%>><a href=javascript:openScript('dispuser.asp?name=<%=htmlencode(rs("username"))%>',350,300)><%=htmlencode(rs("username"))%></a></font></TD> 
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD align=middle bgColor="<%=Tablebody%>" width=64><font color=<%=TableContent%>><%=rs("child")%>/<%=rs("hits")%></font></TD> 
    <td bgcolor=<%=Tableback%> valign=middle width=1></td>
    <TD bgColor=<%=aTablebody%> width=195>  <font color=<%=TableContent%>>
<IMG border=0 src="<%=picurl%>lastpost.gif">
<%
	on error resume next
    	set Ers=conn.execute("select username,dateandtime from bbs1 where announceid="&rs("times")&"")
'	sql="select username,dateandtime from bbs1 where announceid="&cstr(rs("times"))&""
'	Ers.open sql,conn,1,1
	if Ers.eof and Ers.bof then
	response.write ""&FormatDateTime(rs("dateandtime"),2)&"&nbsp;"&FormatDateTime(rs("dateandtime"),4)&""
	response.write "&nbsp;<font color=#990000>|</font>&nbsp;------"
	else
	response.write ""&FormatDateTime(Ers("dateandtime"),2)&"&nbsp;"&FormatDateTime(Ers("dateandtime"),4)&""
	response.write "&nbsp;<font color=#990000>|</font>&nbsp;"
	if rs("announceid")=rs("times") then
	response.write "------"
	else
	response.write "<a href=javascript:openScript('dispuser.asp?name="&htmlencode(Ers("username"))&"',350,300)>"&htmlencode(Ers("username"))&"</a>"
	end if
	end if
	Ers.close
%>
</FONT></TD>
    <td bgcolor=<%=Tableback%> valign=middle width=1></td></TR> 
</TBODY></TABLE>
            <table cellpadding=0 cellspacing=0 border=0 width=95% bgcolor=<%=Tableback%>  align=center>
            <tr><td height=1>
		</td>
            </tr>
            </table>
<%
	  i=i+1
	  if i>=MaxAnnouncePerPage then exit do
          rs.movenext
        loop
	rs.close
%>
</span>
<%
		if err.number<>0 then err.clear
	end sub

	sub listPages3()
	'on error resume next

  	dim n
  	if totalrec mod MaxAnnouncePerPage=0 then
     		n= totalrec \ MaxAnnouncePerPage
  	else
     		n= totalrec \ MaxAnnouncePerPage+1
  	end if
%>
<table border="0" cellpadding="0" cellspacing="3" width="95%" align="center">
<form method="post" action="list.asp" name="frmList2">
        <input type=hidden name="selTimeLimit" value="<%=request("selTimeLimit")%>">
        <input type=hidden name="skin" value="<%=skin%>">
  <tr>
    <td valign="middle" nowrap><span class="smallFont">页次:<strong><%=currentPage%></strong>/<strong><%=n%></strong>页 每页<strong><%=MaxAnnouncePerPage%></strong> 总贴数<strong><%=allarticle()%></strong></td>
    <td valign="middle" nowrap>
      <div align="right"><p>分页:
<%
	   for p=1 to n
	   if p<10 then
	       if p=currentPage then
	          response.write "["+Cstr(p)+"] "
		   else
		      response.write "<a href='javascript:viewPage2("+Cstr(p)+")' language='javascript'>["+Cstr(p)+"]</a>   "
		   end if
		end if
	next
%>
<span class="smallFont">转到:<input type="text" name="Page" size=3 maxlength=10  value="<%=currentpage%>"><input type="button" value="Go" language="javascript" onclick="viewPage1(document.frmList2.Page.value)" id="button1" name="button1"></span></p>      
      </div>    
    </td>
  </tr>
<input type="hidden" name="BoardID" value="<%=BoardID%>">
</form>
</table>

<%		if err.number<>0 then err.clear
	end sub 

	sub showEmptyBoard1()
%>
<TABLE bgColor='<%=Tableback%>' border=0 cellPadding=4 cellSpacing=1 width="95%" align=center>
  <TBODY>
  <TR bgColor='<%=Tabletitle%>'>
    <TD align=middle noWrap height=25><font color=<%=TableFont%>>状态</font></TD> 
    <TD align=middle noWrap><font color=<%=TableFont%>>主 题  (点心情符为开新窗浏览)</font></TD> 
    <TD align=middle noWrap><font color=<%=TableFont%>>作 者 </font></TD> 
    <TD align=middle noWrap><font color=<%=TableFont%>>回复/人气</font></TD> 
    <TD align=middle noWrap><font color=<%=TableFont%>>最新回复</font></TD></TR> 
  <tr bgColor="<%=Tablebody%>"><td colSpan=5 vAlign=center width="100%"><li>本论坛暂无内容,欢迎发贴。<li>或者在您选择的查询条件下没有相关贴子,请重新指定条件。</td></tr>
</TBODY></TABLE>
<%
	rs.close
	end sub
%>

⌨️ 快捷键说明

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