<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->

<html>
<head><title></title>
 <!--免费编辑器引用-->
   <link rel="stylesheet" href="../kindeditor3/themes/default/default.css" />
    <script charset="utf-8" src="../kindeditor3/kindeditor.js"></script>
    <script charset="utf-8" src="../kindeditor3/lang/zh_CN.js"></script>
	<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="content"]', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : false,
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', '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">

<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
<body>

<table width="100%" height="495" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="27">
	<div class="header">
	<div class="nav">
        <ul>
		    <li><a href="addfile.asp">新建作业</a></li>			
            <li><a href="ZuoYeList.asp" class="tablenemu">作业列表</a></li>			
            <li class="on">学生留言</li>
			<li><a href="XuanKe.asp">学生选课</a></li>
			<li><a href="KaoShiList.asp">在线考试</a></li>
        </ul>
    </div>	
	</td>
  </tr>

  <tr>
    <td height="470" valign="top"  class="NemuMainBox"><p>&nbsp;</p>
   
	<%
   Set rs=Server.CreateObject("Adodb.Recordset")
   sql="SELECT  * from studentBBS  where sendto='"&request.cookies("tname")&"'   order by bid desc"
   rs.open sql,conn,1,1

   rs.pagesize=3'每页记录条数
   curpage=Request.QueryString("curpage") '将URL参数curpage传给curpage变量
   rs.absolutepage=curpage '将本页设为curpage设置的页数
   if curpage=0 then
     curpage=1
   end if 
%>
	
	
	
    <table width="95%" border="0" align="center">
      <tr>
        <td><table width="100%" align="center" border="0" cellpadding="3"   cellspacing="0">

            <%
   for i= 1 to  rs.pagesize
      if rs.eof then
         exit for
      end if
%>
            <tr>
              <td width="1345" height="30" style="border-bottom:1px solid #CCCCCC;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#0099CC" class="mtdtl2">
                <tr>
                  <td><table width="100%" height="99" border="0" cellpadding="1" cellspacing="1">
                    <tr  onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
                      <td width="10%" height="42"><div align="center">
                      
						 <div align="center" class="STYLE1"><%=rs("Studentname")%> </div>						 </td>
                      <td><table width="97%" border="0" cellspacing="3" cellpadding="0">
                        <tr>
                          <td><div align="left"><%=rs("Content")%> </div></td>
                        </tr>
                      </table></td>
                      <td>
					    <div align="left" class="STYLE1"><%=rs("grade")%><%=rs("class")%></div> 
					    <div align="left" class="STYLEDATE"><%=rs("Studentdatetime")%> </div></td>
                      <td>
					  
					    <div align="center" class="STYLE1"><a   href= "# "   onclick="javascript:if(confirm('您真的要删除记录？'))href='BBSdel.asp?curpage=<%=curpage%>&bid=<%=rs("bid")%>'; ">删除</a>
					      
					      
					      
					        </div></td>
                    </tr>
                    <tr  onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
                      <td height="43"><div align="center"><span class="STYLE1">
					 
						   
					<%   if  rs("teacher")="" then%>
						  <a href="Answer.asp?curpage=<%=curpage%>&bid=<%=rs("bid")%>">回复问题</a>
						  <% else%>
						 
						   <a href="Answer.asp?curpage=<%=curpage%>&bid=<%=rs("bid")%>">修改回复</a>
						  <% end if%>  
						 
						 
						 		 
					  
					  					  
					  </span>
                              <div align="center"></div>
                      </div></td>
                      <td width="71%"><table width="97%" border="0" cellspacing="3" cellpadding="0">
                        <tr>
                          <td><div align="left">	
						  <%=rs("answer")%>
						  
						  </div></td>
                        </tr>
                      </table></td>
                      <td width="14%" class="STYLEDATE"><div align="left"><%=rs("Teacherdatetime")%></div></td>
                      <td width="5%" class="STYLEDATE"></td>
                    </tr>
                    
                  </table></td>
                </tr>
              </table>              </td>
            </tr>
            <%  rs.movenext
    next%>
        </table></td>
      </tr>
      
      <tr>
        <td>
		<%if rs.recordcount>rs.pagesize then%>
		<div align="center" class="STYLE1">
            <%if curpage=1 then%>
          首页
          <%else%>
          <a href="?curpage=1">首页</a>
          <%end if%>
          <%if curpage=1 then%>
          上一页
          <%else%>
          <a href="?curpage=<%=curpage-1%>">上一页</a>
          <%end if%>
          <%if rs.pagecount<curpage+1 then%>
          下一页
          <%else%>
          <a href="?curpage=<%=curpage+1%>">下一页</a>
          <%end if%>
          <%if rs.pagecount<curpage+1 then%>
          尾页
          <%else%>
          <a href="?curpage=<%=rs.pagecount%>">尾页</a>
          <%end if%>
          (当前第<%=curpage%>页，共有<%=rs.pagecount%>页，共有：<%=rs.recordcount%>条记录)</div>
		
		
		  <%end if%>
		  
		  </td>
      </tr>
    </table>	</td>
  </tr>
</table>
</body>
</html>
