<?php
/************************************************************************
- * M-XChange v0.2.1 Start: 04/24/2005 *
- * ================ Last change: 05/19/2008 *
+ * Mailer v0.2.1-FINAL Start: 04/24/2005 *
+ * =================== Last change: 05/19/2008 *
* *
* -------------------------------------------------------------------- *
* File : what-lock_sponsor.php *
* 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 *
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__);
+ 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')) {
+ 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
}
} else {
// Cannot change status on unconfirmed or pending accounts!
- $message = getMessage('ADMIN_SPONSPOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS');
+ $message = '{--ADMIN_SPONSPOR_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)) {