
<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<html>
<head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
<body>
<% if request.cookies("tname")="" then
        response.redirect("../Index.asp")
     end if
    %>
<%


   imgdir=request.cookies("imgdir") 
   BBStype=request("BBStype")
   Set rs=Server.CreateObject("Adodb.Recordset")
   if BBStype="" then
       sql="select * from bbszhuti where bclass='教师'  and  btype like '%'  order by  ontop  desc,bid desc"
	else
	   sql="select * from bbszhuti where bclass='教师'  and  btype ='"&BBStype&"'  order by  ontop  desc,bid desc"
	end if
   rs.open sql,conn,1,1

   rs.pagesize=15'每页记录条数
   curpage=Request.QueryString("curpage") '将URL参数curpage传给curpage变量
   rs.absolutepage=curpage '将本页设为curpage设置的页数
   if curpage=0 then
     curpage=1
   end if 
%>
 
<table width="100%" border="0" align="center">
  
  <tr>
    <td>
	<table width="100%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8" style="border-collapse:collapse"  class="mtable">   
     <tr style="background-color:#D6E4FF"  class="TableHeader">
       <td height="30" class="STYLE1"><div align="center" class="STYLE4">讨论主题</div></td>
        <td class="STYLE1" ><div align="center">类别</div></td>
        <td class="STYLE1" ><div align="center">点击/回复</div></td>
        <td class="STYLE1" ><div align="center">发布人</div></td>
        <td class="STYLE1" ><div align="center">发布日期</div></td>
      </tr>
      <%
   for i= 1 to  rs.pagesize
      if rs.eof then
         exit for
      end if
%>
     
      <tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
        <td width="621" height="30" class="STYLE1 STYLE3">
		&nbsp;
		<%
		if rs("ontop")="顶置" then   %>
                <img src="../images/<%=request.cookies("imgdir")%>/ding.gif" width="15" height="13">
          <%end if  %>
		<a href="openbbs.asp?bid=<%=rs("bid")%>"  target="_blank" class="STYLE1">
		
		&nbsp;<%=rs("title")%></a></td>
        <td width="100" class="STYLE1" ><div align="center"><%=rs("btype")%></div></td>
        <td width="100" class="STYLE1" ><div align="center"><%=rs("hits")%> / <%=rs("answer")%></div></td>
        <td width="100" class="STYLE1" ><div align="center"><%=left(rs("Author"),9)%></div></td>
        <td width="100" class="STYLE1" ><div align="center"><%=formatdatetime(rs("updatetime"),2)%></div></td>
      </tr>
      <%  rs.movenext
    next%>
    </table></td>
  </tr>
  
  <tr>
    <td><div align="center" class="STYLE1">
      <br>
     
      <%if curpage=1 then%>
      首页
      <%else%>
      <a href="?bumen=<%=bumen%>&Ftype=<%=Ftype%>&curpage=1">首页</a>
      <%end if%>
      <%if curpage=1 then%>
      上一页
      <%else%>
      <a href="?bumen=<%=bumen%>&Ftype=<%=Ftype%>&curpage=<%=curpage-1%>">上一页</a>
      <%end if%>
      <%if rs.pagecount<curpage+1 then%>
      下一页
      <%else%>
      <a href="?bumen=<%=bumen%>&Ftype=<%=Ftype%>&curpage=<%=curpage+1%>">下一页</a>
      <%end if%>
      <%if rs.pagecount<curpage+1 then%>
      尾页
      <%else%>
      <a href="?bumen=<%=bumen%>&Ftype=<%=Ftype%>&curpage=<%=rs.pagecount%>">尾页</a>
      <%end if%>
  (当前第<%=curpage%>页，共有<%=rs.pagecount%>页，共有：<%=rs.recordcount%>条记录)</div></td>
  </tr>
</table>


  </body>
</html>
