X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fsponsor%2Fsettings.php;h=bf986e0d7b6b7fa2f098ccb5e151d70dafbe5878;hp=0ff2febb62908958f3a2c812521e4f259dab860a;hb=7b0f17cd637e388049d2167811e4332cec1e979b;hpb=a090e351c49fe021fb3064325694da03402332e0 diff --git a/inc/modules/sponsor/settings.php b/inc/modules/sponsor/settings.php index 0ff2febb62..bf986e0d7b 100644 --- a/inc/modules/sponsor/settings.php +++ b/inc/modules/sponsor/settings.php @@ -37,10 +37,10 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } elseif ((!EXT_IS_ACTIVE('sponsor')) - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'); + addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor')); return; } elseif (!IS_SPONSOR()) { // No sponsor! @@ -51,19 +51,19 @@ if (!defined('__SECURITY')) { // Data for the formular $result = SQL_QUERY_ESC("SELECT status, receive_warnings, warning_interval, email, surname, family, gender FROM `{!_MYSQL_PREFIX!}_sponsor_data` -WHERE id='%s' AND password='%s' LIMIT 1", - array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__); +WHERE `id`='%s' AND password='%s' LIMIT 1", + array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load sponsor data $content = SQL_FETCHARRAY($result); - if ($content['status'] == "CONFIRMED") { + if ($content['status'] == 'CONFIRMED') { // Check if form was submitted or not if (IS_FORM_SENT()) { // Check passwords if (!REQUEST_ISSET_POST(('password'))) { // No current password entered $message = SPONSOR_NO_CURRENT_PASSWORD_ENTERED; - } elseif (md5(REQUEST_POST('password')) != get_session('sponsorpass')) { + } elseif (md5(REQUEST_POST('password')) != getSession('sponsorpass')) { // Entered password didn't match password in DB $message = SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB; } else { @@ -106,19 +106,19 @@ if (SQL_NUMROWS($result) == 1) { } // Translate current interval into fancy string - define('__CURRENT', CREATE_FANCY_TIME($content['warning_interval'])); + define('__CURRENT', createFancyTime($content['warning_interval'])); // Output formular $OUT = LOAD_TEMPLATE("sponsor_settings_form", true, $content); } } else { // Locked or so? - $STATUS = SPONSOR_TRANSLATE_STATUS($content['status']); + $STATUS = sponsorTranslateUserStatus($content['status']); $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS)); } } else { // Sponsor account not found! - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), get_session('sponsorid'))); + $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getSession('sponsorid'))); } // Free memory