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

📄 link.asp

📁 java_blog是一个非常好的blog
💻 ASP
字号:
<%@LANGUAGE="VBScript" codepage="936"%>
<!--#include file="conn.asp"-->
<html>
<head>
<link href="skin_1.css" rel="stylesheet" type="text/css">
<meta http-equiv="Page-Exit" content="revealTrans(Duration=1.0,Transition=12)">
<STYLE type="text/css">
body {
scrollbar-face-color: #EFEFEF;
scrollbar-shadow-color: #999999;
scrollbar-highlight-color: #999999;
scrollbar-3dlight-color: #FFFFFF;
scrollbar-darkshadow-color: #FFFFFF; 
scrollbar-track-color: #FFFFFF;
scrollbar-arrow-color: #999999;
}
.re {
	background-color: #FFFFFF;
	margin: 4px;
	padding: 4px;
	border: 1px dotted #006699;
}
</STYLE>
<title>DenReakun</title>
<link href="style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.jianjie {
	background-color: #FAFAFA;
	margin: 3px;
	padding: 3px;
	border: 1px dotted #CCCCCC;
}
-->
</style>
</head> 
<body bgcolor="#FFFFFF" text="#000000">
<p><img src="../Images/Favorite.jpg" alt="1" width="350" height="40"></p>
<p>
  <% 
'**********************************************************
' zhuzhu 1.0 Free        Power by zgrq.com
' Email:ringsbot@163.com       OICQ:500985
' 网站: http://www.zgrq.com   演示:http://www.zgrq.com
'**********************************************************
    dim rs 
    dim sql 
    msg_per_page    =    12                                                        '定义每页显示记录条数 
    set rs    =    server.createobject("adodb.recordset") 
    sql = "select * from link order by id desc"                                      'RanRan 
    rs.cursorlocation    =    3                                                    '使用客户端游标,可以使效率提高 
     
    rs.pagesize    =    msg_per_page                                                'http://www.zgrq.com 
    rs.open sql,conn,0,1                                                         

    if err.number<>0 then                                                        '错误处理 
        response.write "数据库操作失败:" & err.description 
        err.clear 
    else 
        if not (rs.eof and rs.bof) then                                            '检测记录集是否为空 
            totalrec    =    RS.RecordCount                                        'totalrec:总记录条数 
            if rs.recordcount mod msg_per_page    =    0 then                        '计算总页数,recordcount:数据的总记录数 
                n    =    rs.recordcount\msg_per_page                                'n:总页数 
            else                                                                 
                n    =    rs.recordcount\msg_per_page+1                         
            end if                                                                 

            currentpage    =    request("page")                                        'http://www.zgrq.com 
	 If currentpage <> "" then 
                currentpage =  cint(currentpage) 
                if currentpage < 1 then   
                    currentpage = 1 
                end if   
                if err.number <> 0 then  
                    err.clear 
                    currentpage    =    1 
                end if 
            else 
                currentpage = 1 
            End if                                                                 
            if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then  
                currentPage=1 
            end if 
            rs.absolutepage    =    currentpage                                    'absolutepage:设置指针指向某页开头                QQ:1019257
	 
            rowcount        =    rs.pagesize                                    'pagesize:设置每一页的数据记录数                茫然
	dim i 
            dim k 
%>
  <%do while not rs.eof and rowcount > 0%>
</p>
<table width="560" border="0" cellspacing="10">
  <tr> 
    <td width="91"><span class="text1" style="font-weight: bold"><a href="<%=rs("web")%>" target="_blank"><img src="<%=rs("logo")%>" border="0" alt="<%=rs("title")%>" width="88" height="31"></a></span></td>
    <td width="211">&nbsp;站名:<font color="#006699"><%=rs("title")%></font><br>
      <div class="jianjie">简介:<%=rs("jianjie")%> </div></td>
  </tr>
  <tr >
    <td colspan="2" height="1" background="images/heng-dian.gif"></td>
  </tr>
</table>
<% 
                        rowcount=rowcount-1 
                        rs.MoveNext 
            loop 
        end if 
    end if 
    rs.close 
    set rs=nothing 
%></table>
<table border="0" align=right> 
  <tr> 
    <td  valign="middle" align=right>  
      <%call listPages()%> 
    </td> 
  </tr> 
</table> 
</body> 
</html> 
<% 
    sub listPages()                                                                 
      'if n <= 1 then exit sub                                              
            for i=0 to n\msg_per_page-1  
                for j=1 to msg_per_page  
%>  
                    <font size="2" color="#006600"> 
                    <a href="<%=request.ServerVariables("script_name")%>?page=<%=i*msg_per_page+j %>">
[<% =i*msg_per_page+j %>]</a></font> 
         <%      
                next  
            next 
            EndPage = n mod msg_per_page  
            for j=1 to EndPage  
         %>  
                <font size="2" color="#006600"> 
                <a href="<%=request.ServerVariables("script_name")%>?page=<% =i*msg_per_page+j %>">
<%if (i*msg_per_page+j)=currentpage then%><b><%else%><%end if%>[<% =i*msg_per_page+j %>]</b></a></font> 
          <%next%> 
          <font color=black face="arial" > 
          &nbsp;<br>当前页:<font color=#FF000000><%=currentpage%>/<%=n%></font> 链接总数:<font color=#FF000000><%=totalrec%></font>&nbsp;条
 </font>每页显示:<font color=#FF000000>12</font><font color=black face="arial" >&nbsp;</font>条&nbsp;
          <%end sub%>

⌨️ 快捷键说明

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