X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-lock_sponsor.php;h=c932979a54bfed6230e5cc9325e86214ce7d07fc;hb=63f159414369b5ea19a8ca75d8cd8033c45d8341;hp=92487401521b161fecb0027c49caf872613bb19c;hpb=218f69fc35e2ff9e003324618208ec97e9cbf034;p=mailer.git diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 9248740152..c932979a54 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -14,12 +14,10 @@ * $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 * - * 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,21 +41,21 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { } // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +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__); + $result_sponsor = SQL_QUERY_ESC("SELECT `gender`,`surname`,`family`,`email`,`status` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_sponsor) == 1) { // Get sponsor's current status and let only confirmed and locked status pass $content = SQL_FETCHARRAY($result_sponsor); if (($content['status'] == 'CONFIRMED') || ($content['status'] == 'LOCKED')) { // Transfer data to constants - $content['id'] = bigintval(getRequestParameter('id')); - $content['reason'] = secureString(postRequestParameter('reason')); + $content['id'] = bigintval(getRequestElement('id')); + $content['reason'] = postRequestElement('reason'); if (isFormSent()) { // Create messages @@ -74,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')) { + 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') { @@ -105,11 +103,11 @@ if (isGetRequestParameterSet('id')) { } } else { // Cannot change status on unconfirmed or pending accounts! - $message = '{--ADMIN_SPONSPOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS--}'; + $message = '{--ADMIN_SPONSOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS--}'; } } else { - // Sponsor not found! - $message = getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id'))); + // Sponsor not found + $message = '{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}'; } // Free result @@ -121,7 +119,7 @@ if (isGetRequestParameterSet('id')) { if (!empty($message)) { // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if // [EOF]