]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-cash_coupon.php
mailer project continued:
[mailer.git] / inc / modules / member / what-cash_coupon.php
index 925b0587a5a9856b2ac9fe0dbdfe1b29fffec8f1..fedbe03e8431d1d81f0b9ad30efd6eff0a85ec02 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -37,7 +37,7 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       die();
+       exit();
 } elseif (!isMember()) {
        redirectToIndexMemberOnlyModule();
 }
@@ -54,7 +54,7 @@ if ((!isExtensionActive('coupon')) && (!isAdmin())) {
 // Is the form sent?
 if (isFormSent()) {
        // Is the coupon code entered?
-       if (isPostRequestParameterSet('coupon_code')) {
+       if (isPostRequestElementSet('coupon_code')) {
                // Search for the coupon
                $result = SQL_QUERY_ESC("SELECT
        c.`coupon_id`,
@@ -80,7 +80,7 @@ WHERE
        UNIX_TIMESTAMP(d.`coupon_expired`) > UNIX_TIMESTAMP()
 LIMIT 1",
                        array(
-                               postRequestParameter('coupon_code'),
+                               postRequestElement('coupon_code'),
                                getMemberId()
                        ), __FILE__, __LINE__);
 
@@ -103,14 +103,14 @@ WHERE
        `userid`=%s
 LIMIT 1",
                                array(
-                                       postRequestParameter('coupon_code'),
+                                       postRequestElement('coupon_code'),
                                        getMemberId()
                                ), __FILE__, __LINE__);
 
                        // Does it work?
                        if (SQL_HASZEROAFFECTED()) {
                                // Abort it here, it always must work
-                               debug_report_bug(__FILE__, __LINE__, 'User coupon cannot be updated! coupon_id=' . $content['coupon_id']);
+                               reportBug(__FILE__, __LINE__, 'User coupon cannot be updated! coupon_id=' . $content['coupon_id']);
                        } // END - if
 
                        // Update count as well
@@ -120,7 +120,7 @@ LIMIT 1",
                        // Does it work?
                        if (SQL_HASZEROAFFECTED()) {
                                // Abort it here, it always must work
-                               debug_report_bug(__FILE__, __LINE__, 'Coupon data cannot be updated! coupon_id=' . $content['coupon_id']);
+                               reportBug(__FILE__, __LINE__, 'Coupon data cannot be updated! coupon_id=' . $content['coupon_id']);
                        } // END - if
 
                        // Run post filter chain