X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-edit_sponsor.php;h=1230f036bc28560c04f56d22f77438e93ec76a71;hb=995488beda665a1fc3de65df95f2d1ae236d1245;hp=85e2753691e135d7e5c501663e1ecb02bd8f0475;hpb=d3c4fdd9bfab35389e1a5ff48f3952d527c7b4bb;p=mailer.git diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index 85e2753691..1230f036bc 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -1,7 +1,7 @@ 0) { + if (bigintval(postRequestParameter('points')) > 0) { // Replace german decimal comma with computer's decimal dot - $points = bigintval(convertCommaToDot(postRequestElement('points'))); + $points = bigintval(convertCommaToDot(postRequestParameter('points'))); // Add points to account SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_amount`=`points_amount`+%s WHERE `id`='%s' LIMIT 1", - array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array($points, bigintval(getRequestParameter('id'))), __FILE__, __LINE__); // Remember points /reason for the template $content['points'] = translateComma($points); - $content['reason'] = secureString(postRequestElement('reason')); + $content['reason'] = secureString(postRequestParameter('reason')); // Send email $message = loadEmailTemplate('sponsor_add_points', $content); @@ -109,17 +110,17 @@ LIMIT 1", break; case 'sub_points': // Subtract points - if (bigintval(postRequestElement('points')) > 0) { + if (bigintval(postRequestParameter('points')) > 0) { // Replace german decimal comma with computer's decimal dot - $points = bigintval(convertCommaToDot(postRequestElement('points'))); + $points = bigintval(convertCommaToDot(postRequestParameter('points'))); // Add points to account SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_used`=`points_used`+%s WHERE `id`='%s' LIMIT 1", - array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array($points, bigintval(getRequestParameter('id'))), __FILE__, __LINE__); // Remember points /reason for the template $content['points'] = translateComma($points); - $content['reason'] = secureString(postRequestElement('reason')); + $content['reason'] = secureString(postRequestParameter('reason')); // Send email $message = loadEmailTemplate('sponsor_sub_points', $content); @@ -133,10 +134,10 @@ LIMIT 1", case 'edit': // Edit sponsor account $PASS = true; - if ((postRequestElement('pass1') != postRequestElement('pass2')) || ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass1')))) { + if ((postRequestParameter('pass1') != postRequestParameter('pass2')) || ((!isPostRequestParameterSet('pass1')) && (!isPostRequestParameterSet('pass1')))) { // Remove passwords - unsetPostRequestElement('pass1'); - unsetPostRequestElement('pass2'); + unsetPostRequestParameter('pass1'); + unsetPostRequestParameter('pass2'); $PASS = false; } // END - if @@ -148,19 +149,19 @@ LIMIT 1", handlSponsorRequest(postRequestArray()); // Convert some data for the email template - postRequestElement('gender' , translateGender(postRequestElement('gender'))); - postRequestElement('warning_interval', createFancyTime(postRequestElement('warning_interval'))); + postRequestParameter('gender' , translateGender(postRequestParameter('gender'))); + postRequestParameter('warning_interval', createFancyTime(postRequestParameter('warning_interval'))); - if ($PASS === false) setRequestPostElement('pass1', getMessage('SPONSOR_PASS_UNCHANGED')); + if ($PASS === false) setPostRequestParameter('pass1', getMessage('SPONSOR_PASS_UNCHANGED')); // Load email template and send the mail away $message = loadEmailTemplate('admin_sponsor_edit', postRequestArray(), false); - sendEmail(postRequestElement('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $message); + sendEmail(postRequestParameter('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $message); break; default: // Unknown mode - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestElement('mode'))); - $message = sprintf(getMessage('ADMIN_SPONSOR_INVALID_MODE'), getRequestElement('mode')); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestParameter('mode'))); + $message = getMaskedMessage('ADMIN_SPONSOR_INVALID_MODE', getRequestParameter('mode')); break; } @@ -170,17 +171,17 @@ LIMIT 1", } // END - if } elseif (isFileReadable(sprintf("%stemplates/%s/html/admin/%s.tpl", getConfig('PATH'), getLanguage(), $TPL))) { // Create mailto link - $content['contact'] = "" . $content['surname'] . " " . $content['family'] . ""; + $content['contact'] = '' . $content['surname'] . ' ' . $content['family'] . ''; // Load mode template loadTemplate($TPL); } else { // Template not found! - loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_MODUS_TPL_404'), getRequestElement('mode'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_MODUS_TPL_404', getRequestParameter('mode'))); } } else { // Sponsor not found! - loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id')))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); } // Free result