X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_sponsor.php;h=0aaba4551f2699f43b469ed3efe16bacfb73b9a8;hb=2142149f3f72f1a2476f95a87937c044d63bbaf2;hp=98a72076ad5f4336ccc1ad4402fd682691a945cf;hpb=b4fff82ddb8c8b323fa84703db23fc52e8db08c1;p=mailer.git diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index 98a72076ad..0aaba4551f 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -15,19 +15,30 @@ * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * 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 * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!is_admin())) { +if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } // Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); +ADD_DESCR("admin", __FILE__); // Check if admin has submitted form if (isset($_POST['ok'])) { @@ -97,9 +108,9 @@ ORDER BY sp.pay_name", WHERE id='%s' AND status='PENDING' LIMIT 1", array($id), __FILE__, __LINE__); - // Update, if applyable, referral count and points + // Update, if applyable, referal count and points if (($refid > 0) && ($refid != $id)) { - // Update referral account + // Update referal account $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET points_amount=points_amount+%s, ref_count=ref_count+1 WHERE id='%s' LIMIT 1", @@ -107,7 +118,7 @@ WHERE id='%s' LIMIT 1", // Whas that update fine? if (SQL_AFFECTEDROWS() == 1) { - // Load referral's data + // Load referal's data $result = SQL_QUERY_ESC("SELECT id, gender, surname, family, email, (points_amount - points_used) AS points, receive_warnings, ref_count AS refs FROM "._MYSQL_PREFIX."_sponsor_data @@ -122,7 +133,7 @@ WHERE id='%s' LIMIT 1", $REFERRAL['ref_points'] = TRANSLATE_COMMA($_CONFIG['sponsor_ref_points']); $REFERRAL['gender'] = TRANSLATE_GENDER($REFERRAL['gender']); - // Send notification to referral + // Send notification to referal $REF_MSG = LOAD_EMAIL_TEMPLATE("sponsor_ref_notify", $REFERRAL); SEND_EMAIL($REFERRAL['email'], SPONSOR_REF_NOTIFY_SUBJ, $REF_MSG); }