<% classname=Request.Querystring("classname") if instr(classname,"'") or instr(classname,"select") or instr(classname,"in") or instr(classname,"from") or instr(classname,"len") or instr(classname,"where") or instr(classname,"or") or instr(classname,"and") then Response.Write("") Response.End end if key=Request("key") 'response.Write(key) if len(key)=0 then if classname="" or isnull(classname) then sql="select * from imgbook order by ID desc" else sql="select * from imgbook where classname='"&classname&"' order by ID desc" end if url="allproduct.asp?classname=" & classname else 'if key has content if classname="" or isnull(classname) then sql="select * from imgbook where title like '%"&key&"%' order by ID desc" url="allproduct.asp?key=" & key else sql="select * from imgbook where title like '%"&key&"%' and classname='"&classname&"' order by ID desc" url="allproduct.asp?classname=" & classname &"&key=" & key end if end if %> Sirius Industry
Who we areLeatherQuality controlWarrantyFAQPrivacyContact Us
All ProductsStationary SofasKnock/Down SofasReclining SofasSectional Sofas
  :::: Hot Sofas :::: <% dim sqlhot sqlhot = "select * from imgbook order by click desc" set rs = server.CreateObject ("adodb.recordset") rs.open sqlhot,conn,1,1 Response.Write("") do while not rs.eof response.write"
" img=rs("news_content") if instr(img,"[img]") then img = Replace(img, "[img]", "Click for more details...") else img = Replace(img, "[uploadimg]", "Click for more details...") end if Response.Write("
") Response.Write("
") Response.Write(""&img&"") Response.Write("
Model: " & rs("title") & "


") bhot=bhot+1 rs.movenext if bhot>=4 then exit do loop rs.close set rs=nothing response.write "
" %>

SIRIUS:: Products

<% set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if rs.bof and rs.eof then rsclose() connclose() '------------->no record, close connection(BOF=true) Response.Write("



Sorry, there is no picture!
") else PageShowSize = 10 MyPageSize = img If Not IsNumeric(Request.querystring("page")) Or IsEmpty(Request.querystring("page")) Or Request.querystring("page") <=0 Then MyPage=1 Else MyPage=Int(Abs(Request.querystring("page"))) End if rs.pagesize=mypagesize maxpages=rs.pagecount rs.absolutepage=mypage total=rs.recordcount Response.Write("

") do while not rs.eof response.write"" for i=1 to cel img=rs("news_content") if instr(img,"[img]") then img = Replace(img, "[img]", "Click for more details...") else img = Replace(img, "[uploadimg]", "Click for more details...") end if Response.Write("") rs.movenext if rs.eof or i=MyPageSize then '------>add this, when pointing to the last record, exit loop exit do '------>but find a problem, if there are only two pictures, then show each each page end if '------>picture, now the page will show two pictures, to avoid this case, so add this next '------->if i=MyPageSize then exit do avoid any problem ^!^ response.write "" j=j+1 if j=rows then exit do '------------>if j=rows, then exit loop loop response.write "
") Response.Write("
"&rs("title")&"
") Response.Write(""&img&"") Response.Write("

" & rs("title") & "
" PageNextSize=int((MyPage-1)/PageShowSize)+1 Pagetpage=int((total-1)/rs.PageSize)+1 if PageNextSize >1 then PagePrev=PageShowSize*(PageNextSize-1) Response.write "9 " 'Response.write "First Page " end if if MyPage-1 > 0 then Prev_Page = MyPage - 1 Response.write "7 " end if if Maxpages>=PageNextSize*PageShowSize then PageSizeShow = PageShowSize Else PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1) End if If PageSizeShow < 1 Then PageSizeShow = 1 for PageCounterSize=1 to PageSizeShow PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize if PageLink <> MyPage Then Response.write "[" & PageLink & "] " else Response.Write "["& PageLink &"] " end if If PageLink = MaxPages Then Exit for Next if Mypage+1 <=Pagetpage then Next_Page = MyPage + 1 Response.write "8" end if if MaxPages > PageShowSize*PageNextSize then PageNext = PageShowSize * PageNextSize + 1 'Response.write " Last Page" Response.write " :" End if rsclose() connclose() end if %>