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

📄 index.asp

📁 结合了某度和AH的个人主页 功能比较完整
💻 ASP
字号:
<!--#include file="conn.asp"-->
<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">
<title>软件下载</title>
<style type="text/css">
<!--
.unnamed1 {
	width: 18px;
}
.unnamed2 {
	width: 613px;
}
-->
</style>
</head>
<!--#include file="head.asp"-->
<%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 background="../img/dnacebg2.jpg" link="#0000FF" vlink="#FFFFFF" leftmargin="0" topmargin="0">

<div align="center">
  <center>
  <table width="616" border="0" cellpadding="0" cellspacing="0"  background="" bgcolor="#EDCEA2" class="unnamed2" >
    <tr>
      <td width="17" class="unnamed1">&nbsp;        </td>
      <td width="560" height="200"><table width="600" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="560" align="center"><% 
	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,"index.asp" 
       		else 
          		if (currentPage-1)*MaxPerPage<totalPut then 
            			rs.move  (currentPage-1)*MaxPerPage 
            			showContent 
             			showpage totalput,MaxPerPage,"index.asp" 
        		else 
	        		currentPage=1 
           			showContent 
           			showpage totalput,MaxPerPage,"index.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="1" cellpadding="0" cellspacing="0" width="560" style='border-collapse:collapse' bordercolor=#111111>
                  <tr bgcolor="#632F1A">
                    <td width="560" colspan="4" height="20" valign="bottom"><font size="2" color="#FFFFFF"><b><a href="show.asp?id=<%=rs("id")%>" target="_blank"><%=rs("downname")%></a></b></font></td>
                  </tr>
                  <tr bgcolor="#B58966">
                    <td width="23%" height="18" valign="bottom"><p align="left"><font size="2">添加时间:</font></td>
                    <td width="23%" height="18" valign="bottom"><%=rs("downtime")%></td>
                    <td width="23%" height="18" valign="bottom"><font size="2">推荐等级:</font></td>
                    <td width="23%" height="18" valign="bottom"><img src="images/<%=rs("downtjian")%>stars.gif">&nbsp;&nbsp;点击:<%=rs("downhits")%></td>
                  </tr>
                  <tr bgcolor="#B58966">
                    <td width="560" colspan="4">简介<br>
                        <%
downjjie=rs("downjjie")
if len(downjjie)>50 then
downjjie=left(downjjie,50) & "......"
response.write downjjie
else
response.write downjjie
end if
%>
                    </td>
                  </tr>
                </table>
              </div>
              <p>
                <% 
	i=i+1
	if i>=MaxPerPage then exit do
	rs.movenext 
	loop 
end sub
%>
              </td>
        </tr>
        <tr>
          <td width="560"><%
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
%></td>
        </tr>
        <tr>
          <td width="560"><p align="center"> </td>
        </tr>
        <%

   	set rs=nothing   
	conn.close
	set conn=nothing
%>
        <tr>
          <td width="560"><hr style="border-style: dotted; border-color: #008080">
          </td>
        </tr>
        <tr>
          <td width="560"><p align="center">      
              <form method="post" action="search.asp">
                <input type="text" name="keyword" size="20" style="background-color: #FFFFFF; border-style: dotted; border-color: #000000">
                <input type="submit" name="submit" value="搜索">
            </form></td>
        </tr>
      </table></td>
      <td width="17" class="unnamed1">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3">&nbsp;</td>
    </tr>
  </table>
  </center>
</div>
</body>

</html>

⌨️ 快捷键说明

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