<%@ LANGUAGE="VBSCRIPT" %> <% strThisBackPage = "orders" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== '----------------------------------------------- 'DELETE OR ENABLE/DISABLE THE COUPON SPECIFIED '----------------------------------------------- CP_CouponCode = request.querystring("CP_CouponCode") strCallMode = request.querystring("strCallMode") Select Case strCallMode Case "delete" strQuery = strDeleteStatementSyntax & " tblCactuShopCoupons WHERE CP_CouponCode = '" & sqlsafe(CP_CouponCode) & "'" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) response.redirect("_coupons_list.asp") Case "enable" strQuery = "UPDATE tblCactuShopCoupons SET CP_Enabled='y' WHERE CP_CouponCode = '" & sqlsafe(CP_CouponCode) & "'" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) response.redirect("_coupons_list.asp?CP_CouponCode=" & CP_CouponCode) Case "disable" strQuery = "UPDATE tblCactuShopCoupons SET CP_Enabled='n' WHERE CP_CouponCode = '" & sqlsafe(CP_CouponCode) & "'" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) response.redirect("_coupons_list.asp?CP_CouponCode=" & CP_CouponCode) Case Else response.redirect("_coupons_list.asp?CP_CouponCode=" & CP_CouponCode) End Select objDataConn.Close set objDataConn = nothing %>