<!--#include file="conn.asp"-->
<!--#include file="inc/CHAR.asp"-->
<!--#include file="forum_css.asp"-->
 
<% 
sub endConnection()
conn.close
set conn=nothing
end sub

function changechr(str) 
changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ") 
end function

function online()
tmprs=conn.execute("Select count(id) from online") 
online=tmprs(0) 
set tmprs=nothing 
if isnull(online) then online=0
end function 
function gettipnum() 
dim tmprs 
tmprs=conn.execute("Select Count(announceID) from bbs1") 
gettipnum=tmprs(0) 
set tmprs=nothing 
if isnull(gettipnum) then gettipnum=0 
end function 

function allusers() 
dim tmprs 
tmprs=conn.execute("Select count(userid) from [user]") 
allusers=tmprs(0) 
set tmprs=nothing 
if isnull(allusers) then allusers=0 
end function 
%>

<!--#include file="inc/const.asp"-->
<%
	call main()
	sub main()
%>
<head>
</head>
  <body bgcolor="#F0F9FE">

  </center>                                        
   
	<div style="position: absolute; width: 363px; height: 100px; z-index: 1; left: 0px; top: 6px; float: left" id="layer1">
  <table border="0" align=center width="97%" cellspacing="0" cellpadding="0" id="table1"     >
    <tr>
      <td bgcolor="#8c5900" width="99%" height=1 style="border: 1px solid #FFFFFF"  >
		<p align="left"></td>
    </tr>
	
  <%                        

sql="SELECT top "&TopUserNum&" board.boardtype,bbs1.username,bbs1.dateandtime,bbs1.topic,bbs1.expression,bbs1.announceid,bbs1.boardid,bbs1.rootid,bbs1.hits FROM bbs1,board where board.boardid=bbs1.boardid ORDER BY bbs1.hits DESC"                         
set rs=server.createobject("adodb.recordset")                        
rs.open sql,conn,1,1                         
%>                        
<%do while Not RS.Eof%> 

    <tr height=20>      
      
	  <td width="99%" style="border: 1px solid #FFFFFF">                      
  <p align="left">   
      <font style=line-height:120%>
		<a href=dispbbs.asp?boardid=<%=rs("boardid")%>&RootID=<%=cstr(rs("RootID"))%>&ID=<%=Cstr(rs("announceID"))%> target=_blank title="<%=changechr(rs("topic"))%> [×÷Õß£º<%=changechr(rs("username"))%>]"><p align="left">                       
              <%if rs("topic")<>"" then%><font color="#3399FF">                      
              <%if len(changechr(rs("topic")))>16 then%>                      
               <%=left(changechr(rs("Topic")),32)%>...</font>                                      
              <%else%>                                     
             <%=changechr(rs("topic"))%>                                       
              <%end if%><%end if%>                                    
 </a>    
</font>   
      </td> 
    </tr>     
	<tr>
      <td bgcolor="#8c5900" width="99%" height=1  ></td>
    </tr>
<%                                   
RS.MoveNext                                   
Loop                                   
rs.close                                  
%>                                  
                       
<%end sub%>                     
       
  </table>                        
  </div>
                                        
   
