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

📄 elist.asp

📁 ASP论坛2000
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<% option explicit%>
<!--#include file="conn.inc"-->
<!-- #include file="inc/char.inc" -->
<!-- #include file="inc/tree.inc"-->
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
<meta HTTP-EQUIV="Expires" CONTENT="0">
<link rel="stylesheet" type="text/css" href="forum.css">
<title>精华区域</title>
</head>
<body >
<%
'<META HTTP-EQUIV="Content-Type" content="text/html; charset=gb_2312-80">  

   dim sql,rs
   dim selStr
   dim RootIDArr
   'on error resume next
   selStr="()"    
   if not isEmpty(request("lstRefreshBoard")) then
      boardID=clng(request("lstRefreshBoard"))
   elseif not isEmpty(request("BoardID")) then
      boardID=clng(request("BoardID"))
   end if
   if not (isempty(request("page")) OR REQUEST("PAGE")="") then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
   if boardID>0 then      
      set rs=server.createobject("adodb.recordset")
      sql="select ID,boardID,announceID,username,useremail,url,urlTitle,urlPic,Topic,Body,dateAndTime,hits,length from essence where BoardID="+cstr(boardID)+" ORDER BY ID desc "
      rs.open sql,conn,1,1
      if rs.bof and rs.eof then
         rs.close
         dim rsBoard
         dim sqlBoard
         dim mailStr1
         dim mailStr2
         set rsBoard=server.createobject("adodb.recordset")
         sqlBoard="select user.username,user.useremail,board.boardname from board left join user on user.userid=board.boardmaster where board.boardID="+cstr(boardID)
         rsBoard.open sqlBoard,conn,1,1
         if rsBoard.eof and rsBoard.bof then
            response.write " 本论坛不存在 :o("
         else
           if trim(rsboard("useremail"))<>"" then
	      mailStr1="<a href='mailto:"+trim(rsboard("useremail"))+"'>"
              mailStr2="</a>"
           else
	      mailStr1=""
 	      mailStr2=""
  	   end if
           response.write "<p><big><strong>"+rsboard("boardname")+" 精华区 版主:"+mailstr1+rsboard("username")+mailstr2+"<br> <a href='eList.asp?BoardID="+cstr(BoardID)+"'><img border=0 src='images/refresh.jpg' alt='刷新浏览'></a></strong></big></p>"
           response.write " 本论坛精华区无内容 :o("
  	   response.write "<p><big><strong><a href='eList.asp?BoardID="+cstr(BoardID)+"'><img border=0 src='images/refresh.jpg' alt='刷新浏览'></a> <br>"+rsboard("boardname")+" 精华区 版主:"+mailstr1+rsboard("username")+mailstr2+"</strong></big></p>"
         end if
         rsBoard.close
      else
	 totalAnnounce=rs.recordcount
	 if currentPage=1 then
	 else
	    if (currentPage-1)*maxannounce<totalAnnounce then
	       rs.move  (currentPage-1)*maxannounce
	    else
	       currentPage=1
	    end if
	 end if
         call showTree()
         rs.close
       end if
   else
      response.write "未 指 定 所 需 参 数"
   end if

   
   sub showTree()
       dim rsBoard
       dim sqlBoard
       dim mailStr1
       dim mailStr2
       set rsBoard=server.createobject("adodb.recordset")
       sqlBoard="select user.username,user.useremail,board.boardname from board left join user on user.userid=board.boardmaster where board.boardID="+cstr(boardID)
       rsBoard.open sqlBoard,conn,1,1
       if trim(rsboard("useremail"))<>"" then
	  mailStr1="<a href='mailto:"+trim(rsboard("useremail"))+"'>"
	  mailStr2="</a>"
       else
	  mailStr1=""
	  mailStr2=""
       end if
       response.write "<p ><big><strong>"+rsboard("boardname")+" 精华区 版主:"+mailstr1+rsboard("username")+mailstr2+"</p></big><p>"+chr(13)+CHR(10)
       response.write " <a href='eList.asp?BoardID="+cstr(BoardID)+"&page="+cstr(currentpage)+"'>"+chr(13)+CHR(10)
       response.write "<img border=0 src='images/refresh.jpg' alt='刷新浏览'></a></strong><p>"+chr(13)+CHR(10)
       rem response.write "<p>共有"+cstr(rs.recordcount)+"条信息</p>"+chr(13)+CHR(10)
       showpages()
       response.write "<hr>"
       showlist()
       response.write "<hr>"
       showpages()
       response.write "<p><strong>"+chr(13)+CHR(10)
       response.write " <a href='eList.asp?BoardID="+cstr(BoardID)+"'>"+chr(13)+CHR(10)
       response.write "<img border=0 src='images/refresh.jpg' alt='刷新浏览'></a>"+chr(13)+CHR(10)
       response.write "</p><p><big>"+rsboard("boardname")+" 精华区 版主:"+mailstr1+rsboard("username")+mailstr2+"</strong></p>"+chr(13)+CHR(10)
       response.write "</big></p>"+chr(13)+chr(10)
       rsBoard.close
   end sub

   sub showlist()
       dim outtext
       dim bytestr
       dim count
       response.write  "<ul>"
       count=1
       do while not rs.eof
          outtext=outtext &  "<li>"
          if trim(rs("DateAndTime"))<>"" and isdate(rs("DateAndTime")) then
             if cbool(cdate(rs("DateAndTime"))>(date()-1))=true then
                outtext=outtext &  "<img src='images/new.gif'>"+chr(13)+chr(10)
             end if
          end if
          outtext=outtext &  "<a href='ShowEssence.asp?boardID="&cstr(BoardID)&"&ID="&Cstr(rs("ID"))&"' target='BoardAnnounce'>"
          dim t       		         
	  if rs("Length")=1 then
	     t=" <无内容>"
          else 
             t=" "
	  end if		   
          if rs("URL")<>"" and ucase(rs("URL"))<>"HTTP://" then
             t=t+"<联结>"
          end if
          if rs("URLPic")<>"" and ucase(rs("URLPic"))<>"HTTP://" then
             t=t+"<图象>"
          end if          
          if pwsonchsys then
             outtext=outtext & htmlencode(rs("Topic")+t)
          else
             outtext=outtext & Server.HTMLEncode(rs("Topic")+t)
          end if
          outtext=outtext & "</a> - <strong>" 
          bytestr="("+cstr(rs("length")-1)
          if not WINNT_CHINESE then
             if rs("Length")-1=1 then
                bytestr=bytestr+" Byte)"
	     else
	        bytestr=bytestr+" Bytes)"
      	     end if
          else 
             bytestr=bytestr+"字)"
          end if
          if pwsonchsys then
             outtext=outtext & htmlencode(rs("UserName"))
          else
             outtext=outtext & Server.HTMLEncode(rs("UserName") ) 
          end if
          outtext=outtext & " </strong><em>"+ rs("DateAndTime")+"</em> " +"<font color='darkblue'>[ID:"+cstr(rs("announceID"))+" 点击:"+cstr(rs("Hits"))+"]</font> "+bytestr+" "+chr(13)+chr(10)
          outtext=outtext & "</li>"
          rs.movenext
          response.write outtext
          outtext=""
          count=count+1
          if count> maxannounce then exit do
       loop
       outtext=outtext & "</ul>"        
       response.write outtext
   end sub

   sub showpages()
       dim n
	   response.write "<p>帖子分页 "
	   if totalAnnounce mod maxannounce=0 then
	      n= totalAnnounce \ maxannounce
	   else
	      n= totalAnnounce \ maxannounce+1
	   end if
	   dim k
	   for k=1 to n
	       if k=currentPage then
	          response.write Cstr(k) +" "
		   else
		      response.write "<a href='elist.asp?BoardID="+cstr(boardID)+"&page="+cstr(k)+"'>"+Cstr(k)+"</a> "
		   end if
	   next
	   response.write "<p>"
   end sub
%>
</body>
</html>

⌨️ 快捷键说明

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