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

📄 photo_body.asp

📁 不错的asp论坛,大家可以看看啊和呵呵.
💻 ASP
字号:
<%sub photo_body()%>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="right"> 
      <%sql="select * from phcat"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
if request.querystring("phcat_id")<>Cstr(rs("phcat_id")) then%>
      &nbsp;<img src=img/none.gif border=0><img src=img/link2.gif border='0'>&nbsp;<a href="photo.asp?phcat_id=<%=rs("phcat_id")%>"><%=rs("phcat_name")%></a> 
      <%else%>   
      <font color="#ff6600"><%=rs("phcat_name")%></font>    
      <%end if   
rs.movenext
loop
if rs.eof and rs.bof then%>
      当前还没有照片分类    
      <%end if
dim totalcs,Currentpage,totalpages,i
sql="select * from photo order by ph_id DESC"
if request.querystring("phcat_id")<>"" then
sql="select * from photo where phcat_id="&request.querystring("phcat_id")&" order by ph_id DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalcs=rs.recordcount%>
      &nbsp;</td>   
  </tr>
</table>
<table width="760" height="351" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="556" valign="top"> 
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="553" valign="top"> 
            <%call br%>
            <table width='530' height="25" border='0' align="center" cellspacing='0' background="img/mainbg.gif" cellpadding="2">
              <tr> 
                <td>&nbsp;&nbsp;<img src="img/biao.gif" align="absmiddle">&nbsp;当前共有<span><%=totalcs%></span>张照片</td>
              </tr>
            </table> 
           
            <table width="100%" height="122" border="0" cellpadding="0" cellspacing="0">
              <tr> 
			   <%
if not rs.eof then

rs.movefirst
rs.pagesize=picperpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   end if
else
   currentpage=1
end if
   totalcs=rs.recordcount
   if currentpage<>1 then
       if (currentpage-1)*picperpage<totalcs then
	       rs.move(currentpage-1)*picperpage
		   dim bookmark
		   bookmark=rs.bookmark
	   end if
   end if
   if (totalcs mod picperpage)=0 then
      totalpages=totalcs\picperpage
   else
      totalpages=totalcs\picperpage+1
   end if
i=0
do while not rs.eof and i<picperpage
%>
                <td> <table border='0' cellpadding='0' cellspacing='5'>
                    <tr> 
                      <td align='center' width='135'><table width="100%" border='0' align='center' cellpadding='0' cellspacing='0'>
                          <tr> 
                            <td height='10'><img src='img/bg_0ltop.gif' width='10' height='10'></td>
                            <td height='10' background='img/bg_01.gif'></td>
                            <td height='10'><img src='img/bg_0rtop.gif' width='10' height='10'></td>
                          </tr>
                          <tr> 
                            <td width=10 background=img/bg_03.gif> </td>
                            <td align='center' valign='middle' bgcolor='#000000'> 
                              <a href="javascript:photo('rephoto.asp?ph_id=<%=rs("ph_id")%>')"> 
                              <img src="<%=rs("ph_pic")%>" width="100" height="125" border="0" title="图片名称:<%=rs("ph_name")%><br>上传时间:<%=rs("ph_date")%><br>点击次数:<%=rs("ph_count")%>次"></a> 
                            </td>
                            <td width='10' background='img/bg_04.gif'> </td>
                          </tr>
                          <tr> 
                            <td height='10'><img src='img/bg_0lbottom.gif' width='10' height='10'></td>
                            <td height='10' background='img/bg_02.gif'></td>
                            <td height='10'><img src='img/bg_0rbottom.gif' width='10' height='10'></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table>
                  
                </td> 
				      <%
i=i+1
if i mod 4=0 then                                                                            
                   response.write "</tr><tr>"                                       
                end if                        
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
              </tr>
            </table> 
     
            <table width="530" border="0" cellspacing="0" cellpadding="10" align="center">
              <tr> 
                <td bgcolor="#000000" colspan="2" height="22" align="center">当前没有照片!</td>
              </tr>
            </table>
            <%end if
