<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "tuzh_pri.asp"-->
<!--#include file ="../connadmin.asp"-->
<!--#include file="../page.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type=text/css>
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style>
<link rel="stylesheet" type="text/css" href="../img/css.css">
</head>
<body>
<table class="border" width="98%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr>
    <td height="565" align="center" valign="top" class="bg_low"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center" valign="middle" class="bgtop"><font color="#FFFFFF"><b>管理下载</b></font> </td>
      </tr>
    </table>
	  <%	
set rs=server.createobject("adodb.recordset") 
exec="select * from down order by id asc" 
rs.open exec,conn,1,1 
if rs.eof then
response.Write "&nbsp;暂无下载！"
else
rs.PageSize =10 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount 
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif  page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if	
%>
        <form action="do.asp?style=many&amp;action=delenews" method="post" name="myform" id="myform"  onsubmit="javascript:return checkform2();">
          <table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#ABCEDD">
            <%For i=1 To x%>
            
            <tr>
              <td width="50"><%=rs("id")%></td>
              <td width="439"><%=rs("name")%></td>
              <td width="176"><%=rs("size")%></td>
              <td width="196">&nbsp;</td>
              <td width="40"><a href="down_edit.asp?id=<%=rs("id")%>">编辑</a></td>
              <td width="60">
                <a href='down_manage.asp?act=del&id=<%=rs("id")%>'> 删除</a></td>
            </tr>
             <%rs.movenext
next
%>
                  <%
end if
%>
          </table>
          <br />
          <%'以下显示分页
 call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
rs.close
set rs=nothing
%></form>
  </td>
  </tr>
</table>
</body>
</html>
<%
if request("act")="del" then
set rs=server.createobject("adodb.recordset")
id=Request.QueryString("id")
sql="select * from down where id="&id
rs.open sql,conn,2,3
rs.delete
rs.update
Response.Write "<script>alert('刪除成功！');window.location.href='down_manage.asp';</script>" 
end if
%>