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

📄 zlxz.asp

📁 为中小型企业与欲创业的个人提供一个合适的企业型网站
💻 ASP
字号:
<!--#include file="top.asp"-->
<%
    page_count = 20
    MaxPerPage=page_count '分页显示的纪录个数
    dim sql 
    dim rs
    dim gstBookID
    dim totalPut 
    dim CurrentPage
    dim TotalPages
    dim i,j 
%>
<table width="800" height="403" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="Table_01">
	<tr>
	  <td height="403" colspan="2" valign="top" background="images/right_06.gif"><!--#include file="Tyi86_Left_Other.asp" --></td>
		<td width="800" align="right" valign="top" background="images/t_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center"><img src="images/zlxz.gif" width="580" height="33" alt=""></td>
          </tr>
          <tr>
		  <%
	dim founderr
    founderr=false	  
    sql="select * from soft ORDER BY soft_id DESC"
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize=MaxPerPage 
    If trim(Request("Page"))<>"" and IsNumeric(Request("Page")) then
	CurrentPage= CLng(request("Page")) 
	If CurrentPage< 1 then
		CurrentPage= 1 
	ElseIf CurrentPage> rs.PageCount then 
		CurrentPage = rs.PageCount 
	End If 
    Else 
	CurrentPage= 1 
    End If 
    if rs.eof then 
	response.write "<p align='center'>还没有添加下载...</p>" 
    else 
	totalPut=rs.recordcount '记录总数 
	if CurrentPage=1 then 
		showContent  
		showpages
	else 
		if (currentPage-1)*MaxPerPage<totalPut then 
			rs.move(currentPage-1)*MaxPerPage 
			dim bookmark 
			bookmark=rs.bookmark '移动到开始显示的记录位置 
			showContent 
			showpages 
		else 
			currentPage=1 
			showContent 
		end if
	end if 
	rs.close 
    end if 
    set rs=nothing 
    set conn=nothing 
    sub showContent
%>
            <td height="373" align="center" valign="top" background="images/t_05.gif">
			<%
    dim i 
    i=0 
    do while not (rs.eof or err)
%>
			<table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                      <td width="6%" height="19" align="center" background="images/22.gif"><img src="images/tb.gif" width="6" height="6"></td>
                      <td width="51%" background="images/22.gif"><a href='xz.asp?soft_id=<%=rs("soft_id")%>' target='_blank' Title='<%=rs("soft_name")%>'><% if Getlen(rs("soft_name"))>48 then%>
<%=LeftStr(rs("soft_name"),45)%>... 
<%else%>
<%response.write rs("soft_name")%>
<%end if%></a></td>
                <td width="43%" background="images/22.gif"><font color="#808080"><%=rs("soft_joindate")%> | 大小:<%=rs("soft_size")%> |   下载:<%=rs("soft_dcount")%></font></td>
              </tr>
                  </table>
				<%
    i=i+1
    if i>=MaxPerPage then exit do
    rs.movenext 
    loop
%>
              <%end sub%>
<%sub showpages()%>  
              <table width="98%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="19" align="right" bgcolor="#F5F6F6"><% 
    dim n,k 
    if (totalPut mod MaxPerPage)=0 then
    n= totalPut \ MaxPerPage
    else
    n= totalPut \ MaxPerPage + 1
    end if
%>
                            共有<%=rs.recordcount%>个下载 &nbsp;每页<%=Page_count%>个下载
<%
    k=currentPage
    if k=1 then
	response.write " 首页 "& vbCrLf
	response.write " 上一页 "& vbCrLf
    end if
    if k<>1 then
	response.write "<a href='Zlxz.asp?page=1'> 首页 </a>"
	response.write "<a href='Zlxz.asp?page="+cstr(k-1)+"'> 上一页 </a>"
    end if
    if k=n then
	response.write " 下一页 "& vbCrLf
	response.write " 末页&nbsp;&nbsp;&nbsp;&nbsp;"& vbCrLf
    end if
    if k<>n then
	response.write "<a href='Zlxz.asp?page="+cstr(k+1)+"'> 下一页 </a>"
	response.write "<a href='Zlxz.asp?page="+cstr(n)+"'> 末页 </a>&nbsp;&nbsp;&nbsp;&nbsp;"
    end if
%></td>
                </tr>
              </table></td><% end sub %>
          </tr>
        </table></td>
	</tr>
</table>
<!--#include file="end.asp"-->
</body>
</html>

⌨️ 快捷键说明

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