Products Search " style="border:1px solid #FFFFFF; height:10px; line-height:10px; width:130px;"/>
Latest Products
<%set rs=Server.CreateObject("adodb.recordset") sql="select bigclassname,bigclassid from bigclass order by orderid asc,bigclassid asc" rs.open sql,conn,1,1 while not rs.eof%> <%rs.movenext wend rs.close set rs=nothing %>
"><%=rs("bigclassname")%>
Latest Products
<% dim id,sql1,keyword,rs smallclassid=request("smallclassid") bigclassid=request("bigclassid") keyword=CheckStr(SafeRequest("keyword",0)) if smallclassid<>"" then smallclassid=cint(smallclassid) end if if bigclassid<>"" then bigclassid=cint(bigclassid) end if if smallclassid="" then if bigclassid<>"" then sql1="select DefaultPicUrl1,spec,Title,id from product where bigclassid="&bigclassid else sql1="select DefaultPicUrl1,spec,Title,id from product where 1=1" end if else if smallclassid>0 then sql1="select DefaultPicUrl1,spec,Title,id from product where smallclassid="&smallclassid else if bigclassid<>"" then sql1="select DefaultPicUrl1,Title,spec,id from product where bigclassid="&bigclassid else sql1="select DefaultPicUrl1,spec,Title,id from product where 1=1" end if end if end if if keyword<>"" then sql1=sql1&" and Title like '%"&keyword&"%'" end if sql1=sql1&" order by orderid asc,id asc" Const MaxPerPage=6 dim totalPut dim CurrentPage dim TotalPages dim j if Not isempty(Request("page")) then currentPage=Cint(Request("page")) else currentPage=1 end if set rs=server.createobject("adodb.recordset") rs.open sql1,conn,1,1 if err.number<>0 then response.write "
  No products!" end if if rs.eof or rs.bof then Response.Write "
   No products!" 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,"products.asp?bigclassid="&bigclassid&"&smallclassid="&smallclassid&"&keyword="&Server.URLEncode(keyword)&"&" else if (currentPage-1)*MaxPerPage
">" width="180" height="120" border="0" /> <%=rs("title")%>
<%=cutlength(rs("spec"),250)%>
">Read More >>
<%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 if n>1 then Response.Write "
" Response.Write "

" If CurrentPage<2 Then Response.Write " First  Prev  " Else Response.Write " First  " Response.Write " Prev  " End If If n-currentpage<1 Then Response.Write " Next  last " Else Response.Write "" Response.Write " Next   Last " End If Response.Write " Page:"&CurrentPage&"/"&n&" " Response.Write " Total:"&totalnumber&" " Response.Write "GoTo:" Response.Write " " end if End Function %>