<% Response.Expires = -1000 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl="no-cache" Sess_Array(14) = Empty Sess_Array(10) = Empty Sess_Array(12) = Empty Sess_Array(1) = Empty Sess_Array(46) = Empty Sess_Array(2) = 0 Sess_Array(36) = Empty If Sess_Array(29) = 0 then UpdateSessions True Response.Redirect "register.asp" End If If isnotfree And ispack And Not CBool(Sess_Array(35)) then Set rscat = objConn.Execute("SELECT ID FROM " & tablPfx & "Cat WHERE isfree = 1;") If Not rscat.EOF then isFreeCats = True rscat.close If Sess_Array(30) = 0 then If isFreeCats then showOnlyFree = True Else UpdateSessions True Response.Redirect "info.asp?id=1" End If Else packID = Sess_Array(30) Set rspack = objConn.Execute("SELECT alimit FROM " & tablPfx & "Pack WHERE packID = " & packID & ";") If not rspack.EOF then alimit = CLng(rspack(0)) If Not alimit = 0 And CLng(Sess_Array(28)) >= alimit then rspack.close UpdateSessions True Response.Redirect "info.asp?id=3&limit=" & alimit End If End If End If End If If isnotfree then redirPage = "post_start.asp" Else: redirPage = "post_new.asp" End If If Not isPack and CLng(Sess_Array(28)) >= ap then UpdateSessions True Response.Redirect "info.asp?id=2" End If msg = msgGeneral If Request.Form("flag") = 1 then as_ALL_ID = Request.Form("D1") If Len(as_ALL_ID) > 0 then as_IDArray = Split(as_ALL_ID, "|") Select Case UBound(as_IDArray) Case 1 catID = as_IDArray(0) scatID = as_IDArray(1) Case 2 catID = as_IDArray(0) scatID = as_IDArray(1) cat3rdID = as_IDArray(2) End Select End If If not catID = Empty And not scatID = Empty And isNumeric(catID) And isNumeric(scatID) then Sess_Array(24) = CLng(catID) Sess_Array(25) = CLng(scatID) set rs = objConn.Execute("SELECT " & tablPfx & "Scat.scatName," & tablPfx & "Cat.catName," & tablPfx & "Cat.pricelevel FROM " & tablPfx & "Scat," & tablPfx & "Cat WHERE " & tablPfx & "Scat.sCatID = " & CLng(scatID) & " AND " & tablPfx & "Cat.catID = " & CLng(catID) & ";") If not rs.EOF then Sess_Array(41) = rs(0) Sess_Array(40) = rs(1) Sess_Array(19) = rs(2) Sess_Array(37) = "" & rs(1) & " > " & rs(0) & "" rs.close Sess_Array(23) = Empty Sess_Array(39) = Empty If Not cat3rdID = Empty And isNumeric(cat3rdID) then cat3rdID = CLng(cat3rdID) set rs = objConn.Execute("SELECT scatName FROM " & tablPfx & "Scat WHERE scatID = " & cat3rdID & " AND catID = " & CLng(scatID) & ";") If Not rs.EOF then Sess_Array(23) = cat3rdID Sess_Array(39) = rs(0) Sess_Array(37) = Sess_Array(37) & " > " & rs(0) & "" End If rs.close End If UpdateSessions True Response.Redirect redirPage Else rs.close stopError = True End If Else: stopError = True End If End If If stopError then msg = msg & msgError Sess_Array(40) = Empty Sess_Array(41) = Empty Sess_Array(24) = Empty Sess_Array(25) = Empty Sess_Array(39) = Empty Sess_Array(23) = Empty End If switchedCat = CStr(Request("id")) If Len(switchedCat) > 0 AND isNumeric(switchedCat) then selected_cat = switchedCat Else If Sess_Array(24) > 0 then selected_cat = Sess_Array(24) If Sess_Array(25) > 0 then selected_cat = selected_cat & "|" & Sess_Array(25) If Sess_Array(23) > 0 then selected_cat = selected_cat & "|" & Sess_Array(23) End If Call Build_Box_Top("400", 20, strText_SelectCategory, "xl") %>
<%= msg %>
<% If Not noBuilt then %>
<%= buildALLCategories(selected_cat) %>
<% End If Call Build_Box_Bottom("") Function buildALLCategories(selected) If Len(selected) > 0 then catID = CStr(Split(selected, "|")(0)) End If Select Case CBool(Sess_Array(35)) Case True: strSQL = "SELECT catID, catName FROM " & tablPfx & "Cat ORDER BY " & cat_sortorder & ";" Case Else If ispack Or Not isnotfree then If showOnlyFree then strSQL = "SELECT catID, catName FROM " & tablPfx & "Cat WHERE isfree = 1 ORDER BY " & cat_sortorder & ";" Else strSQL = "SELECT catID,catName FROM " & tablPfx & "Cat LEFT JOIN " strSQL = strSQL & tablPfx & "Fees ON (" & tablPfx & "Cat.ftype = " & tablPfx & "Fees.ftype) " strSQL = strSQL & "WHERE " & tablPfx & "Fees.pa11 <> '1' ORDER BY " & tablPfx & "Cat." & cat_sortorder & ";" End If Else strSQL = "SELECT catID,catName FROM " & tablPfx & "Cat LEFT JOIN " strSQL = strSQL & tablPfx & "Fees ON (" & tablPfx & "Cat.ftype = " & tablPfx & "Fees.ftype) " strSQL = strSQL & "WHERE " & tablPfx & "Fees.pa11 <> '1' ORDER BY " & tablPfx & "Cat." & cat_sortorder & ";" End If End Select If ispack And Sess_Array(30) > 0 Then Set rspack = objConn.Execute("SELECT isallowlock FROM " & tablPfx & "Pack WHERE packID = " & CLng(Sess_Array(30)) & ";") If not rspack.EOF then If CLng(rspack("isallowlock")) = 1 then strSQL = "SELECT catID, catName FROM " & tablPfx & "Cat ORDER BY " & cat_sortorder & ";" End If rspack.close End If Set rsCat = objConn.Execute(strSQL) If not rsCat.EOF then strCategories = "

" & vbcrLf End If rsCat.close If Len(catID) > 0 AND Len(catID) < 7 AND isNumeric(catID) then strCategories = strCategories & strText_SubmitAdto & "


" & vbcrLf End If buildALLCategories = strCategories End Function %>