找回密码
 注册
【阿里云】2核2G云服务器新老同享 99元/年,续费同价,云服务器3年机/5年机限时抢购,低至 2.5折华为云精选云产品特惠糖果主机Jtti,新加坡服务器,美国服务器,香港服务器,海外云服务器
查看: 767|回复: 13

谁能帮我看看这asp代码怎么改?

[复制链接]
发表于 2006 年 2 月 24 日 14:43:15 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
  我想改成每页两行,每行6项,每12项一页

大家帮我看看怎么改  急用  谢谢了,


<form action="" method="post" name="List" id="List">
<%  
       SearchMaxID = Trim(Request("MaxID"))
       SearchKeyword = Trim(Request("SearchKeyword"))
       SearchSelect = Trim(Request("SearchSelect"))
       intPageSize = 4
       intCols = 1
       intWidth = 180
       intHeight = 110
       set RsList = server.CreateObject("adodb.recordset")
       SqlList = "SELECT C.ProID, C.ProModel, C.ProName, C.ProImage1, C.ProImage2, C.ProNew, C.ProContent1, C.ProContent2, A.MaxID, A.MaxName FROM ProductMax10 AS A INNER JOIN ProductList10 AS C ON A.MaxID = C.MaxID "
       SqlList = SqlList + " WHERE C.ProID >= 1 "
       If IsNumeric(SearchMaxID) = True And Trim(SearchMaxID) <> "" Then
               SqlList = SqlList + " and A.MaxID = "&SearchMaxID&" "  
       End If
       if SearchKeyword <> "" then
               SearchKeyword = Replace( SearchKeyword, "'", "" )
               Select Case SearchSelect
                       Case "1"
                               SqlList = SqlList + " and ProModel like '%"&SearchKeyword&"%' "
                       Case "2"
                               SqlList = SqlList + " and ProName like '%"&SearchKeyword&"%' "
                       Case "3"
                               SqlList = SqlList + " and ProContent1 like '%"&SearchKeyword&"%' "
                       Case "4"
                               SqlList = SqlList + " and ProContent2 like '%"&SearchKeyword&"%' "
                       Case Else
                               SqlList = SqlList + " and ProModel & ProName & ProContent1 & ProContent2 like '%"&SearchKeyword&"%' "
               End Select
       End If
       SqlList = SqlList + " ORDER BY C.ProRank, C.ProUpdateTime DESC , C.ProID DESC "
       RsList.open SqlList, objConn, 1, 1
       if RsList.eof or RsList.bof then
               call subListEof()
       else
               call subListShow()
       end if
       RsList.close
       set RsList = nothing
%>
<%
Sub subListEof()
%>
  <table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
     <td>
<table width="100%" height="150" border="0" align="center" cellpadding="4" cellspacing="1">
         <tr>
           <td align="center" valign="middle">没有找到符合条件的信息记录 !</td>
         </tr>
       </table>
         </td>
   </tr>
  </table>
       <%
End Sub
%>
       <%
Sub subListShow()

       RsList.pagesize = intPageSize
       page = request("page")
       If IsNumeric(page) = False Then
               page = 1
       Else
               page = cint(page)
       End If
       if page < 1 then page = 1
       if page > RsList.pagecount then page = RsList.pagecount
       
       RsList.absolutepage = page
%>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
     <td>
<%
       for i = 1 to ( intPageSize / intCols )
%>
<table width="97%" height="110" border="0" align="center" cellpadding="4" cellspacing="1">
         <tr>
<%
               for j = 1 to intCols
%>
                   <td width="<% = Cint( 100 / intCols )%>%" align="center" valign="top">
<%
       if not RsList.eof then
%>







<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
   <td height=30  bgcolor="#EAEFF2">
