X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-send_bonus.php;h=d7693a129eb78afc2ae005db3f099bca51f31513;hp=6dccfbf0886f0ee285eb8f12e2f11f1b07750288;hb=d3c4fdd9bfab35389e1a5ff48f3952d527c7b4bb;hpb=77cdaff2afb97ed32985ced906a3a95ee078c2ef diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index 6dccfbf088..d7693a129e 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -10,9 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : An alle Mitglieder Bonus-Mails verschicken * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -32,56 +37,55 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; - require($INC); -} elseif (!EXT_IS_ACTIVE("order")) { - addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order"); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR("admin", __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('order')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); + return; +} // END - if // Set empty mode to "select" -if (empty($_GET['mode'])) $_GET['mode'] = "select"; +if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', "select"); -if (isset($_POST['ok'])) { +if (isFormSent()) { // Deliver bonus mail - ADD_NEW_BONUS_MAIL($_POST, $_GET['mode']); + addNewBonusMail(postRequestArray(), getRequestElement('mode')); } else { // Get all available users - define('__ALL_VALUE', TRANSLATE_COMMA(GET_TOTAL_RECEIVERS($_GET['mode']))); + $content['all'] = translateComma(getTotalReceivers(getRequestElement('mode'))); // Prepare option lines - define('__OPTION_LINES', ADD_CATEGORY_OPTIONS($_GET['mode'])); + $content['options_lines'] = generateCategoryOptionsList(getRequestElement('mode')); // Store send mode - define('__MODE', SQL_ESCAPE($_GET['mode'])); + $content['mode'] = getRequestElement('mode'); - if (EXT_IS_ACTIVE("html_mail")) { + $content['html_select'] = ''; + if (isExtensionActive('html_mail')) { // If HTML extension is active - define('__HTML_SELECT', LOAD_TEMPLATE("admin_send_bonus_html", true)); - } else { - // And if not - define('__HTML_SELECT', ""); - } + $content['html_select'] = loadTemplate('admin_send_bonus_html', true); + } // END - if // Select template - switch($_GET['mode']) { - case "html": // HTML mails - case "normal": // Normal mails - $template = "admin_send_bonus_form"; + switch(getRequestElement('mode')) { + case 'html': // HTML mails + case 'normal': // Normal mails + $template = 'admin_send_bonus_form'; break; - case "select": // Selection - $template = "admin_send_bonus_select"; + case 'select': // Selection + $template = 'admin_send_bonus_select'; break; - } + } // END - if // Load template - LOAD_TEMPLATE($template); + loadTemplate($template, false, $content); } -// +// [EOF] ?>