<% Server.Execute("/metatraffic/track.asp")%> <%'on error resume next session.lcid=1053 if err<>0 then session.lcid=getlocale end if%> <% sPageHead ="svensk" sPageCaption = cdate(date) session("redirectto") = "main.asp" session("salecomplete") = False %> slsaudio.se - Pioneer, Clarion DLS, Veba och Mp3
<% mypage=Request.querystring("whichpage") If mypage = "" Then mypage = 1 End If mypagesize = Request.querystring("pagesize") If mypagesize = "" Then mypagesize = 12 End If sidorperrad = 13 mySQL = Request.querystring("SQLquery") 'if mySQL = "" then if request.querystring("mcmode")="" then Set rsmprods = Server.CreateObject("ADODB.Recordset") rsmprods.CursorLocation = adUseClient rsmprods.CacheSize = 20 rsmprods.Open "select * from FirstPageProds", dbMain, adOpenStatic, adLockPessimistic, adCmdText else set rsproducts = server.CreateObject("ADODB.Recordset") 'rsproducts.Open "SELECT * FROM products WHERE beginspecial <= #" & Date & "#" & " AND endspecial >= #" & Date & "# AND MainCategory='" & request.querystring("mcmode") & "' AND IsOrdinary=1", dbMain, adOpenStatic, adLockPessimistic, adCmdText rsproducts.Open "SELECT * FROM products WHERE MainCategory='" & request.querystring("mcmode") & "' AND IsOrdinary=1 order by ItemName ASC", dbMain, adOpenStatic, adLockPessimistic, adCmdText if not(rsproducts.bof and rsproducts.eof) then rsProducts.movefirst rsproducts.PageSize = mypagesize maxpages = abs(int(-(rsproducts.PageCount/2))) maxrecs = CInt(rsproducts.PageSize) rsproducts.AbsolutePage = mypage howmanyrecs = 0 rsproducts.MoveFirst end if for i2 = 1 to mypagesize step 1 For i = 1 To (mypage - 1) Step 1 rsproducts.MoveNext 'rsproducts.MoveNext Next Next end if if mySQL<>"" then rsproducts.Open mySQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText if not(rsproducts.bof and rsproducts.eof) then rsProducts.movefirst rsproducts.PageSize = mypagesize maxpages = abs(int(-(rsproducts.PageCount/2))) maxrecs = CInt(rsproducts.PageSize) rsproducts.AbsolutePage = mypage howmanyrecs = 0 rsproducts.MoveFirst end if for i2 = 1 to mypagesize step 1 For i = 1 To (mypage - 1) Step 1 rsproducts.MoveNext 'rsproducts.MoveNext Next Next end if 'else'end if %> <% Set rsInfotable = Server.CreateObject("ADODB.Recordset") if request.querystring("mcmode")="" then InfoSQL = "SELECT * FROM Infotable" rsInfotable.Open InfoSQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText If not(rsInfotable.eof and rsInfotable.bof) Then %> <% End if elseif mypage=1 then InfoSQL = "SELECT * FROM CategoryTable WHERE MainCategory='" & request.querystring("mcmode") & "'" rsInfotable.Open InfoSQL, dbMain, adOpenStatic, adLockPessimistic, adCmdText If not(rsInfotable.eof and rsInfotable.bof) Then %> <% End If rsInfotable.close end if set rstext=server.createobject("ADODB.Recordset") rstext.Open "SELECT * FROM ShopText", dbMain, adOpenStatic, adLockPessimistic, adCmdText %> <%dim noimage, ltbp noimage=rstext("DefaultNoImage") ltbp=rstext("LinktextBigPicture") rstext.close 'Här loopas produkterna: ' for i2 = 1 to mypagesize step 1 ' For i = 1 To (mypage - 1) Step 1 ' rsmprods.MoveNext ' rsmprods.MoveNext ' Next ' Next ''rsmprods.MoveFirst if Request.QueryString("mcmode")="" then set rsproducts=server.CreateObject("ADODB.Recordset") if rsmprods("MainProd")<>"" then rsproducts.Open "SELECT * FROM products where itemproductnumber='" & rsmprods("MainProd") & "'", dbMain, adOpenStatic, adLockPessimistic, adCmdText if not(rsproducts.BOF and rsproducts.EOF) then %> <% end if rsproducts.close end if end if %> <% set rsproducts=nothing if maxpages>1 then 'if rsmprods.eof = false then %>
<% rsInfotable.MoveFirst If rsInfotable.Fields("FirstPageHead").Value <> "" Then ForstRub = rsInfotable("FirstPageHead") %><% End If if rsInfotable("FirstPagePic")<>"" then %><% end if If rsInfotable.Fields("FirstPageText").Value <> "" Then response.write "<% End If %>
<%=ForstRub%>
" ForstBrodTxt = rsInfotable("FirstPageText") %>
<%=ForstBrodTxt%>
<% 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%>
<% WriteMainProd %>
" else Response.Write "" end if if radtest<2 then radtest=radtest+1 else radtest=0 end if end if rsproducts.close end if next else Do While Not (rsproducts.EOF) and (howmanyrecs < maxrecs) if radtest=0 then Response.Write "" 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 rsproducts.close end if %>
<% radtest=0 if Request.QueryString("mcmode") = "" then for mainind=1 to 12 if rsmprods("Prod" & mainind)<>"" then rsproducts.Open "SELECT * FROM products where itemproductnumber='" & rsmprods("Prod" & mainind) & "'", dbMain, adOpenStatic, adLockPessimistic, adCmdText if not(rsproducts.BOF and rsproducts.EOF) then if radtest=0 then Response.Write "
" elseif radtest=1 then Response.Write "" else Response.Write "" end if WriteProductRow if radtest=2 then Response.Write "
" elseif radtest=1 then Response.Write "" else Response.Write "" end if WriteProductRow if radtest=2 then Response.Write "
<%response.write "Sidor"%>
<% 'end if pad = "" scriptname = request.servervariables("script_name") ind = request.querystring("indx") if ind >0 then ref="" & "<< " & ((sidorperrad * (CInt(ind) - 1)) + 1) & " - " & (sidorperrad * CInt(ind)) & "" response.Write ref & " " End If for counter=(1 + (cint(ind)*sidorperrad)) to maxpages If Counter = (1 + (CInt(ind) * sidorperrad)) Then Response.Write " [ " End If If Counter = Int(mypage) Then %> <%response.write counter%> <% Else ref = "" & Counter & " " response.Write ref End If If ((counter )=((cint(ind)*cint(sidorperrad))+cint(sidorperrad))) or (counter=maxpages) then Response.Write " ] " Exit For End If Next If ((counter )=((cint(ind)*cint(sidorperrad))+cint(sidorperrad))) and counter maxpages Then ref = ref & "'>" & (CInt(Counter) + 1) & " - " & maxpages & " >>" & "" Else ref=ref & " '>" & (cint(counter)+1) & " - " & (cint(counter) + cint(sidorperrad)) & " >>" & "" End If response.Write ref & "" 'exit for End If End If set rsInfotable=nothing if Request.QueryString("mcmode") = "" then rsmprods.Close 'ny test set rsmprods=nothing end if %>
<% dbMain.close set dbMain=Nothing %>