| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 389 人关注过本帖
标题:求助。。。这段代码为什么图片只能显示一个?
取消只看楼主 加入收藏
卡丁龙
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-9-18
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:2 
求助。。。这段代码为什么图片只能显示一个?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include file="conn.asp" -->
<!--#include file="admin/function/cutstr.asp" -->

<%
set rs= Server.CreateObject("adodb.recordset")
sql="select * from basic"
rs.open sql,conn,1,1
 %>
<title><%= rs("stname") %></title>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>

<body>
<%
lb=Trim(Request.QueryString("lb"))
set rs= Server.CreateObject("adodb.recordset")
if lb="" then
sql="select top 1 * from enjoy_class order by id asc"
else
sql="select top 1 * from enjoy_class where id="&lb
end if
rs.open sql,conn,1,1
mylb=rs("id")
mytitle=rs("zpt")
set rs=nothing
 %>
<!--#include file="top.asp" -->
<%

set rs= Server.CreateObject("adodb.recordset")
sql="select * from nav"
rs.open sql,conn,1,1
 %>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" id="bj">
  <tr>
    <td width="190" height="700" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5">&nbsp;</td>
      </tr>
    </table>
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="dbt">
      <tr>
        <td height="50" align="left" valign="middle" class="dbt">新人欣赏</td>
      </tr>
    </table>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="15">&nbsp;</td>
        </tr>
      </table>
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
      <%
      set rs= Server.CreateObject("adodb.recordset")
      sql="select * from enjoy_class order by id asc"
      rs.open sql,conn,1,1
      while not rs.eof
       %>
       <% If cstr(rs("id"))=cstr(mylb) Then %>
        <tr>
          <td height="22" align="center"><a href="?lb=<%= rs("id") %>" class="menucurrent"><%= rs("zpt") %></a></td>
        </tr>
        <% Else %>
        <tr>
          <td height="22" align="center"><a href="?lb=<%= rs("id") %>" class="menu"><%= rs("zpt") %></a></td>
        </tr>
        <% End If %>
        <%
         rs.movenext
         wend
        %>
    </table></td>
    <td height="700" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5">&nbsp;</td>
      </tr>
    </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="28" align="center" class="imp" id="lbj"><%= mytitle %>&nbsp;</td>
        </tr>
        <tr>
          <td height="10" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="30%" height="1" class="xt">&nbsp;</td>
              <td height="1" class="mid">&nbsp;</td>
              <td width="30%" height="1" class="xt">&nbsp;</td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="10">&nbsp;</td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
        
        <%
        set rs= Server.CreateObject("adodb.recordset")
        sql="select * from  yj where  lb="&mylb&" order by id desc"
        rs.open sql,conn,1,1
        page=Trim(Request.QueryString("page"))
        if not ISnumeric(request("page")) or ISempty(request("page")) then page=1
        page=cint(page)
         if not rs.eof then
        rs.pagesize=12
        alpgs=rs.pagecount
                     if page>alpgs then page=alpgs
                     if page<>0 then
                      rs.absolutepage=page
                       else
                        Response.Write("没有符合条件记录!")
                        end if
         
           else
                    Response.Write("<tr><td>数据库中暂无纪录!</td></tr>")
          end if
          for pages=0 to rs.pagesize-1
          if rs.bof or rs.eof then exit for
          if pages<>0 then
          if pages mod 4=0 then
          Response.Write("</tr><tr>")
          end if
          end if
         
        
         %>
          <td height="60"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="3">
            <tr>
              <td height="30" align="center"><a href="zpzs_bigpic.asp?id=<%= rs("id") %>"><img src="uploadfiles/<%= rs("pic") %>" width="180" height="130" border="0"/></a></td>
            </tr>
            <tr>
              <td height="30" align="center"><a href="zpzs_bigpic.asp?id=<%= rs("id") %>"><%= cutstr(rs("yj"),13) %></a>&nbsp;</td>
            </tr>
          </table></td>
          <%
          rs.movenext
          next
           %>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="30" align="center">每页<font color="#FFFFFF" face="impact"><%= rs.pagesize %></font>/共<font color="#FFFFFF" face="impact"><%= rs.recordcount %></font>条记录
          <% If page<>1 Then %>
          <a href="?page=1&lb=<%= mylb %>">首页</a>
          <% End If %>
          <% If page>1 Then %>
          <a href="?lb=<%= mylb %>&page=<%= page-1 %>">上一页</a>
          <% Else %>
          上一页
          <% End If %>
          <% for pages=1 to alpgs %>
          <a href="?lb=<%= mylb %>& page=<%= pages %>"><%= pages %></a>
          <% next %>
          <% If page<alpgs Then %>
          <a href="?lb=<%= mylb %>&page=<%= page+1 %>">下一页</a>
          <% Else %>
          下一页
          <% End If %>
         
          <% If page<>alpgs Then %>
          <a href="?page=<%= alpgs %>&lb=<%= mylb %>">尾页</a>
          <% End If %>
           
          &nbsp;第:<font color="#FFFFFF" face="impact"><%= page %></font>/<font color="#FFFFFF" face="impact"><%= alpgs %></font>页</td>
        </tr>
    </table></td>
  </tr>
</table>

<!--#include file="footer.asp" -->
</body>
</html>
搜索更多相关主题的帖子: 代码 
2010-09-18 14:52
卡丁龙
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-9-18
收藏
得分:0 
现在是这样的只能显示一个



我要他显示这样的


[ 本帖最后由 卡丁龙 于 2010-9-18 15:15 编辑 ]
2010-09-18 15:14
卡丁龙
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-9-18
收藏
得分:0 
应该可以了
2010-09-18 15:25
快速回复:求助。。。这段代码为什么图片只能显示一个?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023987 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved