⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editlist.asp

📁 超简单的下载系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")<>"ah" then
response.write "对不起!你的权限不够.<a href='login.asp'>请登录</a>后再操作"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type="text/css">
<!--
BODY{ font-family:"宋体"; font-size: 12px;
scrollbar-face-color:ffffff;
scrollbar-shadow-color:C1C1BB;
scrollbar-highlight-color:C1C1BB;
scrollbar-3dlight-color:EBEBE4;
scrollbar-darkshadow-color:EBEBE4;
scrollbar-track-color:F4F4F0;
scrollbar-arrow-color:CACAB7;
}
p, input, font, select, option, textarea, form { font-family:"宋体"; font-size: 12px }
td { table-layout:fixed;word-break :break-all; font-family:"宋体"; font-size: 12px}
a:link {
	font-family: "宋体";
	font-style: normal;
	line-height: normal;
	text-decoration: none;
	color: #333333;
}
a:visited {
	font-family: "宋体";
	font-style: normal;
	color: #000000;
	text-decoration: none;
}
a:hover {
	font-family: "宋体";
	font-style: normal;
	color: #CC66FF;
	text-decoration: none;
}
a:active {
	font-family: "宋体";
	font-style: normal;
	color: #FF9999;
	text-decoration: none;
}
.style4 {color: #FFFFFF}
.style6 {color: #FF0000}

-->
</style>

<title>修改删除软件</title>
</head>
<%Const MaxPerPage=10%>
<%
	dim rs,sql
   	dim totalPut   
   	dim CurrentPage, TotalPages
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if
  	set rs = server.createobject("adodb.recordset")
%>
<body bgcolor="#008080" topmargin="0" leftmargin="0">

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#B3B3B3">
    <tr>
      <td width="100%"> </td>
    <tr>
      <td width="100%">
        <div align="center">
          <center>
          <table border="0" cellpadding="0" cellspacing="0" width="590" height="17">
            <tr>
              <td width="152" height="17">
                <p align="center"><font size="2">编&nbsp;&nbsp; 号</font></td>
              <td width="301" height="17">
                <p align="center"><font size="2">编&nbsp; 辑&nbsp; 软&nbsp; 
                件</font></td>
              <td width="136" height="17">
                <p align="center"><font size="2">删&nbsp; 除</font></td>
            </tr>
            <tr>
              <td width="589" height="17" colspan="3">
                <hr style="border-style: dotted; border-color: #008080">
              </td>
            </tr>
          </table>
          </center>
        </div>
      </td>
  </center>
    <tr>
      <td width="100%">
<% 
	sql="select * from download order by downtime desc"
	rs.open sql,conn,1,1 
  	if rs.eof and rs.bof then 
       		response.write "<p align='center'>没有或没有找到任何软件</p>" 
   	else 
      		totalPut=rs.recordcount 
      		if currentpage<1 then 
          		currentpage=1 
      		end if 

      		if (currentpage-1)*MaxPerPage>totalput then 
	   		if (totalPut mod MaxPerPage)=0 then 
	     			currentpage= totalPut \ MaxPerPage 
	   		else 
	      			currentpage= totalPut \ MaxPerPage + 1 
	   		end if 
      		end if 
       		if currentPage=1 then 
            		showContent 
            		showpage totalput,MaxPerPage,"editlist.asp" 
       		else 
          		if (currentPage-1)*MaxPerPage<totalPut then 
            			rs.move  (currentPage-1)*MaxPerPage 
            			showContent 
             			showpage totalput,MaxPerPage,"editlist.asp" 
        		else 
	        		currentPage=1 
           			showContent 
           			showpage totalput,MaxPerPage,"editlist.asp" 
	      		end if 
	   	end if 
   	rs.close 
   	end if 
	         sub showContent 
       	dim i 
	   	i=0 
	do while not rs.eof
%>
        <div align="center">
          <table border="0" cellpadding="0" cellspacing="0" width="590">
            <tr>
              <td width="152">
                <p align="center"><%=i+1%></td>
  <center>
  <center>
  <td width="299">
    <p align="center"><a href=editsoft.asp?id=<%=rs("id")%>><%=rs("downname")%></a></td>
  <td width="136">
    <p align="center"><a href=delsoft.asp?id=<%=rs("id")%>>删除</a></td>
  </tr>
  <tr>
    <td width="588" colspan="3">
      <hr style="border-style: dotted; border-color: #008080">
    </td>
  </tr>
              </table>
            </center>
          </div>
<% 
	i=i+1
	if i>=MaxPerPage then exit do
	rs.movenext 
	loop 
end sub
%>

        </td>
    <tr>
      <td width="100%"><%
function showpage(totalnumber,maxperpage,filename)
  dim n
  if totalnumber mod maxperpage=0 then
     n= totalnumber \ maxperpage
  else
     n= totalnumber \ maxperpage+1
  end if
  response.write "<p align='center'>"
  if CurrentPage<2 then
    response.write "<font color='#000080'>首页 | 上一页</font> | "
  else
    response.write "<a href="&filename&"?page=1>首页</a> | "
    response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a> | "
  end if
  if n-currentpage<1 then
    response.write "<font color='#000080'>下一页 | 尾页</font>"
  else
    response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
    response.write "下一页</a> | <a href="&filename&"?page="&n&">尾页</a>"
  end if
   response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
    response.write "<font color='#000080'>&nbsp;共<b>"&totalnumber&"</b>个软件 <b>"&maxperpage&"</b>软件/页</font>"
%>
        <%     
end function

   	set rs=nothing   
	conn.close
	set conn=nothing
%></td>
    <tr>
      <td width="100%"> </td>
  </table>
  </center>
</div>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -