<!--#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="../css/style.css" />

<style type="text/css">
<!--
.STYLE2 {color: #000000}
-->
</style>
<body>
<table width="99%" height="500" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="33">
	<table width="100%" height="28" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td class="NemuNot"  height="33" width="100"  ><div    align="center"><a href="addfile.asp">新建作业</a></div></td>
        <td class="Nemuselect"  width="100"><div    align="center">作业列表</div></td>
        <td class="NemuNot" width="100" ><div     align="center"><a href="StudentBBS.asp">学生留言</a></div></td>
        <td class="NemuLine" >&nbsp;</td>
      </tr>
    </table>
	</td>
  </tr>
  <tr>
    <td valign="top" class="NemuMainBox">
	<FORM ACTION="manage.asp" METHOD="GET" enctype="multipart/form-data" NAME="form1">
      <script>

<!--打开公告-->
function open_notify(NOTIFY_ID,FORMAT)
{
 URL="openFile.asp?id="+NOTIFY_ID;
 myleft=(screen.availWidth-700)/2;
 myleft=80;
 mytop=80
 mywidth=(screen.availWidth-160);
 myheight=(screen.availHeight-120);
 if(FORMAT=="1")
 {
    myleft=0;
    mytop=0
    mywidth=screen.availWidth-10;
    myheight=screen.availHeight-40;
 }
 window.open(URL,'_blank',"height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
    </script>
      <%
 
tname=request.cookies("tname")

 



'检查权限,如果是系统管理员，就显示所有的通知，否则只显示自己的通知。
  
  sql="Select * from zuoyebuzhi where    教师='"&tname&"' order by   id  desc"
  Set rs=Server.CreateObject("Adodb.Recordset")
  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 

%>
      <br>
      <table width="98%" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">
        <tr style="background-color:#D6E4FF"  class="TableHeader">
          <td align="center" nowrap class="STYLE1">教师</td>
          <td height="27" align="center" nowrap class="STYLE1">时间</td>
          <td align="center" nowrap class="STYLE1">科目</td>
          <td align="center" nowrap class="STYLE1">标题<%=fid%></td>
          <td align="center" nowrap class="STYLE1">作业管理</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="123" class="STYLE1"><div align="center"><%=rs("教师")%></div></td>
          <td width="123" height="28" class="STYLE1"><div align="center"><%=left(rs("时间"),9)%></div></td>
          <td width="78" class="STYLE1"><div align="center"><%=left(rs("科目"),9)%></div></td>
          <td width="630" class="STYLE1"><%=rs("标题")%></td>
          <td width="366" class="STYLE1"><div align="center"> <a href="fujian.asp?curpage=<%=curpage%>&fid=<%=rs("id")%>"  target="_self" class="STYLE1">附件管理</a>&nbsp;&nbsp; <a href="setpMyClass.asp?curpage=<%=curpage%>&fid=<%=rs("id")%>"  target="_self" class="STYLE1">学生作业</a>&nbsp;&nbsp; <a   href= "# "   onclick= "javascript:if(confirm( '您真的要删除记录？ '))href= 'delete.asp?ftype=<%=ftype%>&curpage=<%=curpage%>&fid=<%=rs("id")%>'; "> 删除</a></div></td>
        </tr>
        <%  rs.movenext
    next%>
      </table>
      <p><br>
      </p>
      <div>
        <div align="center"></div>
      </div>
      <div align="center" class="STYLE1">
        <%if curpage=1 then%>
        首页
        <%else%>
        <a href="?ftype=<%=ftype%>&curpage=1">首页</a>
        <%end if%>
        <%if curpage=1 then%>
        上一页
        <%else%>
        <a href="?ftype=<%=ftype%>&curpage=<%=curpage-1%>">上一页</a>
        <%end if%>
        <%if rs.pagecount<curpage+1 then%>
        下一页
        <%else%>
        <a href="?ftype=<%=ftype%>&curpage=<%=curpage+1%>">下一页</a>
        <%end if%>
        <%if rs.pagecount<curpage+1 then%>
        尾页
        <%else%>
        <a href="?ftype=<%=ftype%>&curpage=<%=rs.pagecount%>">尾页</a>
        <%end if%>
        <span class="STYLE2">(当前第<%=curpage%>页，共有<%=rs.pagecount%>页，共有：<%=rs.recordcount%>条记录)</span></div>
    </FORM></td>
  </tr>
</table>
</body>
</html>