<img src="../images/arrow_grey.gif" width="13" height="11"><% = RsList(&quotroModel") %>  
   </td>
  </tr>
  <tr>
   <td height="20"></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
                               <tr>
                                 <td width="29%" align="center">
                                                                
                                                                
                                                                
                                                                
                                                                
<table border="0" align="center" cellpadding="1" cellspacing="1" onMouseOver="this.bgColor='#AAAAAA'" onMouseOut="this.bgColor='#CCCCCC'" bgcolor="#CCCCCC" width="<% = intWidth + 2 %>" height="<% = intHeight + 2 %>">
                                 <tr>
                                   <td align="center" bgcolor="#FFFFFF" style="padding:3px; ">
<%
       if trim(RsList(&quotroImage1")) <> "" then
%>
<%
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
If  Fs.FileExists( Server.MapPath("../Admin/Product10/ProImage1/"&RsList(&quotroImage1"))) Then
%>
                                      <a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>"> <img src="<%="../Admin/Product10/ProImage1/"&RsList("ProImage1")%>" width="110" height="110" border="0" align="middle" onmouseover="this.style.cursor='hand';"></a>
<%
End If
Set Fs = nothing
%>
<%
       end if
%>
                                   </td>
                                 </tr>
                               </table>                                                                 
                                                                
                                                                
                                                                
                                                                
                                                                
                                                                
                                                                 </td>
                                 <td width="71%" rowspan="2" valign="middle"><table width="100%" border="0" cellpadding="2" cellspacing="1">
                                     <tr>
                                       <td width="14%" align="center" class="newsBg"><strong>型号:</strong></td>
                                       <td width="86%" class="newsBg"><a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>">
                             <% = RsList("ProModel") %>
                       </a></td>
                                     </tr>
                                     <tr>
                                       <td align="center" class="newsBg"><strong>特点:</strong></td>
                                       <td class="newsBg"><% =  RsList("ProName") %></td>
                                     </tr>
                                     <tr>
                                       <td align="center" class="newsBg"><strong>规格:</strong></td>
                                       <td class="newsBg"><% =  RsList("ProContent1") %></td>
                                     </tr>
                                     <tr>
                                       <td align="center" class="newsBg"><strong>颜色:</strong></td>
                                       <td class="newsBg"><% =  RsList("ProContent2") %></td>
                                     </tr>
                                   </table></td>
                               </tr>
                               <tr>
                                 <td align="center"> </td>
                               </tr>

                             </table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
   <td align="right"><a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>"><img src="../images/more.gif" border="0"></a></td>
  </tr>
</table>

                       <%                       
           RsList.movenext
       end if
%>
                   </td>
                   <%
       next
%>
                 </tr>
               </table>
               <%
       if RsList.eof then exit for
       next
%>
<table width="100%" height="42" border="0" align="center" cellpadding="4" cellspacing="1">
                 <tr>
                   <td align="center" valign="middle"><%
       Call show_page2( "List","",page,RsList,"MaxID#" & (SearchMaxID) & "#SearchKeyword#" & (SearchKeyword) & "#SearchSelect#" & (SearchSelect)  )
%>
                   </td>
                 </tr>
               </table>

                               
     </td>
   </tr>
  </table>
       <%
%>
<%
End Sub
%>
</form>
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
发表于 2006 年 2 月 24 日 14:47:13 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
现在有这页子的演示么?
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 2 月 24 日 14:51:06 | 显示全部楼层
http://www.ald.net.cn/lls/huiri/product.asp

就像他的这样,不过我的是两行,每行6个,每页12个
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 2 月 24 日 14:51:18 | 显示全部楼层
i=1
do while i<7
  j=1
  <tr>
  do while j<3
  <td>
  </td>
  j=j+1
  loop
<tr>
i=i+1
loop
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 2 月 24 日 14:52:54 | 显示全部楼层
加在哪部分,帮我完整加进去好吗,不大会
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 2 月 24 日 14:53:00 | 显示全部楼层
其它代码自己加
这个会吧
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 2 月 24 日 14:54:27 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
<%i=1
do while i<7
j=1%>
<tr>
<%do while j<3%>
<td>
<form action="" method="post" name="List" id="List">
<%
   SearchMaxID = Trim(Request("MaxID"))
   SearchKeyword = Trim(Request("SearchKeyword"))
   SearchSelect = Trim(Request("SearchSelect"))
   intPageSize = 4
   intCols = 1
   intWidth = 180
   intHeight = 110
   set RsList = server.CreateObject("adodb.recordset")
   SqlList = "SELECT C.ProID, C.ProModel, C.ProName, C.ProImage1, C.ProImage2, C.ProNew, C.ProContent1, C.ProContent2, A.MaxID, A.MaxName FROM ProductMax10 AS A INNER JOIN ProductList10 AS C ON A.MaxID = C.MaxID "
   SqlList = SqlList + " WHERE C.ProID >= 1 "
   If IsNumeric(SearchMaxID) = True And Trim(SearchMaxID) <> "" Then
         SqlList = SqlList + " and A.MaxID = "&SearchMaxID&" "  
   End If
   if SearchKeyword <> "" then
         SearchKeyword = Replace( SearchKeyword, "'", "" )
         Select Case SearchSelect
               Case "1"
                   SqlList = SqlList + " and ProModel like '%"&SearchKeyword&"%' "
               Case "2"
                   SqlList = SqlList + " and ProName like '%"&SearchKeyword&"%' "
               Case "3"
                   SqlList = SqlList + " and ProContent1 like '%"&SearchKeyword&"%' "
               Case "4"
                   SqlList = SqlList + " and ProContent2 like '%"&SearchKeyword&"%' "
               Case Else
                   SqlList = SqlList + " and ProModel & ProName & ProContent1 & ProContent2 like '%"&SearchKeyword&"%' "
         End Select
   End If
   SqlList = SqlList + " ORDER BY C.ProRank, C.ProUpdateTime DESC , C.ProID DESC "
   RsList.open SqlList, objConn, 1, 1
   if RsList.eof or RsList.bof then
         call subListEof()
   else
         call subListShow()
   end if
   RsList.close
   set RsList = nothing
%>
<%
Sub subListEof()
%>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
   <td>
<table width="100%" height="150" border="0" align="center" cellpadding="4" cellspacing="1">
     <tr>
       <td align="center" valign="middle">没有找到符合条件的信息记录 !</td>
     </tr>
   </table>
     </td>
  </tr>
</table>
   <%
End Sub
%>
   <%
Sub subListShow()

   RsList.pagesize = intPageSize
   page = request("page")
   If IsNumeric(page) = False Then
         page = 1
   Else
         page = cint(page)
   End If
   if page < 1 then page = 1
   if page > RsList.pagecount then page = RsList.pagecount
   
   RsList.absolutepage = page
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
   <td>
<%
   for i = 1 to ( intPageSize / intCols )
%>
<table width="97%" height="110" border="0" align="center" cellpadding="4" cellspacing="1">
     <tr>
<%
         for j = 1 to intCols
%>
           <td width="<% = Cint( 100 / intCols )%>%" align="center" valign="top">
<%
   if not RsList.eof then
%>







<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
  <td height=30 bgcolor="#EAEFF2">
<img src="../images/arrow_grey.gif" width="13" height="11"><% = RsList(&quotroModel") %>  
  </td>
</tr>
<tr>
  <td height="20"></td>
</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
                   <tr>
                     <td width="29%" align="center">
                                           
                                           
                                           
                                           
                                           
<table border="0" align="center" cellpadding="1" cellspacing="1" onMouseOver="this.bgColor='#AAAAAA'" onMouseOut="this.bgColor='#CCCCCC'" bgcolor="#CCCCCC" width="<% = intWidth + 2 %>" height="<% = intHeight + 2 %>">
                     <tr>
                       <td align="center" bgcolor="#FFFFFF" style="padding:3px; ">
<%
   if trim(RsList(&quotroImage1")) <> "" then
%>
<%
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
If Fs.FileExists( Server.MapPath("../Admin/Product10/ProImage1/"&RsList(&quotroImage1"))) Then
%>
                         <a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>"> <img src="<%="../Admin/Product10/ProImage1/"&RsList("ProImage1")%>" width="110" height="110" border="0" align="middle" onmouseover="this.style.cursor='hand';"></a>
<%
End If
Set Fs = nothing
%>
<%
   end if
%>
                       </td>
                     </tr>
                   </table>                                            
                                           
                                           
                                           
                                           
                                           
                                           
                                           </td>
                     <td width="71%" rowspan="2" valign="middle"><table width="100%" border="0" cellpadding="2" cellspacing="1">
                       <tr>
                         <td width="14%" align="center" class="newsBg"><strong>型号:</strong></td>
                         <td width="86%" class="newsBg"><a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>">
                   <% = RsList("ProModel") %>
               </a></td>
                       </tr>
                       <tr>
                         <td align="center" class="newsBg"><strong>特点:</strong></td>
                         <td class="newsBg"><% = RsList("ProName") %></td>
                       </tr>
                       <tr>
                         <td align="center" class="newsBg"><strong>规格:</strong></td>
                         <td class="newsBg"><% = RsList("ProContent1") %></td>
                       </tr>
                       <tr>
                         <td align="center" class="newsBg"><strong>颜色:</strong></td>
                         <td class="newsBg"><% = RsList("ProContent2") %></td>
                       </tr>
                       </table></td>
                   </tr>
                   <tr>
                     <td align="center"> </td>
                   </tr>

                   </table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
  <td align="right"><a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>"><img src="../images/more.gif" border="0"></a></td>
</tr>
</table>

               <%                 
       RsList.movenext
   end if
%>
           </td>
           <%
   next
%>
           </tr>
         </table>
         <%
   if RsList.eof then exit for
   next
%>
<table width="100%" height="42" border="0" align="center" cellpadding="4" cellspacing="1">
           <tr>
           <td align="center" valign="middle"><%
   Call show_page2( "List","",page,RsList,"MaxID#" & (SearchMaxID) & "#SearchKeyword#" & (SearchKeyword) & "#SearchSelect#" & (SearchSelect) )
%>
           </td>
           </tr>
         </table>

                   
   </td>
  </tr>
</table>
   <%
%>
<%
End Sub
%>
</form>
</td>
<%j=j+1
loop%>
<tr>
<%i=i+1
loop%>
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 2 月 24 日 14:55:16 | 显示全部楼层
非常感谢,我去试试
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 2 月 24 日 15:04:36 | 显示全部楼层
您要访问的网页有问题,无法显示。

--------------------------------------------------------------------------------

请尝试以下操作:

打开 www 主页,然后查找指向您感兴趣信息的链接。
单击刷新按钮,或以后再试。

单击搜索,寻找 Internet 上的信息。
也可查看相关站点列表。




HTTP 500 - 内部服务器错误
Internet Explorer  


不行啊
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 2 月 24 日 15:09:08 | 显示全部楼层
你这段前后本来就应该还有代码你没给
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2024 年 9 月 20 日 22:30 , Processed in 0.106113 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表