<%'on error resume next session.lcid=1053 if err<>0 then session.lcid=getlocale end if%>

<% c = request.querystring("mode") mainc = request.querystring("mcmode") set rstext = dbMain.execute("SELECT MainCategory FROM ShopText") %> <% rstext.close set rstext=nothing %>
&back=<%response.write request.querystring("back")%>" method="post" target='Main'>  
<%response.write(uCase(rstext("MainCategory")))%>
<% set rsproducts = dbMain.execute("SELECT DISTINCT MainCategory FROM products WHERE IsOrdinary=1 ORDER BY MainCategory Asc") Do while not(rsproducts.eof) set rsproducts2 = dbMain.execute("SELECT DISTINCT Category FROM products WHERE IsOrdinary=1 AND MainCategory = '" & rsproducts("MainCategory") & "' AND NOT Category = '' ORDER BY Category Asc") if (rsproducts2.bof and rsproducts2.eof) then %> <% else %> <% if (((mainc<>"") or (c<>"")) and (request.querystring("back")="")) and rsproducts("MainCategory")=mainc then do while not(rsproducts2.eof) %> <% rsproducts2.movenext loop rsproducts2.close set rsproducts2 = dbMain.execute("SELECT DISTINCT Category FROM products WHERE IsOrdinary=1 AND MainCategory = '" & rsproducts("MainCategory") & "' AND Category = ''") if not(rsproducts2.bof and rsproducts2.eof) then %> <% end if end if end if rsproducts2.Close() set rsproducts2 = nothing rsproducts.movenext loop rsproducts.close() set rsproducts=nothing %>
<% 'Butikslänkar %> <% set rsg=server.CreateObject("ADODB.Recordset") rsg.Open "Select * from CustomPages2", dbMain, adOpenStatic, adLockOptimistic if not(rsg.BOF and rsg.EOF) then rsg.movefirst end if for i=1 to rsg.recordcount if rsg("LinkName")<>"" then %> <% end if if not rsg.EOF then rsg.movenext end if next rsg.close rsg.Open "Select * from CustomPages", dbMain, adOpenStatic, adLockOptimistic if not(rsg.BOF and rsg.EOF) then rsg.movefirst end if for i=1 to rsg.recordcount if rsg("LinkName")<>"" then %> <% end if if not rsg.EOF then rsg.movenext end if next rsg.close rsg.Open "Select * from Linktable", dbMain, adOpenStatic, adLockOptimistic if not(rsg.BOF and rsg.EOF) then rsg.movefirst end if for i=1 to rsg.recordcount if rsg("UrlLink")<>"" then %> <% end if if not rsg.EOF then rsg.movenext end if next rsg.close set rsg=nothing dbMain.close set dbMain=nothing %>