<% If Not Sess_Array(48) = Session.SessionID then UpdateSessions False Response.Redirect "default.asp" End If Select Case Request.Form("flag") Case 1: Call SavePP() Case 2: Call CreatePP() Case 3: Call DeletePP() End Select If isnotfree then iScheme = Request("scheme") If Len(iScheme) = 0 then iScheme = "default" isDefault = True strFees = "SELECT * FROM " & tablPfx & "Fees;" Set rs = objConn.Execute(strFees) Do While Not rs.EOF nextScheme = rs("ftype") If not nextScheme = "default" then If CStr(nextScheme) = CStr(iScheme) then selectedScheme = nextScheme isDefault = False If mysql then For a = 1 to 30 If not isNull(rs(a)) Then ppArray(a-1) = CStr(rs(a)) Next Else For a = 1 to 30 ppArray(a-1) = rs(a) Next End If selected = "selected" pID = rs("ID") Else selected = Empty End If optScheme = optScheme & "" Else: ppArray(10) = 0 End If rs.MoveNext Loop rs.close %> Default Scheme | Packages | Link to Categories | Refresh

<% Call Build_Box_Top("700", 20, "Classified Board Custom Payment Configurations", "xl") %> >
Selected Payment Scheme:
Base Price for days ad:   (base ad price without images)
Additional charge for days ad:   (in addition to base price)
Additional charge for days ad:   (in addition to base price)
 Additional charge for days ad:   (in addition to base price)
Additional charge for days ad:   (in addition to base price)
Additional charge for 1 attached image:    (in addition to base price)
Additional charge for 2 attached images:   (in addition to base price)
Additional charge for 3 attached images:   (in addition to base price)
Additional charge for 4 attached images:   (in addition to base price)
Additional charge for 5+ attached images:   (in addition to base price)
Lock Category:   (prevent posting to linked category) *
Additional charge for "What's Hot" list:   (in addition to base price)
Run Discount Campaign:   (% deducted from final price)
  <% If not isDefault then %>     <% End If %>
  New Scheme:

Create/Update custom price/duration scheme. Then link price scheme to any category: Link to Categories

All amounts entered have to have 2 digits after decimal point (1.00). The amount is in absolute units and will correspond to the currency you select on your merchant account configuration. If you plan to charge for posting ads, you should have non 0.00 value at list in the "Base Price ... " box. You then may configure the rest of the price scheme.

If you choose not to charge additional fee and have a fixed price per ad, then enter that price at "Base Price for 10 days ad" and change the rest to 0.00. 

NOTE: If you would like to allow user to post free images do one of the following:

1. Set all image fields to 0.00. The image limit user can post would be equal to the limit specified in "Admin Preferences"
2. Set first image field price to 00.00. This would reveled this filed while user posting ads but there will be no charge for this option. You can then set a price for a second, third, etc..  fields. This would allow to post one image for free and change for attaching more images.

Use may select a duration individually for each option. Enter numbers only. You can select 0 duration, to exclude current selection from the option list during ad post process. Note: If you exclude an option make sure the following by options are excluded as well. In other words start excluding from the last option and up. Do not leave excluded option in between those you have assigned a valid duration. Do not leave duration field blank either.

If you run a discount campaign, select discount %. This percentage will be deducted from the final price while users post ads.

* Lock will prevent posting to category (except Moderators) which this scheme is linked to. Members who purchased a special package can post ads in locked categories depending on individual package settings.
NOTE: Lock will only work if scheme is linked to Main Category. This category and all subcategories below it will become locked. If later on you link a different scheme to one of the subcategory below locked Main Category, and this scheme set "no" to lock category, the given subcategory will still be locked until you unlock the Main Category above it.

See "Admin Help" for more information on setting up your payment system

<% Call Build_Box_Bottom("") %>
<% Else iScheme = Request("scheme") If Len(iScheme) = 0 then iScheme = "default" strFees = "SELECT * FROM " & tablPfx & "Fees;" Set rs = objConn.Execute(strFees) Do While Not rs.EOF nextScheme = rs("ftype") If CStr(nextScheme) = CStr(iScheme) then selectedScheme = nextScheme For a = 1 to 30 ppArray(a-1) = rs(a) Next selected = "selected" pID = rs("ID") Else selected = Empty End If optScheme = optScheme & "" rs.MoveNext Loop If selectedScheme = "default" then isDefault = True rs.close %> Link to Categories | Refresh

<% Call Build_Box_Top("700", 20, "Classified Board Ads Duration", "xl") %> >
Selected Duration Scheme: *
First Option:  
Second Option:  
Third Option:  
 Forth Option:  
Fifth Option:  
Lock Category:   <% If Not isDefault then %> Prevent Posting to Category ** <% Else %> No Locking available in "default" scheme <% End If %>
  <% If not isDefault then %>     <% Else %>   <% End If %>
  New Scheme:


