藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年8月25日 8:28

求救啊,我的分頁出了問題,高手幫幫我

這是我的一個分頁程序,不知道哪兒出了錯,第一頁好好的,當我加產品到第二頁的時候就會出現好多得重的內容,我的每頁是顯視三行四列,也就是12產品,而當我加第13個產品的時候,它會顯視26個,出現好多重的內容,大俠們幫我解決解決啊,小弟我將感激不盡,現將代碼呈上,望各位網友們幫幫我!!

代碼如下:
<!--#include file="conn.asp"-->
<%
fx="LADY"
dim rcu,sqlu
set rcu=server.CreateObject("adodb.recordset")
sqlu="select * from chanpin where fx='"&fx&"' order by id desc"
rcu.open sqlu,conn,1,1
rcu.pagesize=3
page = cint(request.QueryString("page"))
if page<1 then
page=1
elseif page>rcu.pagecount then
page=rcu.pagecount
end if
rcu.Absolutepage = page
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>New  collections</title>
<style type="text/css">
<!--
body {
        margin-left: 0px;
        margin-top: 0px;
        margin-right: 0px;
        margin-bottom: 0px;
}
.style2 {
        color: #666666;
        font-size: 14px;
}
.a1 {
        font-size: 14px;
        color: #666666;
        text-decoration: none;
}
.a2 {
        font-size: 14px;
        font-weight: bolder;
        color: #FF6600;
        font-family: Arial, Helvetica, sans-serif;
}
.a1:hover {
        font-size: 14px;
        color: #FF6600;
        text-decoration: underline;
}
.zt8 {font-size: 12px;
        color: #000000;
        text-decoration: none;
}
-->
</style></head>

<body>
<!--#include file="top.asp"-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="210" height="130" align="center" valign="top" bgcolor="#FFC80E"><table width="100%"  border="0" cellspacing="21" cellpadding="0">
      <tr>
        <td height="395" align="center" valign="middle" bgcolor="#FFE46B"><table width="127"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><a href="cp01.asp"><img src="images/index03.jpg" width="127" height="44" border="0"></a></td>
          </tr>
          <tr>
            <td><a href="cp02.asp"><img src="images/index04.jpg" width="127" height="44" border="0"></a></td>
          </tr>
          <tr>
            <td><a href="cp03.asp"><img src="images/index05.jpg" width="127" height="44" border="0"></a></td>
          </tr>
          <tr>
            <td><a href="index.asp"><img src="images/index06.jpg" width="127" height="44" border="0"></a></td>
          </tr>
          <tr>
            <td><a href="cp04.asp"><img src="images/index07.jpg" width="127" height="45" border="0"></a></td>
          </tr>
          <tr>
            <td><a href="cp05.asp"><img src="images/index08.jpg" width="127" height="45" border="0"></a></td>
          </tr>
          <tr>
            <td><a href="cp06.asp"><img src="images/index19.jpg" width="131" height="50" border="0"></a></td>
          </tr>
          <tr>
            <td><a href="cp07.asp"><img src="images/index09.jpg" width="127" height="43" border="0"></a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="76" align="center" valign="middle" bgcolor="#FFE46B"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="75" align="center"><img src="images/index15.jpg" width="145" height="55"></td>
          </tr>
          <tr>
            <td bgcolor="#FFC70E"><img src="images/index16.jpg" width="98" height="60"></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td valign="top"><table width="100%"  border="0" cellspacing="20" cellpadding="0">
      <tr>
        <td height="16"><table width="655"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td colspan="3" align="right"><span class="style2"><img src="images/index18.jpg" width="99" height="27"></span></td>
          </tr>
          <tr>
            <td width="24" rowspan="2"><img src="images/index10.jpg" width="24" height="50"></td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="526" height="37" bgcolor="#FEE46B"><img src="images/index11.jpg" width="81" height="37"></td>
            <td width="105" bgcolor="#F3D658">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="655"  border="0" cellspacing="0" cellpadding="0">
<%
IF RCu.BOF THEN response.Write ""
FOR i=1 to rcu.pagesize
IF RCu.EOF THEN EXIT FOR
%>
                  <tr>
            <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="center"><a href="cpshow.asp?id=<%=rcu("id")%>" target="_blank"><img src="<%=Replace(rcu("photopath"),"../","")%>" width="124" height="150" border="0"></a></td>
                    </tr>
                    <tr>
                      <td height="30" align="center" valign="bottom"><span class="a1"><a href="cpshow.asp?id=<%=rcu("id")%>" class="a1" target="_blank"><%=rcu("strname")%></a></span> <a href="cpshow.asp?id=<%=rcu("id")%>" target="_blank"><img src="images/index13.jpg" width="10" height="9" border="0"></a></td>
                    </tr>
                    <tr>
                      <td height="15" align="center" valign="top" class="a2">&nbsp;</td>
                    </tr>
                </table></td>
