X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_emails.php;h=a7c5a861dfcf2b47fd2c357f0bf29bbfb76b55ab;hb=ffe213c8e3f85119ddd5544214d0de9ecb833d98;hp=947f16fe9c14340a6fb9fed9dbabc153ceaa6d02;hpb=32933a97e4462c232a794fc33bd91f01ff997cb9;p=mailer.git diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 947f16fe9c..a7c5a861df 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -93,7 +93,7 @@ LIMIT 1", } // END - if // Check for bonus extension version >= 0.4.4 for the order bonus - if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (getConfig('bonus_active') == 'Y')) { + if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (ifBonusRallyeActive())) { // Add points directly SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+{?bonus_order?} WHERE `userid`=%s LIMIT 1", array(bigintval($content['sender'])), __FILE__, __LINE__); @@ -106,7 +106,7 @@ LIMIT 1", $message_user = loadEmailTemplate('order-accept', $content, $content['sender']); // Send email - sendEmail($content['sender'], getMessage('MEMBER_ORDER_ACCEPTED'), $message_user); + sendEmail($content['sender'], '{--MEMBER_ORDER_ACCEPTED--}', $message_user); // Unlock selected email SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='NEW' WHERE `id`=%s AND `data_type`='ADMIN' LIMIT 1", @@ -115,10 +115,10 @@ LIMIT 1", } // END - foreach // Set message - $message = getMessage('ADMIN_MAILS_ACTIVATED'); + $message = '{--ADMIN_MAILS_ACTIVATED--}'; } else { // Nothing checked! - $message = getMessage('ADMIN_MAILS_NOTHING_CHECKED'); + $message = '{--ADMIN_MAILS_NOTHING_CHECKED--}'; } // Mails unlocked for mail delivery @@ -126,7 +126,7 @@ LIMIT 1", } elseif (isPostRequestParameterSet(('reject'))) { if (countPostSelection() > 0) { // Reject mail orders - $OUT = ''; $SW = 2; + $OUT = ''; foreach (postRequestParameter('sel') as $id => $value) { // Secure id number $id = bigintval($id); @@ -143,10 +143,10 @@ LIMIT 1", // Load email template and send it away $message_user = loadEmailTemplate('order-reject', $content, $content['sender']); - sendEmail($content['sender'], getMessage('MEMBER_ORDER_REJECTED'), $message_user); + sendEmail($content['sender'], '{--MEMBER_ORDER_REJECTED--}', $message_user); // If you do not enter an URL to redirect to, your URL will be set! - if ((!isPostRequestParameterSet('redirect')) || (postRequestParameter('redirect') == 'http://')) setPostRequestParameter('redirect', getConfig('URL')); + if ((!isPostRequestParameterSet('redirect')) || (postRequestParameter('redirect') == 'http://')) setPostRequestParameter('redirect', getUrl()); // Redirect URL SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET url='%s', `data_type`='NEW' WHERE `id`=%s LIMIT 1", @@ -154,21 +154,19 @@ LIMIT 1", // Prepare data for the row template $content = array( - 'sw' => $SW, 'id' => $id, 'url' => postRequestParameter('url', $id), ); // Load row template and switch colors $OUT .= loadTemplate('admin_unlock_emails_redir_row', true, $content); - $SW = 3 - $SW; - } + } // END - foreach // Load main template loadTemplate('admin_unlock_emails_redir', false, $OUT); } else { // Nothing selected - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_MAILS_NOTHING_CHECKED')); + loadTemplate('admin_settings_saved', false, '{--ADMIN_MAILS_NOTHING_CHECKED--}'); } } elseif ((isFormSent('lock')) && (countPostSelection() > 0) && (getConfig('url_blacklist') == 'Y')) { // Lock URLs @@ -190,18 +188,16 @@ LIMIT 1", } // END - foreach // Output message - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_URLS_BLOCKED')); + loadTemplate('admin_settings_saved', false, '{--ADMIN_URLS_BLOCKED--}'); } elseif ((!isFormSent('lock')) && (!isFormSent('accept')) && (!isFormSent('reject'))) { // Mail orders are in pool so we can display them - $OUT = ''; $SW = 2; + $OUT = ''; while ($content = SQL_FETCHARRAY($result_main)) { // Prepare data for the template - $content['sw'] = $SW; $content['timestamp'] = generateDateTime($content['timestamp'], 2); // Load row template and switch colors $OUT .= loadTemplate('admin_unlock_emails_row', true, $content); - $SW = 3 - $SW; } // END - while // Free memory @@ -214,14 +210,14 @@ LIMIT 1", loadTemplate('admin_unlock_emails', false, $content); } elseif ((isFormSent('lock')) && (getConfig('url_blacklist') != 'Y')) { // URL blacklist not activated - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_URL_BLACKLIST_DISABLED')); + loadTemplate('admin_settings_saved', false, '{--ADMIN_URL_BLACKLIST_DISABLED--}'); } else { // Wrong call! - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL')); + loadTemplate('admin_settings_saved', false, '{--ADMIN_WRONG_CALL--}'); } } else { // No mail orders fond - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL')); + loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_MAILS_IN_POOL--}'); } // [EOF]