<%@language=vbscript codepage=936 %>
<!--#include file="Conn.asp"-->
<!--#include file ="Check_Manager.asp"-->
<%
If Request.Form("cndok") Then Response.Redirect "Down_UpUrl.asp?page="&Trim(Request.Form("pp"))
Set rs=Server.CreateObject("Adodb.Recordset")
Sql="Select * From [UpDownUrl] Order By ID desc"
rs.Open Sql,Conn,1,1

dim MaxPerPage
MaxPerPage=20

Dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next

If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
%>
<script language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除此文件吗？"))
     return true;
   else
     return false;
}
</script>
<html>
<head>
<titel></titel>
<LINK href="admin/admin.css" type=text/css rel=stylesheet>
</head>
<body>
<table width="500" border="0" align="center" cellpadding="10" cellspacing="10">
  <tr>
    <td><div align="center"><strong><font color="#000000">下载文件</font>管理</strong></div></td>
  </tr>
</table>
<br>
<table width="700" border="0" align="center" cellpadding="2" cellspacing="0" class=tableBorder>
  <tr> 
    <td width="61" height="25" align="center" background="admin/admin_bg_1.gif"><strong> 
      <font color="#FFFFFF">ID</font></strong></td>
    <td width="305" height="25" align="center" background="admin/admin_bg_1.gif"><strong><font color="#FFFFFF">文件名称</font> 
      </strong></td>
    <td width="56" align="center" background="admin/admin_bg_1.gif"><strong><font color="#FFFFFF">大小(K)</font></strong></td>
    <td width="136" align="center" background="admin/admin_bg_1.gif"><strong><font color="#FFFFFF">上传时间</font></strong></td>
    <td width="120" height="25" align="center" background="admin/admin_bg_1.gif"><strong> 
      <font color="#FFFFFF">操作</font></strong></td>
  </tr>
  <%If rs.Eof or rs.Bof Then
Response.Write "<center>没有上传文件</center>"
Else
i=0
Do While Not rs.Eof
%>
  <tr> 
    <td height="22" align="center"><%=rs("ID")%></td>
    <td><a href="<%=rs("Url_Address")%>" target="_blank"><%=rs("Url_Name")%></a></td>
    <td align="center"><%=rs("Url_Size")%> </td>
    <td align="center"><%=rs("UpTime")%></td>
    <td align="center"><a href="Down_DelFile.asp?action=url&id=<%=rs("ID")%>">&nbsp;删除</a></td>
  </tr>
  <%
i=i+1 
If i >= MaxPerpage Then Exit do 
rs.MoveNext
 Loop
 End if
 %>
</table>
    </td>
  </tr>
</table>
 
<table width="700" border="0" align="center" cellpadding="2" cellspacing="2">
  <tr>
                  <td> 
                    <form name="form1" method="post" action="">
<%
Response.write "全部"
Response.write "共 </font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'> 个文件</font></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
Response.write "第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong>&nbsp;"
If currentpage > 1 Then
response.write "<a href='Down_UpUrl.asp?page="+cstr(1)+"'>首页 </a>"
Response.write "<a href='Down_UpUrl.asp?page="+Cstr(currentpage-1)+"'> 上一页 </a>"
Else
Response.write " 上一页 "
End if
If currentpage < Rs.PageCount Then
Response.write "<a href='Down_UpUrl.asp?page="+Cstr(currentPage+1)+"'> 下一页 "
Response.write "<a href='Down_UpUrl.asp?page="+Cstr(Rs.PageCount)+"'> 尾页</a>&nbsp;&nbsp;"
Else
Response.write "下一页&nbsp;&nbsp;"
End if
response.write "</td><td align='right'>"
response.write "转到：<input type='text' name='pp' size=4 maxlength=4 class=smallInput value="&Currentpage&">&nbsp;"
response.write "<input type='submit'  value='Go'  name='cndok'>&nbsp;&nbsp;"
%>
                    </form> </td>
                </tr>
              </table>
</body>
</html>
<%rs.Close
Conn.Close
%>