<% If Not session("admin_loggedin" & strSUnique) = Session.SessionID then Response.Redirect "default.asp" If lcase(Request.ServerVariables("REQUEST_METHOD")) = "post" then Select Case Request.Form("Flag") Case 1 catID = CLng(Request.Form("D1")) ftype = CStr(Request.Form("D4")) objConn.Execute("UPDATE " & tablPfx & "Cat SET ftype = '" & ftype & "' WHERE catID = " & catID & ";") If mysql then objConn.Execute("UPDATE " & tablPfx & "Scat as t1 LEFT JOIN " & tablPfx & "Scat as t2 ON(t1.catID = " & catID & " AND t2.catID = t1.sCatID) " & _ "SET t1.ftype = '" & ftype & "', t2.ftype = '" & ftype & "' WHERE (t1.catID = " & catID & " OR t2.catID = t1.sCatID);") Else objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = '" & ftype & "' WHERE (catID = " & catID & " OR catID = (SELECT TOP 1 sCatID FROM " & tablPfx & "Scat WHERE catID = " & catID & "));") End If Case 2 scatID = CLng(Request.Form("D2")) ftype = CStr(Request.Form("D5")) objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = '" & ftype & "' WHERE (sCatID = " & scatID & " OR catID = " & scatID & ");") Case 3 cat3rdID = CLng(Request.Form("D3")) ftype = CStr(Request.Form("D6")) objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = '" & ftype & "' WHERE sCatID = " & cat3rdID & ";") Case 4 objConn.Execute("UPDATE " & tablPfx & "Cat SET ftype = 'default';") objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = 'default';") End Select Response.Redirect "admin_paymentlink.asp?" & Request.Querystring End If If isNumeric(Request("cid")) then querycatID = CLng(Request("cid")): Else: querycatID = 0 If isNumeric(Request("sid")) then querysubcatID = CLng(Request("sid")): Else: querysubcatID = 0 If isNumeric(Request("3id")) then query3rdcatID = CLng(Request("3id")): Else: query3rdcatID = 0 strCat = "SELECT catID,catName,ftype FROM " & tablPfx & "Cat ORDER BY catName;" Set rs = objConn.Execute(strCat) If not rs.EOF then I = 1 Do While Not rs.EOF currentID = rs("catID") currentName = rs("catName") If I = 1 And querycatID = 0 then querycatID = currentID If CStr(querycatID) = CStr(currentID) then optCat = optCat & "" & vbcrlf catFtype = rs("ftype") Else: optCat = optCat & "" & vbcrlf End If I = I + 1 rs.MoveNext Loop End If rs.close strSCat = "SELECT sCatID,scatName,ftype FROM " & tablPfx & "Scat WHERE catID=" & querycatID & " ORDER BY sCatID;" Set rs = objConn.Execute(strSCat) If not rs.EOF then I = 1 Do While Not rs.EOF currentSubID = rs("sCatID") currentSubName = rs("scatName") If I = 1 And querysubcatID = 0 then querysubcatID = currentSubID If CStr(currentSubID) = CStr(querysubcatID) then optSubCat = optSubCat & "" scatFtype = rs("ftype") Else: optSubCat = optSubCat & "" End If I = I + 1 rs.MoveNext Loop End If rs.close strSCat = "SELECT sCatID,scatName,ftype FROM " & tablPfx & "Scat WHERE catID=" & querysubcatID & " ORDER BY sCatID;" Set rs = objConn.Execute(strSCat) If not rs.EOF then I = 1 Do While Not rs.EOF current3rdID = rs("sCatID") current3rdName = rs("scatName") If I = 1 And query3rdcatID = 0 then query3rdcatID = current3rdID If CStr(current3rdID) = CStr(query3rdcatID) then opt3rdCat = opt3rdCat & "" cat3rdFtype= rs("ftype") Else: opt3rdCat = opt3rdCat & "" End If rs.MoveNext I = I + 1 Loop Else disable3rd = "disabled" End If rs.close If checkDefault(catFtype) then catFtype = "default" If checkDefault(scatFtype) then scatFtype = "default" If checkDefault(cat3rdFtype) then cat3rdFtype = "default" strFees = "SELECT ftype FROM " & tablPfx & "Fees;" Set rs = objConn.Execute(strFees) Do While Not rs.EOF nextFtype = rs(0) opttypeSel = "" & vbcrlf opttype = "" & vbcrlf If nextFtype = catFtype then strCatFtypeOpt = strCatFtypeOpt & opttypeSel Else: strCatFtypeOpt = strCatFtypeOpt & opttype End If If nextFtype = scatFtype then strSCatFtypeOpt = strSCatFtypeOpt & opttypeSel Else: strSCatFtypeOpt = strSCatFtypeOpt & opttype End If If nextFtype = cat3rdFtype then str3rdCatFtypeOpt = str3rdCatFtypeOpt & opttypeSel Else: str3rdCatFtypeOpt = str3rdCatFtypeOpt & opttype End If rs.MoveNext Loop rs.close %>
Custom Scheme | <% If isnotfree then Response.Write "Default Scheme | Packages | " %> Refresh

Category - Scheme Links
<% If len(opt3rdCat) > 0 then %> <% Else: Response.Write "" End If %>
       
Current Category: 
Current Subcategory: 
Current 3-rd Level: 
Current 3-rd Level:  No 3-rd Level Created  
     

NOTE: Schemes Linked to Main Categories become transparent to the entire tree under it (subcategories, 3-rd level categories). If you for instance link "Business" scheme to Main Category "Business  Opportunities", all subcategories and 3-rd level under category "Business Opportunities" would inherit this scheme. The same is true when you link a scheme to subcategory - all 3rd levels under this subcategory would inherit the linked scheme. However, if you're linking a scheme to some subcategory, this scheme will take precedence and be selected over the scheme linked to the main category above it when ads are posted under this subcategory. The same is true for 3-rd Level.

In other words start from the top, linking the scheme - mostly used throughout categories on your board to Main Categories and work your way down linking other schemes to subcategories and 3-rd levels.

If you create a new subcategory/3-rd level, is does not automatically inherit a custom scheme from Main category (if linked) and will stay "default" until you explicitly create a link. To save the hassle, create a complete categories structure and then start linking schemes.

For more info see: Admin Help