X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fsponsor_functions.php;h=180086fc8c1832db9df087f895bf9978418c30a6;hb=e1a62db0c2a7a8b56e066aa3a2a032cfabf08267;hp=983a46b9685115caef2efbedd2e14211a494e18c;hpb=1cbf289d059637cb2707b0f5384637f081ad6402;p=mailer.git diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 983a46b968..180086fc8c 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -434,7 +434,7 @@ function saveSponsorData ($postData, $content) { $sql = substr($sql, 0, -1); // Add SQL tail data - $sql .= " WHERE `id`='%s' AND password='%s' LIMIT 1"; + $sql .= " WHERE `id`=%s AND password='%s' LIMIT 1"; $DATA[] = bigintval(getSession('sponsorid')); $DATA[] = getSession('sponsorpass'); @@ -481,22 +481,23 @@ function saveSponsorData ($postData, $content) { $content['new_data'] = $postData; // Translate some data - if (isset($content['gender'])) $content['gender'] = translateGender($content['gender']); - if (isset($content['new_data']['gender'])) $content['new_data']['gender'] = translateGender($content['new_data']['gender']); - if (isset($content['receive_warnings'])) $content['new_data']['receive'] = translateYesNo($content['new_data']['receive_warnings']); - if (isset($content['warning_interval'])) $content['new_data']['interval'] = createFancyTime($content['new_data']['warning_interval']); + if (isset($content['gender'])) $content['gender'] = translateGender($content['gender']); + if (isset($content['new_data']['gender'])) $content['new_data']['gender'] = translateGender($content['new_data']['gender']); + if (isset($content['receive_warnings'])) $content['new_data']['receive'] = translateYesNo($content['new_data']['receive_warnings']); + if (isset($content['warning_interval'])) $content['new_data']['interval'] = createFancyTime($content['new_data']['warning_interval']); // Send email to admins sendAdminNotification($subj, $templ, $content); // Shall we send mail to the sponsor's new email address? if ($content['receive_warnings'] == 'Y') { - // Okay send email with confirmation link to new address and with no confirmation link - // to the old address + /* + * Okay send email with confirmation link to new address and with no confirmation link + * to the old address. + */ // First to old address - switch (getWhat()) - { + switch (getWhat()) { case 'account': // Change account data $email_msg = loadEmailTemplate('sponsor_change_data', $content); sendEmail($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg); @@ -508,7 +509,7 @@ function saveSponsorData ($postData, $content) { // Second mail goes to the new address $email_msg = loadEmailTemplate('sponsor_change_email', $content); sendEmail($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg); - } + } // END - if break; case 'settings': // Change settings @@ -516,7 +517,7 @@ function saveSponsorData ($postData, $content) { $email_msg = loadEmailTemplate('sponsor_settings', $content); sendEmail($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg); break; - } + } // END - switch } // END - if } // END - if } // END - if