end if
if not request("type")=1 then%><form name="form1" method="post" action="photo.asp?phcat_id=<%=request.querystring("phcat_id")%>">
<TABLE cellSpacing=1 cellPadding=0 width="530" align=center border=0 bgcolor="#999999">
<TBODY>
<TR> 
<TD align=middle width="35%" height=25 bgcolor="#333333"><IMG height=14 src="img/cha.gif" width=14 align=absMiddle> 共[<font color="#66ffff"><%=totalcs%></font>]张相片 分[<font color="#66ffff"><%=totalpages%></font>]页</TD>
<TD width="40%" align=middle bgcolor="#333333"><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='669999'>首页 上一页</font> "
else
response.write "<a href=photo.asp?page=1&phcat_id="&request.querystring("phcat_id")&">首页</a> "
response.write "<a href=photo.asp?page="&CurrentPage-1&"&phcat_id="&request.querystring("phcat_id")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='669999'>下一页 尾页</font>"
else
response.write "<a href=photo.asp?page="&CurrentPage+1&"&phcat_id="&request.querystring("phcat_id")
response.write ">下一页</a> <a href=photo.asp?page="&totalpages&"&phcat_id="&request.querystring("phcat_id")&">尾页</a>"
end if
%>
 <IMG height=11 src="img/gt.gif" width=11 align=absMiddle></TD>
<TD align=middle width="25%" bgcolor="#333333">
<select name="page" class="lanyu">
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>页</option> 
<%else%>
<option value=<%=i%>>第<%=i%>页</option> 
<%end if
next%>
</select><input type="submit" name="Submit2" value="转向" class="button"> </TD>
</TR>
</FORM>
</TABLE>          
      <%end if%>
<%call br%><%call br%>
          </td>
          <td width="3" colspan="2" background="img/xu2.gif"></td>
        </tr>
      </table>
    </td>
    <td width="198"><TABLE width=196 border=0 align=right cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR> 
            <td align=center height="24" background="img/title.jpg"><strong>流星情缘排行</strong></td>
          </tr>
          <tr>
            <td align="center"> 
              <%call br%>
              <%sql="SELECT top 10 * FROM photo ORDER by ph_count DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
%>
              <table width="760%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>&nbsp;<img src="img/title.gif" border="0">&nbsp;<a href="javascript:photo('rephoto.asp?ph_id=<%=rs("ph_id")%>')" title='点击次数:<%=rs("ph_count")%>次'><%=rs("ph_name")%></a></td>
                </tr>
              </table> 
              <%call br%>
              <%rs.movenext
loop
if rs.eof and rs.bof then%>
              当前还没有照片    
              <%end if%>
            </td>
          </tr>
          <TR> 
            <td align=center height="24" background="img/title.jpg"><strong>流星情缘写真</strong></td>
          </tr>
          <tr>
            
        <td align="center"> 
          <%call br%>
          <%sql="SELECT top 3 * FROM photo where isbest = 1 ORDER by ph_date DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
%>
          <table border='0' cellpadding='0' cellspacing='5'>
            <tr> 
              <td align='center' width='135'><table width="100%" border='0' align='center' cellpadding='0' cellspacing='0'>
                  <tr> 
                    <td height='10'><img src='img/bg_0ltop.gif' width='10' height='10'></td>
                    <td height='10' background='img/bg_01.gif'></td>
                    <td height='10'><img src='img/bg_0rtop.gif' width='10' height='10'></td>
                  </tr>
                  <tr> 
                    <td width=10 background=img/bg_03.gif> </td>
                    <td align='center' valign='middle' bgcolor='#000000'> <a href="javascript:photo('rephoto.asp?ph_id=<%=rs("ph_id")%>')"> 
                      <img src="<%=rs("ph_pic")%>" width="100" height="125" border="0" title="图片名称:<%=rs("ph_name")%><br>上传时间:<%=rs("ph_date")%><br>点击次数:<%=rs("ph_count")%>次"></a> 
                    </td>
                    <td width='10' background='img/bg_04.gif'> </td>
                  </tr>
                  <tr> 
                    <td height='10'><img src='img/bg_0lbottom.gif' width='10' height='10'></td>
                    <td height='10' background='img/bg_02.gif'></td>
                    <td height='10'><img src='img/bg_0rbottom.gif' width='10' height='10'></td>
                  </tr>
                </table></td>
            </tr>
          </table>
          <%call br%>
              <%rs.movenext
loop
if rs.eof and rs.bof then%>
              当前还没有照片   
              <%end if%>
            </td>
          </tr>
      </table></td>
  </tr>
</table>
<%
rs.close
set rs=nothing
end sub%>

⌨️ 快捷键说明

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