]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_coupon.php
Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[mailer.git] / inc / modules / admin / what-list_coupon.php
index 2f6f89c79a3c43f91710df52a6dbb862b2bae2db..cd47e625e7ff83ec4bcff59721a706aaffd00988 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 *
@@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addYouAreHereLink('admin', __FILE__);
 
-if (isGetRequestParameterSet('coupon_id')) {
+if (isGetRequestElementSet('coupon_id')) {
        // List userids for given coupon
        $result = SQL_QUERY_ESC('SELECT
        u.`coupon_id`,
@@ -51,7 +51,10 @@ if (isGetRequestParameterSet('coupon_id')) {
        UNIX_TIMESTAMP(u.`cashed_on`) AS `cashed_on`,
        UNIX_TIMESTAMP(d.`coupon_created`) AS `coupon_created`,
        UNIX_TIMESTAMP(d.`coupon_expired`) AS `coupon_expired`,
-       d.`points`, d.`total_created`, d.`total_cashed`, d.`coupon_description`
+       d.`points`,
+       d.`total_created`,
+       d.`total_cashed`,
+       d.`coupon_description`
 FROM
        `{?_MYSQL_PREFIX?}_user_coupons` AS u
 INNER JOIN
@@ -63,11 +66,11 @@ WHERE
 ORDER BY
        u.`cashed_on` DESC',
                array(
-                       bigintval(getRequestParameter('coupon_id'))
+                       bigintval(getRequestElement('coupon_id'))
                ), __FILE__, __LINE__);
 
-       // Do we have entries?
-       if (SQL_NUMROWS($result) > 0) {
+       // Are there entries?
+       if (!SQL_HASZERONUMS($result)) {
                // Init variable
                $OUT = '';
 
@@ -106,8 +109,8 @@ FROM
 ORDER BY
        d.`id` ASC', __FILE__, __LINE__);
 
-       // Do we have entries?
-       if (SQL_NUMROWS($result) > 0) {
+       // Are there entries?
+       if (!SQL_HASZERONUMS($result)) {
                // Init variable
                $OUT = '';