 <!--#include file="SQLconn.asp"-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<title>学生的在线留言</title>
  <script charset="utf-8" src="kindeditor3/kindeditor.js"></script>
		<script>
			KE.show({
				id : 'content2',
				resizeMode : 1,
				allowPreviewEmoticons : false,
				allowUpload : false,
				items : [
				'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|', 'emoticons', 'image', 'link']
			});
		</script>
<script Language="JavaScript">

function form_check(){
var fso,f;  

if(document.form3.teacher.value.length<1){window.alert("请输入教师姓名");document.form3.teacher.focus();return (false);}
if(document.form3.content.value.length<1){window.alert("请输入留言内容");document.form3.content.focus();return (false);}

}

//-->  
</script>
		
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

 
<style type="text/css">
<!--
body {
	margin-top: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<body>
	<div align="center">
	  <%		
	     	Set MyOAASPObj = Server.CreateObject("YFSchoolOAStudentDll.Studentdll")
                MyOAASPObj.AddBBS(request.cookies("tongyibianhao")) 
            set MyOAASPObj=nothing
				
			%>
	  
    </div>
 
	
	
	
	
	<%
   Set rs=Server.CreateObject("Adodb.Recordset")
   sql="SELECT  * from studentBBS    order by id desc"
   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="97%" border="0" align="center">
      <tr>
        <td><table width="100%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">
            <tr style="background-color:#D6E4FF"  class="TableHeader">
              <td class="STYLE1"><div align="center"><span class="STYLE4">日期</span></div></td>
              <td height="27" class="STYLE1"><div align="center"><span class="STYLE4">教师</span></div></td>
              <td 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>
            </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="154" class="STYLE1"><div align="center"><span class="STYLE4"><%=rs("bumen")%></span></div></td>
              <td width="154" height="30" class="STYLE1"><span class="STYLE3">
                  <div align="center" class="STYLE4"><%=rs("Ftype")%></div></td>
              <td width="621" class="STYLE1 STYLE3"><a href="newfile.asp?id=<%=rs("id")%>"  target="_blank" class="STYLE1">&nbsp;<%=rs("title")%></a></td>
              <td width="207" class="STYLE1" ><div align="center"><%=left(rs("author"),9)%></div></td>
              <td width="209" class="STYLE1" ><div align="center"><%=formatdatetime(rs("upDatetime"),2)%></div></td>
            </tr>
            <%  rs.movenext
    next%>
        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div align="center" class="STYLE1">
            <%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>
<p>&nbsp;</p>
</body>
</html>
