<!--#include file="../checkLogin.asp"-->
 <!--#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 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">

 
<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  where tongyibianhao='"&request.cookies("tongyibianhao")&"'  order by bid desc"
   rs.open sql,conn,1,1

   rs.pagesize=5'每页记录条数
   curpage=Request.QueryString("curpage") '将URL参数curpage传给curpage变量
   rs.absolutepage=curpage '将本页设为curpage设置的页数
   if curpage=0 then
     curpage=1
   end if 
%>
	
	
	<table width="100%" border="1" align="center" cellpadding="20" cellspacing="0" bgcolor="#F7FCFF" style="border-collapse:collapse">
      	<tr>  
       <td>
    <table width="100%" 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"><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="13%" height="42"><div align="center"><span class="STYLE1">你的咨询: </span>
                              <div align="center"></div>
                      </div></td>
                      <td width="75%"><table width="97%" border="0" cellspacing="3" cellpadding="0">
                        <tr>
                          <td><div align="left"><%=rs("Content")%> </div></td>
                        </tr>
                      </table></td>
                      <td width="13%" class="STYLEDATE"><%=rs("Studentdatetime")%> </td>
                    </tr>
                    <tr  onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
                      <td height="43"><div align="center"><span class="STYLE1">教师回复: </span>
                              <div align="center"></div>
                      </div></td>
                      <td><table width="97%" border="0" cellspacing="3" cellpadding="0">
                        <tr>
                          <td><div align="left"><%=rs("answer")%> </div></td>
                        </tr>
                      </table></td>
                      <td class="STYLEDATE"><div align="left"></div>
                        <div align="left" class="STYLE1">教师：<%=rs("Sendto")%></div>
                        <div align="left"><%=rs("Teacherdatetime")%></div></td>
                    </tr>
                    
                  </table></td>
                </tr>
              </table>
              <br></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="?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></td>
      </tr>
    </table>
	</td>
                </tr>
              </table>
<p>&nbsp;</p>
</body>
</html>
