X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_sponsor.php;h=139ab263b6d03c619f239471ddb1e6b27570d94b;hb=ba5d5acef7f0a990271379d6344f4dce4ec50d36;hp=b750fae98e866655c817c60ad9ca438c08717763;hpb=80e58992300c82cf317ca2ed05efdeccb22ce202;p=mailer.git diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index b750fae98e..139ab263b6 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -14,8 +14,6 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009, 2010 by Mailer Developer Team * @@ -43,7 +41,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { } // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +addYouAreHereLink('admin', __FILE__); // Check if admin has submitted form if (isFormSent()) { @@ -61,7 +59,9 @@ if (isFormSent()) { $result_main = SQL_QUERY_ESC("SELECT `id`, `gender`, `surname`, `family`, `email`, `remote_addr`, UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`, - `points_amount`, `points_used`, `refid` + `points_amount`, `points_used`, + (`points_amount` + `points_used`) AS `points`, + `refid` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE @@ -75,9 +75,6 @@ LIMIT 1", // Load data $content = SQL_FETCHARRAY($result_main); - // Add total amount - $content['points'] = ($content['points_amount'] - $content['points_used']); - // Check for open payments and close them $result = SQL_QUERY_ESC("SELECT so.admin_id, so.pay_count, @@ -158,7 +155,7 @@ LIMIT 1", array(bigintval($content['refid'])), __FILE__, __LINE__); // Whas that update fine? - if (SQL_AFFECTEDROWS() == 1) { + if (!SQL_HASZEROAFFECTED()) { // Load referal's data $result = SQL_QUERY_ESC("SELECT `id`, `gender`, `surname`, `family`, `email`,