* "default" scheme cannot be deleted or renamed.
** Lock will prevent posting to category (except Moderators) which this scheme is linked to. Special Members (Pay Mode Only) can post ads in locked categories depending on individual settings.
NOTE: Lock will only work if scheme is linked to Main Category. This category and all subcategories below it will become locked. If later on you link a different scheme to one of the subcategory below locked Main Category, and this scheme set "no" to lock category, the given subcategory will still be locked until you unlock the Main Category above it.

<% Call Build_Box_Bottom("") %>
<% End If Sub CreatePP() newScheme = Replace(Request.Form("T1"), chr(34), "") newScheme = sqbl(newScheme) If Len(newScheme) > 0 then strFees = "SELECT * FROM " & tablPfx & "Fees WHERE ftype = '" & newScheme & "';" Set rs = objConn.Execute(strFees) If Not rs.EOF then Response.Write "
Payment scheme [" & newScheme & "] exists! Please choose different name.
" rs.close Else rs.close For I = 1 to 11 strFeesIns = strFeesIns & "pa" & I & "," If I = 11 AND Not isnotfree then strFeesInsVal = strFeesInsVal & "'" & ap & "'," Else strFeesInsVal = strFeesInsVal & "'" & sq(Request.Form("AP" & I)) & "'," End If Next strFeesIns = strFeesIns & "pa12," strFeesIns = strFeesIns & "pa16," strFeesInsVal = strFeesInsVal & sq(Request.Form("AP12")) & "," strFeesInsVal = strFeesInsVal & "'" & sq(Request.Form("AP16")) & "'," For I = 26 to 30 strFeesIns = strFeesIns & "pa" & I & "," strFeesInsVal = strFeesInsVal & sq(Request.Form("AP" & I)) & "," Next strFeesIns = strFeesIns & "ftype" strFeesInsVal = strFeesInsVal & "'" & newScheme & "'" strSQL = "INSERT INTO " & tablPfx & "Fees(" & strFeesIns & ") VALUES(" & strFeesInsVal & ");" objConn.Execute(strSQL) UpdateSessions False Response.Redirect "admin_paymentcustom.asp?scheme=" & Server.URLEncode(newScheme) End If End If End Sub Sub SavePP() updateScheme = Replace(Request.Form("T2"), chr(34), "") updateScheme = sqbl(updateScheme) If Len(updateScheme) > 0 then strFees = "SELECT * FROM " & tablPfx & "Fees WHERE (ftype = '" & updateScheme & "' AND ID <> " & Request.Form("pid") & ");" Set rs = objConn.Execute(strFees) If Not rs.EOF then Response.Write "
Payment scheme [" & updateScheme & "] exists! Please choose different name.
" rs.close Else rs.close ftype = sq(Request.Form("D1")) If Not ftype = updateScheme then objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = '" & updateScheme & "' WHERE ftype = '" & ftype & "';") objConn.Execute("UPDATE " & tablPfx & "Cat SET ftype = '" & updateScheme & "' WHERE ftype = '" & ftype & "';") End If strSQL = "UPDATE " & tablPfx & "Fees SET " strSQL = strSQL & "pa1 = '" & sq(Request.Form("AP1")) & "', " strSQL = strSQL & "pa2 = '" & sq(Request.Form("AP2")) & "', " strSQL = strSQL & "pa3 = '" & sq(Request.Form("AP3")) & "', " strSQL = strSQL & "pa4 = '" & sq(Request.Form("AP4")) & "', " strSQL = strSQL & "pa5 = '" & sq(Request.Form("AP5")) & "', " strSQL = strSQL & "pa6 = '" & sq(Request.Form("AP6")) & "', " strSQL = strSQL & "pa7 = '" & sq(Request.Form("AP7")) & "', " strSQL = strSQL & "pa8 = '" & sq(Request.Form("AP8")) & "', " strSQL = strSQL & "pa9 = '" & sq(Request.Form("AP9")) & "', " strSQL = strSQL & "pa10 = '" & sq(Request.Form("AP10")) & "', " strSQL = strSQL & "pa11 = '" & sq(Request.Form("AP11")) & "', " strSQL = strSQL & "pa12 = " & sq(Request.Form("AP12")) & ", " strSQL = strSQL & "pa16 = '" & sq(Request.Form("AP16")) & "', " strSQL = strSQL & "pa26 = " & Request.Form("AP26") & ", " strSQL = strSQL & "pa27 = " & Request.Form("AP27") & ", " strSQL = strSQL & "pa28 = " & Request.Form("AP28") & ", " strSQL = strSQL & "pa29 = " & Request.Form("AP29") & ", " strSQL = strSQL & "pa30 = " & Request.Form("AP30") & ", " strSQL = strSQL & "ftype = '" & updateScheme & "'" strSQL = strSQL & " WHERE ftype = '" & ftype & "';" objConn.Execute(strSQL) UpdateSessions False Response.Redirect "admin_paymentcustom.asp?scheme=" & Server.URLEncode(updateScheme) End If End If End Sub Sub DeletePP() ftype = sq(Request.Form("D1")) objConn.Execute("DELETE FROM " & tablPfx & "Fees WHERE ftype = '" & ftype & "';") UpdateSessions False Response.Redirect "admin_paymentcustom.asp" End Sub %>