X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_coupon.php;h=af6b30d1ac6e48034d5befc6a1a653356e42ee98;hb=e88e30c24737cf641f2e93f6a311e641ccbf5960;hp=216e0261da7b6ad32f9166fb1e6ad6a46afee569;hpb=2379934be6a196a54f4155bb8e24c49b20736969;p=mailer.git diff --git a/inc/modules/admin/what-list_coupon.php b/inc/modules/admin/what-list_coupon.php index 216e0261da..af6b30d1ac 100644 --- a/inc/modules/admin/what-list_coupon.php +++ b/inc/modules/admin/what-list_coupon.php @@ -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 * @@ -51,7 +51,10 @@ if (isGetRequestElementSet('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 @@ -66,8 +69,8 @@ ORDER BY 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 = ''; @@ -79,11 +82,11 @@ ORDER BY $content['coupon_expired'] = generateDateTime($content['coupon_expired'], '2'); // Add the row template - $OUT .= loadTemplate('admin_list_coupon_usr_row', true, $content); + $OUT .= loadTemplate('admin_list_coupon_usr_row', TRUE, $content); } // END - while // Load main template - loadTemplate('admin_list_coupon_usr', false, $OUT); + loadTemplate('admin_list_coupon_usr', FALSE, $OUT); } else { // No cashed coupons found displayMessage('{--ADMIN_LIST_COUPON_404--}'); @@ -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 = ''; @@ -118,11 +121,11 @@ ORDER BY $content['coupon_expired'] = generateDateTime($content['coupon_expired'], '2'); // Add the row template - $OUT .= loadTemplate('admin_list_coupon_row', true, $content); + $OUT .= loadTemplate('admin_list_coupon_row', TRUE, $content); } // END - while // Load main template - loadTemplate('admin_list_coupon', false, $OUT); + loadTemplate('admin_list_coupon', FALSE, $OUT); } else { // No cashed coupons found displayMessage('{--ADMIN_LIST_COUPON_404--}');