<% dim catid,i,strcat catid=FormatSQL(SafeRequest("catid",1)) %> <% if catid="" then response.Redirect "procat.asp" response.end end if set rs=server.CreateObject("adodb.recordset") rs.open "select category from category where categoryid="&catid&" ",conn,1,1 strcat = trim(rs("category")) rs.close set rs = nothing %> <%=webname%>-商品分类
 您的位置:  <%=webname%>-><%=strcat %>->文字显示商品
<% if zuo1<>"" then %> <% end if %> <% if zuo2<>"" then %> <% end if %> <% if zuo3<>"" then %> <% end if %> <% if zuo4<>"" then %> <% end if %>
TARGET="_blank"> BORDER="0" WIDTH="160">
TARGET="_blank"> BORDER="0" WIDTH="160">
TARGET="_blank"> BORDER="0" WIDTH="160">
TARGET="_blank"> BORDER="0" WIDTH="160">
<% Const MaxPerPage=10 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") if catid="" then rs.open "select top 20 prename,company,mark,pretype,intro,other,type,viewnum,grade,predate,id,name,introduce,price1,price2,discount,productdate,pic from product order by adddate desc",conn,1,1 else rs.open "select predate,prename,company,mark,pretype,intro,name,other,type,viewnum,grade,id,introduce,price1,price2,discount,productdate,pic from product where categoryid="&catid&" order by adddate desc",conn,1,1 end if if err.number<>0 then response.write "数据库中暂时无数据" end if if rs.eof And rs.bof then Response.Write "

对不起,此分类暂时还没有商品!

" 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 showpage totalput,MaxPerPage,"cat.asp" else if (currentPage-1)*MaxPerPage <% do while not rs.eof%>
target="_blank"> <% if trim(rs("pic"))<>"" then %> border=0 width="<% = webimg9 %>" height="<% = webimg10 %>"> <% else %> <% end if %>
<% = trim(rs("prename")) %> ><%=trim(rs("name"))%>
<%=trim(rs("company"))%>:<%=trim(rs("mark"))%> <%=trim(rs("pretype"))%>:<%=trim(rs("type"))%>
<%=trim(rs("intro"))%>:<%=trim(rs("introduce"))%>
<%=trim(rs("predate"))%>:<%=trim(rs("productdate"))%> 浏览次数:<%=trim(rs("viewnum"))%> <%=trim(rs("other"))%>:<%=trim(rs("grade"))%>
市场价:¥<%=rs("price1")%>元 会 员 价:<%=rs("price2")%>元 折扣:<%=rs("discount")*10%>折
','','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"> &action=add','','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;">
<% i=i+1 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 %>
?catid=<% = catid %>> <% If CurrentPage<2 Then %>
首页 上页 <% Else %>
?page=1&catid=<% = catid %>>首页 ?page=<% = CurrentPage-1 %>&catid=<% = catid %>>上页 <% End If If n-currentpage<1 Then %> 下页 尾页 <% Else %> ?page=<% = (CurrentPage+1) %>&catid=<% = catid %>>下页 ?page=<% = n %>&catid=<% = catid %>>尾页 <% End If %> 第 <% = CurrentPage %> 页 共 <% = n %> 页 共 <% = totalnumber %> 件商品 每页 <% = maxperpage %> 件商品 转到第: >页 <% End Function %>