<% Server.Execute("/metatraffic/track.asp")%> <%on error resume next session.lcid=1053 if err<>0 then session.lcid=getlocale end if Response.buffer = True%> <% sMode = request.querystring("mode") sPageHead = "svensk" sPageCaption = sMode %> slsaudio.se - Bilstereo, Billjud och Bilhögtalare, DLS, Clarion och Pioneer
<% mypage = request.querystring("whichpage") If mypage = "" Then mypage = 1 End If mypagesize = request.querystring("pagesize") If mypagesize = "" Then mypagesize = 12 End If sidorperrad=12 mySQL = request.querystring("SQLquery") mainc = request.querystring("mcmode") Set rsProducts = Server.CreateObject("ADODB.Recordset") rsproducts.CursorLocation = adUseClient rsproducts.CacheSize = 20 If sMode <> "" Then mySQL = "SELECT * FROM products WHERE Category='" & sMode & "' AND MainCategory='" & mainc & "' AND IsOrdinary=1 and IsFirstProd=0 ORDER BY ItemId DESC" elseif request.querystring("mcmode")<>"" then sMode=request.querystring("mcmode") mySQL = "SELECT * FROM products WHERE MainCategory='" & sMode & "' AND Category='' and IsFirstProd=0 AND IsOrdinary=1 ORDER BY ItemId DESC" End If rsproducts.Open mySQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText If rsproducts.EOF Then %><% response.Write "Det finns inga produkter" response.Write vbCrLf %>
<% Else rsproducts.MoveFirst rsproducts.PageSize = mypagesize maxpages = CInt(rsproducts.PageCount) maxrecs = CInt(rsproducts.PageSize) rsproducts.AbsolutePage = mypage howmanyrecs = 0 rsproducts.MoveFirst %> <%Set rsInfotable=Server.CreateObject("ADODB.Recordset") if (request.querystring("mode")="") and (request.querystring("mcmode")<>"") then InfoSQL = "SELECT * FROM CategoryTable WHERE MainCategory='" & request.querystring("mcmode") & "'" rsInfotable.Open InfoSQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText If not(rsInfotable.eof and rsInfotable.bof) and (mypage=1)Then %> <% End If else InfoSQL = "SELECT * FROM CategoryTable2 WHERE MainCategory='" & request.querystring("mcmode") & "' AND Category='" & request.querystring("mode") & "'" rsInfotable.Open InfoSQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText If not(rsInfotable.eof and rsInfotable.bof) and (mypage=1) Then %> <% End If rsInfotable.close'slut end if set rsInfotable=nothing %> <% set rstext=server.createobject("ADODB.Recordset") rstext.Open "SELECT DefaultNoImage, LinktextBigPicture FROM ShopText", dbMain, adOpenStatic, adLockPessimistic, adCmdText Dim noimage, ltbp noimage=rstext("DefaultNoImage") ltbp=rstext("LinktextBigPicture") rstext.close rsproducts.close sMode = request.querystring("mode") If sMode <> "" Then tmpmySQL = "SELECT * FROM products WHERE Category='" & sMode & "' AND MainCategory='" & mainc & "' and IsFirstProd=1 AND IsOrdinary=1 ORDER BY ItemProductNumber ASC" elseif request.querystring("mcmode")<>"" then sMode=request.querystring("mcmode") tmpmySQL = "SELECT * FROM products WHERE MainCategory='" & sMode & "' AND Category='' and IsFirstProd=1 AND IsOrdinary=1 ORDER BY ItemProductNumber ASC" End If rsproducts.Open tmpmySQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText 'Response.Write rsproducts.RecordCount 'Response.end if not(rsproducts.BOF and rsproducts.EOF) and mypage=1 then %> <% else %> <% end if rsproducts.close rsproducts.Open mySQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText for i2 = 1 to mypagesize step 1 For i = 1 To (mypage - 1) Step 1 rsproducts.MoveNext Next Next %> <% End If rsproducts.Close rsproducts.Open mySQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText If maxpages > 1 Then If rsproducts.EOF = False Then %> <% 'response.Write "
<% if (rsInfotable("MainCatTitle") <> "") Then %><% End If If rsInfotable("MainCatPicture") <> "" Then MapP = Trim("" & rsInfotable("MainCatPicture")) MapP = "" response.Write "" end if If rsInfotable("MainCatDescription") <> "" Then ForstBrodTxt = rsInfotable("MainCatDescription") %><% End If %>
<%=rsInfotable("MainCatTitle")%>
" & MapP & "
<%=ForstBrodTxt%>
<% If (rsInfotable.Fields.Item("CatTitle") <> "") Then %><% End If If (rsInfotable.Fields.Item("CatPicture") <> "") Then MapP = Trim("" & rsInfotable("CatPicture")) MapP = "" response.Write "" end if If (rsInfotable.Fields.Item("CategoryDescription") <> "") Then ForstBrodTxt = rsInfotable.Fields.Item("CategoryDescription") %><% End If %>
<%response.write(rsInfotable.Fields.Item("CatTitle"))%>
" & MapP & "
<%Response.write ForstBrodTxt%>
<% if rsproducts("Category")<>"" then%>
<%response.write rsproducts("MainCategory") & " / " & rsproducts("Category") & " - sida " & mypage & " av " & maxpages%> <%else%> <%response.write rsproducts("MainCategory") & " - sida " & mypage & " av " & maxpages%> <%end if%>
<% WriteMainProd %>
 
" else Response.Write "" end if if radtest<2 then radtest=radtest+1 else radtest=0 end if rsProducts.MoveNext howmanyrecs = howmanyrecs + 1 Loop if radtest > 0 then for i = radtest to 2 Response.Write "" next end if %>
<% Do While Not (rsproducts.EOF) and (howmanyrecs < maxrecs) if radtest=0 then Response.Write "
" elseif radtest=1 then Response.Write "" else Response.Write "" end if WriteProductRow if radtest=2 then Response.Write "
<%response.write "Sidor"%>


Tillbaka till första sidan

" & vbCrLf rsproducts.Close set rsproducts=nothing Set rstemp = Nothing %>
<% dbMain.close set dbMain=Nothing %>