<%
rcu.movenext
%>

                <td width="25%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="center"><a href="cpshow.asp?id=<%=rcu("id")%>" target="_blank"><img src="<%=Replace(rcu("photopath"),"../","")%>" width="124" height="150" border="0"></a></td>
                  </tr>
                  <tr>
                    <td height="30" align="center" valign="bottom"><span class="a1"><a href="cpshow.asp?id=<%=rcu("id")%>" class="a1" target="_blank"><%=rcu("strname")%></a></span> <a href="cpshow.asp?id=<%=rcu("id")%>" target="_blank"><img src="images/index13.jpg" width="10" height="9" border="0"></a></td>
                  </tr>
                  <tr>
                    <td height="15" align="center" valign="top" class="a2">&nbsp;</td>
                  </tr>
                </table></td>
<%
rcu.movenext
%>

                <td width="25%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="center"><a href="cpshow.asp?id=<%=rcu("id")%>" target="_blank"><img src="<%=Replace(rcu("photopath"),"../","")%>" width="124" height="150" border="0"></a></td>
                  </tr>
                  <tr>
                    <td height="30" align="center" valign="bottom"><span class="a1"><a href="cpshow.asp?id=<%=rcu("id")%>" class="a1" target="_blank"><%=rcu("strname")%></a></span> <a href="cpshow.asp?id=<%=rcu("id")%>" target="_blank"><img src="images/index13.jpg" width="10" height="9" border="0"></a></td>
                  </tr>
                  <tr>
                    <td height="15" align="center" valign="top" class="a2">&nbsp;</td>
                  </tr>
                </table></td>
<%
rcu.movenext
%>
                <td width="25%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="center"><a href="cpshow.asp?id=<%=rcu("id")%>" target="_blank"><img src="<%=Replace(rcu("photopath"),"../","")%>" width="124" height="150" border="0"></a></td>
                  </tr>
                  <tr>
                    <td height="30" align="center" valign="bottom"><span class="a1"><a href="cpshow.asp?id=<%=rcu("id")%>" class="a1" target="_blank"><%=rcu("strname")%></a></span> <a href="cpshow.asp?id=<%=rcu("id")%>" target="_blank"><img src="images/index13.jpg" width="10" height="9" border="0"></a></td>
                  </tr>
                  <tr>
                    <td height="15" align="center" valign="top" class="a2">&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
          
            </table>
              </td><%
rcu.movenext
next
%>
          </tr>
          <tr>
            <td height="1" bgcolor="#98CD67"></td>
          </tr>
          <tr>
            <td height="40" align="center" class="style2"><span class="a1">&nbsp;&nbsp;<a href="index.asp?page=1" class="a1">Home</a>&nbsp;&nbsp;
                
<%
                                                                                if page>1 then
                                                                       
                                                                       
                                                                       
                                                                        %>
                <a href="index.asp?page=<%=page-1%>" class="a1">&nbsp;&nbsp;Last page</a>
                <%else%>
Last page  
<%end if%>

<% if page < cint(rcu.pagecount/3) then%>
<a href="index.asp?page=<%=page+1%>" class="a1">next page</a>
<%else%> 
next page
<%end if%>
&nbsp;&nbsp; <a href="index.asp?page=<%=cint(rcu.pagecount/3)%>" class="a1">End page</a>&nbsp;  At present&nbsp;<%=page%>&nbsp;Page &nbsp;Altogether&nbsp;<%=cint(rcu.pagecount/3)%>&nbsp;Page&nbsp;&nbsp;</span></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><img src="images/index17.jpg" width="561" height="89"></td>
      </tr>
    </table></td>
  </tr>
</table>
<map name="Map">
  <area shape="rect" coords="5,13,65,28" href="jj.asp">
  <area shape="rect" coords="77,13,236,27" href="cgpp.asp">
  <area shape="rect" coords="252,15,366,27" href="lxxd.asp">
  <area shape="rect" coords="386,15,456,27" href="lx.asp">
  <area shape="rect" coords="473,15,652,29" href="yhcp.asp">
</map>
</body>
</html>







Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com