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

   ftype=Request.QueryString("ftype")
   years=request.cookies("nowxueqi")
   tname=request.cookies("tname")
   
   
   
'检查权限,如果是系统管理员，就显示所有的通知，否则只显示自己的通知。
 set RsPowder=Conn.Execute("select p.powderdetail  from teachers t,teacherpowder p  where t.powdergroup=p.powdergroup and tname='"&request.cookies("tname")&"' and powderdetail='系统参数'")
if  RsPowder.eof and  RsPowder.bof then
    sql="Select * from wendang where  ftype in (select vname from  varset where name='keyantype')     and  (upname ='"&tname&"') and  (years='"&years& "')   order by id desc"
else
    sql="Select * from wendang where  ftype in (select vname from  varset where name='keyantype')     order by id desc"
end if
   
   
   
Set rs=Server.CreateObject("Adodb.Recordset")

rs.open sql,conn,1,1
%>

<%
rs.pagesize=20 '每页记录条数
curpage=Request.QueryString("curpage") '将URL参数curpage传给curpage变量
rs.absolutepage=curpage '将本页设为curpage设置的页数
if curpage=0 then
   curpage=1
end if 

%>


<link rel="stylesheet" type="text/css" href="../css/style.css" />

<table width="100%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">
<tr style="background-color:#D6E4FF"  class="TableHeader">
     
      <td height="27" align="center" nowrap class="STYLE1"><span class="STYLE1">日期</span></td>
    
	  <td align="center" nowrap class="STYLE1">类别</td>
	  <td align="center" nowrap class="STYLE1"><span class="STYLE1">标题</span></td>
      <td align="center" nowrap class="STYLE1"><span class="STYLE1">操作</span></td>
  </tr>
<%
   for i= 1 to rs.pagesize
      if rs.eof then
         exit for
      end if
%>
    <tr> <td width="185" height="28" class="STYLE1"><div align="center"><%=left(rs("fdate"),9)%></div></td>
      <td width="275" class="STYLE1"><div align="center"><%=rs("ftype")%></div></td>
      <td width="288" class="STYLE1"><div align="center"><%=rs("title")%></div></td> 
	<td width="96" class="STYLE1">
	
	  <div align="center">
	 
	  <a   href= "# "   onclick= "javascript:if(confirm( '您真的要删除记录？ '))href= 'delete.asp?years=<%=years%>&curpage=<%=curpage%>&id=<%=rs("id")%>'; "> 删除 </a>
	  
	  </div></td>
    </tr>
<%  rs.movenext
    next%>
</table>
 <br>
</div>
<div align="center">
  <span class="STYLETITLE">
  <%if curpage=1 then%>
  </span><span class="STYLE1">
首页
<%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%>条记录</span><span class="STYLETITLE">)</span></div>
<p align="center">
  <input name="button" type="button" class="topanniu" onClick="location='filelist.asp?years=<%=Years%>&Ftype=<%=Ftype%>'"  value="返回" />

</p>
