📄 b2b_indexnewcp1.asp
字号:
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style1 {color: #999999}
.unnamed1 {text-decoration: none;
}
-->
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%
Const MaxPerPage=40
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(SafeRequest("page",1)) then
currentPage=Cint(SafeRequest("page",1))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 50 id,name,pic,price1,price2,adddate,stock,spic from product where stock >= 0 and recommend<>3 order by adddate desc",conn,1,1
if rs.eof And rs.bof then
Response.Write "<p align='center' class='contents'> 对不起,此分类暂时还没有商品!</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
else
currentPage=1
showContent
end if
end if
end if
sub showContent
dim i,t
i=0
t=1
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
do while not rs.eof
%>
<tr>
<%
for t=1 to 4
if not rs.eof then
%>
<td align="center"><TABLE WIDTH="140" HEIGHT="140" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD height="140" width="140" colspan="2" align="center" background="images/itembg2.jpg"><a href=b2b_cpinfo.asp?id=<% = rs("id") %> target="_blank">
<% if trim(rs("spic"))<>"" then %>
<img src=image\<% = trim(rs("spic"))%> border=0 width="<% = webimg9 %>" height="<% = webimg10 %>"></a>
<% else %>
<img src=images/emptybook.jpg border=0 width="<% = webimg9 %>" height="<% = webimg10 %>">
<% end if %> </TD>
</TR>
<tr>
<td align="center"><%=trim(rs("name"))%></td>
</tr>
<tr>
<td align="center"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td align="center">市场价:<%=trim(rs("price1"))%>元</td>
</tr>
<tr>
<td align="center">会员价:<%=trim(rs("price2"))%>元</td>
</tr>
</table></td>
</tr>
</TABLE></td>
<%
else
%>
<%
end if
if t<>4 then
rs.movenext
end if
next
%>
</tr>
<%
i=i+4
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing
end sub
Function showpage(totalnumber,maxperpage,filename)
Dim n
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If %>
<%
End Function
%>
</table></td>
</tr>
<tr>
<td><%showpage totalput,MaxPerPage,"b2b_cplist.asp"%></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -