X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-send_bonus.php;h=852457782e3fc21fc9b5a79e925288437cd3dae0;hp=765f304021b046571d392a135ce4db24d29752a0;hb=63f159414369b5ea19a8ca75d8cd8033c45d8341;hpb=20741b93fd58620af677a7f1039ffd16ea6ec689 diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index 765f304021..852457782e 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -48,18 +48,24 @@ if (!isExtensionActive('order')) { return; } // END - if -// 'mode' is not set by default -if (!isGetRequestElementSet('mode')) { - // Set empty mode to "select" - setGetRequestElement('mode', 'select'); +// mail_mode is not set by default +if (!isGetRequestElementSet('mail_mode')) { + // Is HTML extension enabled? + if (isExtensionInstalled('html_mail')) { + // Set empty mode to 'select' + setGetRequestElement('mail_mode', 'select'); + } else { + // Set empty mode to 'normal' + setGetRequestElement('mail_mode', 'normal'); + } } // END - if if (isFormSent()) { // Deliver bonus mail - addNewBonusMail(postRequestArray(), getRequestElement('mode')); + addNewBonusMail(postRequestArray(), getRequestElement('mail_mode')); } else { // Store send mode - $content['mode'] = getRequestElement('mode'); + $content['mail_mode'] = getRequestElement('mail_mode'); $content['html_select'] = ''; if (isExtensionActive('html_mail')) { @@ -67,8 +73,11 @@ if (isFormSent()) { $content['html_select'] = loadTemplate('admin_send_bonus_html', true); } // END - if + // Default template name is an invalid one + $template = 'admin_send_bonus_invalid'; + // Select template - switch(getRequestElement('mode')) { + switch(getRequestElement('mail_mode')) { case 'html': // HTML mails case 'normal': // Normal mails $template = 'admin_send_bonus_form';