<!--#include file="../checkLogin.asp"-->
<!--#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="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
<style type="text/css">
<!--
.STYLE3 {color: #990033}
-->
</style>
<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" target="_self">添加常用文件</a></li>
			<li class="on">常用文件管理</li>
        </ul>
    </div>	
	</td>
  </tr>
  

  <tr>
   <td height="470" valign="top"   class="NemuMainBox">
	 <br>
	  <%'检查权限
'检查权限
       tname=request.cookies("tname")
       Set MyOAASPObj = Server.CreateObject("YFSchoolOApro.YFSchoolDll")
           if MyOAASPObj.QuanXian(tname,"信息管理")=0 then 
		    response.redirect  "../NoPower.asp"
           end if 
		   set MyOAASPObj=nothing
'检查权限结束
'检查权限结束



   ftype=Request.QueryString("ftype")
   years=request.cookies("nowxueqi")
  
   
Set rs=Server.CreateObject("Adodb.Recordset")
sql="SELECT * from changguifile  order by id desc"
rs.open sql,conn,1,1
%>

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

%>


 
 
<table width="95%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  style="border-collapse:collapse"  class="mtable">
<tr style="background-color:#D6E4FF"  class="TableHeader">
     
      <td height="30" align="center" nowrap class="STYLE1">学期</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="260" height="30" class="STYLE1"><div align="center"><%=rs("years")%></div></td>
      <td width="222" class="STYLE1"><div align="center"><%=rs("ftype")%></div></td>
      <td width="504" class="STYLE1"><div align="center"><a href="newfile.asp?id=<%=rs("id")%>"  target="_blank" class="STYLE1"><%=rs("filename")%></a></div></td> 
	<td width="211" class="STYLE1">
	
	  <div align="center">
 
	  <a   href= "# "   onclick= "javascript:if(confirm( '您真的要删除记录？ '))href= 'delete.asp?curpage=<%=curpage%>&id=<%=rs("id")%>'; "> 删除 </a>	  </div></td>
    </tr>
<%  rs.movenext
    next%>
</table>
  
  <br>
 
<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">&nbsp;</p>    </td>
  </tr>
</table>
</body>
</html>
