<%
strSQL = "SELECT catID,isfree,catName FROM " & tablPfx & "Cat ORDER BY catName;"
Set rscat = objConn.Execute(strSQL)
Do while not rscat.EOF
nextcatID = rscat(0)
nextcatName = rscat(2)
nextisFree = CBool(rscat(1))
Select Case nextisFree
Case True
optCatsFree = optCatsFree & "" & vbcrLf
Case Else
optCats = optCats & "" & vbcrLf
End Select
rscat.MoveNext
Loop
rscat.close
%>
Show Payments Page |
Show Display Page
NOTE: To use package schemes you must switch
"Pay Mode" to "Package Payment Mode" in
Admin Preferences
* Sets Ads expiration date to the Package expiration date; overrides Ads
Duration setting for this package.
** Set to 0 to allow unlimited ads posted.
*** Categories are locked by linking custom payment
schemes with enabled lock to appropriate categories.
**** If this package already been purchased, clients will continue to
utilize it. But it will not be presented in the list of packages available for sale. The "Trial - Free" package ignores this setting and follows the "Enable Free Trial" setting.
Pay Categories
Free Categories
NOTE: Move appropriate categories to "Free
Post" list to allow client to post ads to those categories without having to
purchase any packages. Free categories inherit the duration scheme from the
linked payment scheme ("default" scheme assigned by default) and images limit
from the number assigned in "Admin Preferences". Once client purchased the
package however, ALL categories including "Free Post" categories would inherit
the properties of the purchased package (ad duration, image limit.. etc.).
<%
Else
Response.Write "
Not available in Free Mode
"
End If
Sub CreatePP()
newScheme = Replace(Request.Form("T1"), chr(34), "")
newScheme = sqbl(newScheme)
If Len(newScheme) > 0 then
If mysql then
strFees = "SELECT packID FROM " & tablPfx & "Pack ORDER BY packID DESC LIMIT 0,1;"
Else: strFees = "SELECT TOP 1 packID FROM " & tablPfx & "Pack ORDER BY packID DESC;"
End If
Set rs = objConn.Execute(strFees)
newPackID = CLng(rs(0)) + 1
rs.close
strPackIns = "packID,sortID,pname,descr,price,pdur,adur,isadexpire,alimit,isallowlock,nimage,isallowhot,id2co,formatname,isoffline"
strPackInsVal = newPackID & "," & newPackID & ",'" & newScheme & "','" & sq(Request.Form("AP2")) & "','"
strPackInsVal = strPackInsVal & sq(Request.Form("AP1")) & "'," & CLng(Request.Form("AP3")) & ","
strPackInsVal = strPackInsVal & CLng(Request.Form("AP4")) & "," & CLng(Request.Form("AP5")) & ","
strPackInsVal = strPackInsVal & CLng(Request.Form("AP6")) & "," & CLng(Request.Form("AP11")) & ","
strPackInsVal = strPackInsVal & CLng(Request.Form("AP7")) & ","
strPackInsVal = strPackInsVal & CLng(Request.Form("AP9")) & ",0, '" & newScheme & "',0"
strSQL = "INSERT INTO " & tablPfx & "Pack(" & strPackIns & ") VALUES(" & strPackInsVal & ");"
objConn.Execute(strSQL)
Response.Redirect "admin_paymentpack.asp?scheme=" & newPackID
End If
End Sub
Sub SavePP()
updateScheme = Replace(Request.Form("T2"), chr(34), "")
updateScheme = sqbl(updateScheme)
If Len(updateScheme) > 0 then
packID = CLng(Request.Form("pid"))
If packID = 1000 then isallowtrial = CLng(Request.Form("AP10")): Else: isallowtrial = 0
strSQL = "UPDATE " & tablPfx & "Pack SET "
strSQL = strSQL & "pname = '" & updateScheme & "', "
strSQL = strSQL & "descr = '" & sq(Request.Form("AP2")) & "', "
strSQL = strSQL & "price = '" & sq(Request.Form("AP1")) & "', "
strSQL = strSQL & "pdur = " & CLng(Request.Form("AP3")) & ", "
strSQL = strSQL & "adur = " & CLng(Request.Form("AP4")) & ", "
strSQL = strSQL & "isadexpire = " & CLng(Request.Form("AP5")) & ", "
strSQL = strSQL & "alimit = " & CLng(Request.Form("AP6")) & ", "
strSQL = strSQL & "isallowlock = " & CLng(Request.Form("AP11")) & ", "
strSQL = strSQL & "nimage = " & CLng(Request.Form("AP7")) & ", "
strSQL = strSQL & "isallowhot = " & CLng(Request.Form("AP9")) & ", "
strSQL = strSQL & "isallowtrial = " & isallowtrial & ", "
strSQL = strSQL & "id2co = " & Request.Form("AP12") & ", "
strSQL = strSQL & "formatname = '" & sq(Request.Form("T3")) & "', "
strSQL = strSQL & "isoffline = " & CLng(Request.Form("AP13"))
strSQL = strSQL & " WHERE packID = " & packID & ";"
objConn.Execute(strSQL)
Response.Redirect "admin_paymentpack.asp?scheme=" & packID
End If
End Sub
Sub DeletePP()
packID = CLng(Request.Form("pid"))
objConn.Execute("DELETE FROM " & tablPfx & "Pack WHERE packID = " & packID & ";")
Response.Redirect "admin_paymentpack.asp"
End Sub
Sub MoveCat(action)
Select Case action
Case 0
For Each form in Request.Form("D2")
objConn.Execute("UPDATE " & tablPfx & "Cat SET isfree = 1 WHERE catID = " & CLng(form) & ";")
Next
Case 1
For Each form in Request.Form("D3")
objConn.Execute("UPDATE " & tablPfx & "Cat SET isfree = 0 WHERE catID = " & CLng(form) & ";")
Next
End Select
Response.Redirect "admin_paymentpack.asp"
End Sub
%>