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

📄 photo.asp

📁 java_blog是一个非常好的blog
💻 ASP
字号:
<%@LANGUAGE="VBScript" codepage="936"%>
<!--#include file="conn.asp"-->
<!-- #include file="bh.asp" -->
<html>
<head>
<SCRIPT language=JavaScript1.2>
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",80)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=50
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}
</SCRIPT>
<meta http-equiv="Page-Exit" content="revealTrans(Duration=1.0,Transition=<%response.write web_dim(12)%>)">
<link href="skin_1.css" rel="stylesheet" type="text/css">
<STYLE type="text/css">
.re {
	background-color: #FFFFFF;
	margin: 4px;
	padding: 4px;
	border: 1px dotted #006699;
}
</STYLE>
<title>leelin</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head> 
<body bgcolor="#FFFFFF" text="#000000"> 
<p><img src="../Images/Supplication.jpg" width="350" height="40"></p>
<table width="323" border="0" cellpadding="0">
  <tr>
    <td width="319" height="50" align=right>
       <a target="photo" href="photo.asp?f=all">全部照片</a>&nbsp;┊&nbsp;<a target="photo" href="photo.asp?f=my">我的照片</a>&nbsp;┊&nbsp;<a target="photo" href="photo.asp?f=mf">我的朋友</a>&nbsp;┊&nbsp;<a target="photo" href="photo.asp?f=desk">极品桌面</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    </td>
  </tr>
</table>
<p>
  <%
    dim rs 
    dim sql 
    msg_per_page    =    12                                                      '定义每页显示记录条数 
    set rs    =    server.createobject("adodb.recordset") 
    fenlei=Request.QueryString("f")
    select CASE fenlei
    CASE "my"
    sql ="select * from [work] where fenlei='我的照片' order by id desc"
    CASE "mf"
    sql ="select * from [work] where fenlei='我的朋友' order by id desc"
    CASE "desk"
    sql ="select * from [work] where fenlei='极品桌面' order by id desc"
    CASE ELSE
    sql ="select * from [work] order by id desc"
    end select                             
    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:500985
            rowcount        =    rs.pagesize                                    'pagesize:设置每一页的数据记录数                zhuzhu
	dim i 
            dim k 
%> 
  <%do while not rs.eof and rowcount > 0%>
</p>
<table width="2%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="10"></td>
  </tr>
</table>
<table width="560" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="559" border="0" cellspacing="0" cellpadding="10">
        <tr>
          <td width="130"><div align="center"><font color="#FFFFFF"><a href="pt.asp?id=<%=rs("id")%>" target="_blank"><img onmouseover=high(this) style="FILTER: alpha(opacity=50)" onmouseout=low(this) src=<%=rs("tubiao")%> class=xndyk width="128" height="80" border="0"  title="点击在新的窗口打开"></a></font></div></td>
          <td width="479"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="xndyk"><table width="260%" border="0" cellspacing="0" cellpadding="0">
                    <tr > 
                      <td height="19" valign="bottom" bgcolor="#FFFFFF">&nbsp;名字:<font color="#006699"><%=rs("names")%></font></td>
                    </tr>
                    <tr> 
                      <td background="images/heng-dian.gif" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="19" valign="bottom" bgcolor="#F2F2F2">&nbsp;分类:<%=rs("fenlei")%></td>
                    </tr>
                    <tr> 
                      <td background="images/heng-dian.gif" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="19" valign="bottom" bgcolor="#FFFFFF">&nbsp;人气:<font color="#FF0000"><%=rs("renqi")%></font></td>
                    </tr>
                    <tr> 
                      <td background="images/heng-dian.gif" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="20" valign="bottom" bgcolor="#F2F2F2">&nbsp;日期:<%=rs("data")%></td>
                    </tr>
                  </table></td>
              </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<p>
  <% 
                        rowcount=rowcount-1 
                        rs.MoveNext 
            loop 
        end if 
    end if 
    rs.close 
    set rs=nothing 
%>
</p>
<p> 
  </table> 
</p>
<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 + -