<% Call start_oconn() %> <% Dim catid catid = Trim(Request.QueryString("catid")) 'If catid = "" Then catid = get_catid_default() Dim seaid seaid = Trim(Request.QueryString("seaid")) If seaid = "" Then seaid = get_seaid_default() Dim subid subid = Trim(Request.QueryString("subid")) Dim ipp ipp = 9 If Trim(Request.QueryString("ipp")) <> "" Then ipp = Trim(Request.QueryString("ipp")) %> <% '////////// MAIN IMAGES \\\\\\\\\\ If subid <> "" Then If Trim(Request.QueryString("cp")) = "" Then rs = get_products_subid(regid, seaid, catid, subid, "[position], [name]") Session("RS") = rs Else rs = Session("RS") End If Else If Trim(Request.QueryString("cp")) = "" Then rs = get_products_catid(regid, seaid, catid, "[position], [name]") Session("RS") = rs Else rs = Session("RS") End If End If Dim cnt cnt = 1 cnt = Request.QueryString("cnt") Dim cp, cat_path cp = 1 If Trim(Request.QueryString("cp")) <> "" Then cp = Trim(Request.QueryString("cp")) If cp = 1 Then cnt = Ubound(rs,2) +1 cat_path = show_full_path(catid, subid) Else cat_path = Trim(Request.QueryString("cat_path")) End If Dim total_pages total_pages = RoundUp(cnt / ipp, 1) %> <%= site_name %> :: product categories
<% If Trim(catid) <> "0" And Trim(catid) <> "" Then %> <% End If %>
<% If Trim(catid) <> "0" And Trim(catid) <> "" Then %> <% Else %> <%= show_intro(seaid) %> <% End If %><%= show_category_image(seaid, catid, subid, sku) %>
<% Call end_oconn() %> <% Function show_intro(seaid) Dim SQL : SQL = "SELECT * FROM [seasons] WHERE seaid = "& seaid Dim rs : Set rs = oConn.Execute(SQL) If Not rs.EOF Then fName = Trim(rs("image")) If fName <> "" And fName <> "a" Then If UCase(Right(fName,3)) <> "SWF" Then show_intro = "" Else tmp = tmp &"" & vbNewLine tmp = tmp &"" & vbNewLine tmp = tmp &"" & vbNewLine tmp = tmp &"" & vbNewLine tmp = tmp &"" & vbNewLine show_intro = tmp End If End If End If rs.Close() Set rs = Nothing End Function %> <% Function get_catid_default() Dim SQL : SQL = "SELECT catid FROM [categories] WHERE regid = '"& Request.Cookies("regid") &"' AND [default] = 'Y'" Dim rs : Set rs = oConn.Execute(SQL) If Not rs.EOF Then get_catid_default = rs("catid") End If rs.Close() Set rs = Nothing End Function Function get_seaid_default() Dim SQL : SQL = "SELECT seaid FROM [seasons] WHERE regid = '"& regid &"' AND [default] = 'Y'" Dim rs : Set rs = oConn.Execute(SQL) If Not rs.EOF Then get_seaid_default = rs("seaid") End If rs.Close() Set rs = Nothing End Function %>