|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
我想改成每页两行,每行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("roModel") %>
</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("roImage1")) <> "" then
%>
<%
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
If Fs.FileExists( Server.MapPath("../Admin/Product10/ProImage1/"&RsList("roImage1"))) 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> |
|