X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-edit_sponsor.php;h=04707bc3c13dd5e7644ee9d67d67394eba9f9dc3;hb=218f69fc35e2ff9e003324618208ec97e9cbf034;hp=88bf548263f0a90078c59a999523425310f5b7a7;hpb=ffe213c8e3f85119ddd5544214d0de9ecb833d98;p=mailer.git
diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php
index 88bf548263..04707bc3c1 100644
--- a/inc/modules/admin/what-edit_sponsor.php
+++ b/inc/modules/admin/what-edit_sponsor.php
@@ -40,7 +40,7 @@
// Some security stuff...
if ((!defined('__SECURITY')) || (!isAdmin())) {
die();
-}
+} // END - if
// Add description as navigation point
addMenuDescription('admin', __FILE__);
@@ -48,14 +48,14 @@ addMenuDescription('admin', __FILE__);
if ((isGetRequestParameterSet('id')) && (isGetRequestParameterSet('mode'))) {
// Check for selected sponsor
$result_main = SQL_QUERY_ESC("SELECT
- `company`, `position`, `gender`, `surname`, `family`,
+ `id`, `company`, `position`, `gender`, `surname`, `family`,
`street_nr1`, `street_nr2`, `zip`, `city`, `country`,
`phone`, `fax`, `cell`, `email`, `url`, `tax_ident`,
`receive_warnings`, `warning_interval`
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE
- `id`='%s'
+ `id`=%s
LIMIT 1",
array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) == 1) {
@@ -63,9 +63,6 @@ LIMIT 1",
$content = SQL_FETCHARRAY($result_main);
// Prepare all data for the template
- // Sponsor's id
- $content['id'] = bigintval(getRequestParameter('id'));
-
// Init gender
foreach (array('m', 'f', 'c') as $gender) {
$content['gender_' . $gender] = '';
@@ -92,11 +89,11 @@ LIMIT 1",
$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",
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_amount`=`points_amount`+%s WHERE `id`=%s LIMIT 1",
array($points, bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
// Remember points /reason for the template
- $content['points'] = translateComma($points);
+ $content['points'] = $points;
$content['reason'] = secureString(postRequestParameter('reason'));
// Send email
@@ -115,11 +112,11 @@ LIMIT 1",
$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",
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_used`=`points_used`+%s WHERE `id`=%s LIMIT 1",
array($points, bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
// Remember points /reason for the template
- $content['points'] = translateComma($points);
+ $content['points'] = $points;
$content['reason'] = secureString(postRequestParameter('reason'));
// Send email
@@ -146,7 +143,7 @@ LIMIT 1",
convertSelectionsToTimestamp(postRequestArray(), $DATA, $id, $skip);
// Save the sponsor
- handlSponsorRequest(postRequestArray());
+ handleSponsorRequest(postRequestArray());
// Convert some data for the email template
postRequestParameter('gender' , translateGender(postRequestParameter('gender')));
@@ -171,10 +168,10 @@ LIMIT 1",
} // END - if
} elseif (isFileReadable(sprintf("%stemplates/%s/html/admin/%s.tpl", getPath(), getLanguage(), $TPL))) {
// Create mailto link
- $content['contact'] = '' . $content['surname'] . ' ' . $content['family'] . '';
+ $content['contact'] = '' . $content['surname'] . ' ' . $content['family'] . '';
// Load mode template
- loadTemplate($TPL);
+ loadTemplate($TPL, false, $content);
} else {
// Template not found!
loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_MODUS_TPL_404', getRequestParameter('mode')));