X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-lock_sponsor.php;h=d037477d15b760569bbb08b7749ec89205ad9197;hb=refs%2Fheads%2F0.2.1-FINAL;hp=dff0cb7793e00706148f1393a3e841a49422fda8;hpb=0f3a135204757cc8750262871c8e62c42300acb4;p=mailer.git diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index dff0cb7793..d037477d15 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.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 - 2016 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 * @@ -44,18 +44,18 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); $message = ''; -if (isGetRequestParameterSet('id')) { +if (isGetRequestElementSet('id')) { // Check for selected sponsor - $result_sponsor = SQL_QUERY_ESC("SELECT `gender`,`surname`,`family`,`email`,`status` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); - if (SQL_NUMROWS($result_sponsor) == 1) { + $result_sponsor = sqlQueryEscaped("SELECT `sex`, `surname`, `family`, `email`, `status` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + if (sqlNumRows($result_sponsor) == 1) { // Get sponsor's current status and let only confirmed and locked status pass - $content = SQL_FETCHARRAY($result_sponsor); + $content = sqlFetchArray($result_sponsor); if (($content['status'] == 'CONFIRMED') || ($content['status'] == 'LOCKED')) { // Transfer data to constants - $content['id'] = bigintval(getRequestParameter('id')); - $content['reason'] = postRequestParameter('reason'); + $content['id'] = bigintval(getRequestElement('id')); + $content['reason'] = postRequestElement('reason'); if (isFormSent()) { // Create messages @@ -72,17 +72,17 @@ if (isGetRequestParameterSet('id')) { } // Load email message - $message = loadEmailTemplate('lock_sponsor', $content, bigintval(getRequestParameter('id'))); + $message = loadEmailTemplate('sponsor_locked', $content, bigintval(getRequestElement('id'))); // And send it away sendEmail($content['email'], $subject, $message); // Update sponsor's account - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='%s' WHERE `id`=%s LIMIT 1", - array($content['status'], bigintval(getRequestParameter('id'))), __FILE__, __LINE__); - } elseif (isPostRequestParameterSet('no')) { + sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='%s' WHERE `id`=%s LIMIT 1", + array($content['status'], bigintval(getRequestElement('id'))), __FILE__, __LINE__); + } elseif (isPostRequestElementSet('no')) { // No don't lock / unlock now! - redirectToUrl('modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestParameter('id'))); + redirectToUrl('modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestElement('id'))); } else { // Create header and text messages if ($content['status'] == 'CONFIRMED') { @@ -96,10 +96,10 @@ if (isGetRequestParameterSet('id')) { } // Create email link - $content['email_link'] = '' . $content['gender'] . ' ' . $content['surname'] . ' ' . $content['family'] . ''; + $content['email_link'] = '' . $content['sex'] . ' ' . $content['surname'] . ' ' . $content['family'] . ''; // Display form - loadTemplate('admin_lock_sponsor', false, $content); + loadTemplate('admin_lock_sponsor', FALSE, $content); } } else { // Cannot change status on unconfirmed or pending accounts! @@ -107,11 +107,11 @@ if (isGetRequestParameterSet('id')) { } } else { // Sponsor not found - $message = '{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestParameter('id')) . '%}'; + $message = '{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}'; } // Free result - SQL_FREERESULT($result_sponsor); + sqlFreeResult($result_sponsor); } else { // Not called by what-list_sponsor.php $message = '{--ADMIN_CALL_NOT_DIRECTLY--}';