横向循环案例

原创 2016年06月02日 12:44:53

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<%
dim sql,sizes,page,rs,asp,cid,page_link,model(4),prdid(4)
cid=request("cid")
asp="products.asp"
page=request("page")
if page="" then page=1 end if
sizes=16
if cid="" then
    sql="select * from product order by cid asc"
else
    sql="select * from product where cid="&cid&" order by id desc"
end if
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
page_link=pagelink(sizes,asp)
%>

<table width="742" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="236" align="center" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="236" height="67">
          <param name="movie" value="../images/left_01.swf">
          <param name="quality" value="high">
    <param name="SCALE" value="exactfit">
    <param name="wmode" value="transparent">
          <embed src="../images/left_01.swf" width="236" height="67" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit"></embed>
        </object></td>
      </tr>
    </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="img/left_title02.gif" width="236" height="30"></td>
        </tr>
      </table>
      <table width="100%" height="260"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" valign="top" background="../images/left_bg01.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="21"><img src="../images/space02.gif" width="21" height="10"></td>
              <td align="center" valign="top"><table width="180" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="10"><img src="../images/space02.gif" width="21" height="10"></td>
                </tr>
                <tr>
                  <td height="3"><img src="../images/left_line01.gif" width="180" height="3"></td>
                </tr>
  <%
   dim rsc1, rsc2, sqlc1, sqlc2
 set rsc1 = server.createobject("adodb.recordset")
 sqlc1 = "select * from class"
 rsc1.open sqlc1, conn, 1, 1
 if not rsc1.eof then
 rsc1.movefirst
 do while not rsc1.eof
  %>
                <tr>
                  <td height="22" class="text06"> ↓ <%=rsc1("ename")%></td>
                </tr>
                <tr>
                  <td height="3"><img src="../images/left_line01.gif" width="180" height="3"></td>
                </tr>
  <%
    cid_c = rsc1("id")
  set rsc2 = server.CreateObject("adodb.recordset")
  sqlc2 = "select * from class_sub where cid = "&cid_c
  rsc2.open sqlc2, conn, 1, 1
  if not rsc2.eof then
  rsc2.movefirst
  do while not rsc2.eof
  %>
                <tr>
                  <td height="22" class="text01"> ◇ <a href="products.asp?cid=<%=rsc2("id")%>" class="link02" target="_parent"><%=rsc2("ename")%></a></td>
                </tr>
                <tr>
                  <td height="3"><img src="../images/left_line01.gif" width="180" height="3"></td>
                </tr>
  <%
    rsc2.movenext
  loop
  end if
  rsc2.close
 rsc1.movenext
 loop
 end if
 rsc1.close
 set rsc1=nothing
 set rsc2=nothing
 set sqlc1=nothing
 set sqlc2=nothing
  %>
              </table></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="../images/left_02.gif" width="236" height="87"></td>
        </tr>
      </table></td>
    <td align="center" valign="top"><table width="100%" height="360"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center" valign="top" background="../images/main_bg01.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center" valign="top"><table width="92%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="360" align="center" valign="top" class="text03"><table width="440" border="0" align="center" cellpadding="0" cellspacing="0" >
                  <%
     for j=1 to sizes\4
         if rs.eof then
       exit for
     else
     end if
     %>
                  <tr>
                    <%
         for i=1 to 4
          if not rs.eof then
           model(i)=rs("ename")
        prdid(i)=rs("id")
     %>
                    <td width="110" height="110" align="center" valign="middle" background="../images/prd_small_bg.gif"><a href="javascript:openwin(<%=rs("id")%>);"><img src="../manage/photo/<%=rs("photo")%>" width="90" height="90" border="0"></a></td>
                    <%
                 rs.movenext
       else
     %>
                    <td width="25%" align="center" valign="middle">&nbsp;</td>
                    <%
             end if
         next
     %>
                  </tr>
                  <tr>
                    <%
         for i=1 to 4
          if model(i)<>"" then
     %>
                    <td width="110" height="20" align="center" valign="middle" class="text01">↑ <a href="javascript:openwin(<%=prdid(i)%>);" class="link01"><%=model(i)%></a></td>
                    <%
                 model(i)=""
       else
     %>
                    <td>&nbsp;</td>
                    <%
             end if
         next
     %>
                  </tr>
                  <tr>
                    <td colspan="3">&nbsp;</td>
                  </tr>
                  <%
     next
     rs.close
     set rs=nothing
     'call closeconn()
     %>
                </table></td>
              </tr>
            </table>
              <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
    <form name="form1" method="post">
                  <td align="center" class="text03">
                        <input type="hidden" name="page" value="<%=page%>">
                        <input type="hidden" name="cid" value="<%=cid%>">
                        <%=page_link%>
                  </td>
                </form>
    </tr>
              </table></td>
            <td width="29" align="center" valign="middle"><img src="../images/main_right01.gif" width="29" height="57"></td>
          </tr>
        </table></td>
      </tr>
    </table>
      <table width="100%" height="60"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" valign="top" background="../images/main_buttom.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="32">&nbsp;</td>
            </tr>
            <tr>
              <td height="24" align="center" valign="middle" class="text01">THIS PAGE DESIGN BY <a href="mailto:gd_nick@tom.com" class="link01">NICK. </a>       </td>
            </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

自动横向循环滑动图片控件

  • 2017年05月17日 23:55
  • 6KB
  • 下载

WEB横向循环滑动

  • 2016年08月19日 00:22
  • 4.12MB
  • 下载

Redis 横向扩展案例

Redis 横向扩展案例 时间 2015-11-09 23:13:03 DBA@Robin 原文  http://dbarobin.com/2015/11/09/scale-out...

横向循环滚动图片Javascript代码

  • 2010年02月03日 09:48
  • 3KB
  • 下载

Redis 横向扩展案例

转自 http://f.dataguru.cn/article-8645-1.html 摘要: 0x01 背景介绍A 项目采集其它项目生成的数据,数据保存一定时间,并且不需要持久化。故 A ...
  • yaowj2
  • yaowj2
  • 2016年01月21日 17:26
  • 1117

横向无限循环的筛选组件

  • 2017年07月20日 18:48
  • 26.53MB
  • 下载

微信小程序横向左右滑动案例

图片左右滑动效果 效果图: wxml代码: [html] view plain copy  print?...

微信小程序横向左右滑动案例

左右滑动效果 图片自己相应的填进去就好了 效果图: wxml文件:
  • wy_Blog
  • wy_Blog
  • 2017年04月19日 08:52
  • 3222

JS横向循环滑动也可移动性切换

一、实现原理: 主要是通过设置不同的样式然后每个样式都后缀都是不一样的。 比如class:tab_tophome_1,tab_tophome_2,...;图片也是同样的道理。 二、先上效果图: 三、...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:横向循环案例
举报原因:
原因补充:

(最多只允许输入30个字)