X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-lock_sponsor.php;h=9bc268ee728c277b817de33b330c2e73d0336609;hb=0ddf8f6c578aa2c1ff1db9fb8eb0b93a1e247b73;hp=784c9cc8d945bbb439519aa91f960966b903cf85;hpb=8f63845c24854e5155c6624223c091d30399a96a;p=mailer.git diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 784c9cc8d9..9bc268ee72 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -14,10 +14,9 @@ * $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 * * * * This program is free software; you can redistribute it and/or modify * @@ -45,56 +44,55 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); $message = ''; -if (isGetRequestElementSet('id')) { +if (isGetRequestParameterSet('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(getRequestElement('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(getRequestParameter('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['gender'] = translateGender($content['gender']); - $content['id'] = bigintval(getRequestElement('id')); - $content['reason'] = secureString(postRequestElement('reason')); + $content['id'] = bigintval(getRequestParameter('id')); + $content['reason'] = secureString(postRequestParameter('reason')); if (isFormSent()) { // Create messages if ($content['status'] == 'CONFIRMED') { // Message when sponsor's account got lock - $content['message'] = getMessage('SPONSOR_ACCOUNT_LOCKED'); - $subject = getMessage('SPONSOR_SUBJECT_LOCKED'); + $content['message'] = '{--SPONSOR_ACCOUNT_LOCKED--}'; + $subject = '{--SPONSOR_LOCKED_SUBJECT--}'; $content['status'] = 'LOCKED'; } else { // Message when sponsor's account got unlock - $content['message'] = getMessage('SPONSOR_ACCOUNT_UNLOCKED'); - $subject = getMessage('SPONSOR_SUBJECT_UNLOCKED'); + $content['message'] = '{--SPONSOR_ACCOUNT_UNLOCKED--}'; + $subject = '{--SPONSOR_UNLOCKED_SUBJECT--}'; $content['status'] = 'CONFIRMED'; } // Load email message - $message = loadEmailTemplate('lock_sponsor', $content, bigintval(getRequestElement('id'))); + $message = loadEmailTemplate('lock_sponsor', $content, bigintval(getRequestParameter('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(getRequestElement('id'))), __FILE__, __LINE__); - } elseif (isPostRequestElementSet('no')) { + 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')) { // No don't lock / unlock now! - redirectToUrl('modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestElement('id'))); + redirectToUrl('modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestParameter('id'))); } else { // Create header and text messages if ($content['status'] == 'CONFIRMED') { // Messages when sponsor's account is confirmed - $content['header_message'] = getMessage('SPONSOR_LOCK_SPONSOR_HEADER'); - $content['text_message'] = getMessage('SPONSOR_LOCK_SPONSOR_TEXT'); + $content['header_message'] = '{--SPONSOR_LOCK_SPONSOR_HEADER--}'; + $content['text_message'] = '{--SPONSOR_LOCK_SPONSOR_TEXT--}'; } else { // Messages when sponsor's account is locked - $content['header_message'] = getMessage('SPONSOR_UNLOCK_SPONSOR_HEADER'); - $content['text_message'] = getMessage('SPONSOR_UNLOCK_SPONSOR_TEXT'); + $content['header_message'] = '{--SPONSOR_UNLOCK_SPONSOR_HEADER--}'; + $content['text_message'] = '{--SPONSOR_UNLOCK_SPONSOR_TEXT--}'; } // Create email link @@ -105,18 +103,18 @@ if (isGetRequestElementSet('id')) { } } else { // Cannot change status on unconfirmed or pending accounts! - $message = getMessage('ADMIN_SPONSPOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS'); + $message = '{--ADMIN_SPONSOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS--}'; } } else { // Sponsor not found! - $message = sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id'))); + $message = getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id'))); } // Free result SQL_FREERESULT($result_sponsor); } else { // Not called by what-list_sponsor.php - $message = getMessage('ADMIN_CALL_NOT_DIRECTLY'); + $message = '{--ADMIN_CALL_NOT_DIRECTLY--}'; } if (!empty($message)) {