X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_beg.php;h=b6033f28c46608362acb5b2834325a963bc08b34;hb=bb26a0d30f5069bb00c65ac715cbf04b2ae672d9;hp=40d412e6b200c50db128ec27721d51983cc90874;hpb=efee806bdf3f96472cfc10247943446169f752d1;p=mailer.git diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 40d412e6b2..b6033f28c4 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -32,20 +32,19 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!is_admin())) { +if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } // Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); +ADD_DESCR("admin", __FILE__); -if (isset($_POST['ok'])) -{ +if (isset($_POST['ok'])) { // Translate german decimal commas to computer decimal dots - $_POST['beg_points'] = str_replace(",", ".", $_POST['beg_points'] ); - $_POST['beg_points_max'] = str_replace(",", ".", $_POST['beg_points_max'] ); - $_POST['beg_notify_bonus'] = str_replace(",", ".", $_POST['beg_notify_bonus']); + $_POST['beg_points'] = REVERT_COMMA($_POST['beg_points'] ); + $_POST['beg_points_max'] = REVERT_COMMA($_POST['beg_points_max'] ); + $_POST['beg_notify_bonus'] = REVERT_COMMA($_POST['beg_notify_bonus']); // Save settings ADMIN_SAVE_SETTINGS($_POST); @@ -54,15 +53,7 @@ if (isset($_POST['ok'])) $_CONFIG['beg_rallye'] = $_POST['beg_rallye']; $_CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify']; $_CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify']; - - // Include sending out mails - if ((($_CONFIG['beg_rallye'] == "Y") && ($_CONFIG['beg_ral_en_notify'] == "Y")) || (($_CONFIG['beg_rallye'] == "N") && ($_CONFIG['beg_ral_di_notify'] == "Y"))) - { - include(PATH."inc/mails/beg_mails.php"); - } -} - else -{ +} else { // Prepare constants for the template define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'] , false)); define('__BEG_POINTS_MAX' , TRANSLATE_COMMA($_CONFIG['beg_points_max'] , false)); @@ -86,6 +77,7 @@ if (isset($_POST['ok'])) define('__BEG_RALLYE_N', " checked=\"checked\""); break; } + switch ($_CONFIG['beg_active']) { case 'Y': @@ -98,6 +90,7 @@ if (isset($_POST['ok'])) define('__BEG_ACTIVE_N', " checked=\"checked\""); break; } + switch ($_CONFIG['beg_mode']) { case "DIRECT": @@ -110,6 +103,7 @@ if (isset($_POST['ok'])) define('__BEG_MODE_REF' , " checked=\"checked\""); break; } + switch ($_CONFIG['beg_ral_en_notify']) { case 'Y': @@ -122,6 +116,7 @@ if (isset($_POST['ok'])) define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\""); break; } + switch ($_CONFIG['beg_ral_di_notify']) { case 'Y': @@ -134,6 +129,7 @@ if (isset($_POST['ok'])) define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\""); break; } + switch ($_CONFIG['beg_new_mem_notify']) { case 'Y': @@ -146,6 +142,7 @@ if (isset($_POST['ok'])) define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\""); break; } + switch ($_CONFIG['beg_include_own']) { case 'Y': @@ -159,11 +156,42 @@ if (isset($_POST['ok'])) break; } + switch ($_CONFIG['beg_pay_mode']) { + case "IMG": + define('__BEG_PAY_MODE_IMG' , " selected=\"selected\""); + define('__BEG_PAY_MODE_JS' , ""); + define('__BEG_PAY_MODE_BOTH', ""); + define('__BEG_PAY_MODE_NONE', ""); + break; + + case "JS": + define('__BEG_PAY_MODE_IMG' , ""); + define('__BEG_PAY_MODE_JS' , " selected=\"selected\""); + define('__BEG_PAY_MODE_BOTH', ""); + define('__BEG_PAY_MODE_NONE', ""); + break; + + case "BOTH": + define('__BEG_PAY_MODE_IMG' , ""); + define('__BEG_PAY_MODE_JS' , ""); + define('__BEG_PAY_MODE_BOTH', " selected=\"selected\""); + define('__BEG_PAY_MODE_NONE', ""); + break; + + case "NONE": + define('__BEG_PAY_MODE_IMG' , ""); + define('__BEG_PAY_MODE_JS' , ""); + define('__BEG_PAY_MODE_BOTH', ""); + define('__BEG_PAY_MODE_NONE', " selected=\"selected\""); + break; + } + // Add data to constant __MEMBER_SELECTION define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['beg_uid'], false, true, true, "beg_uid")); // Load form template LOAD_TEMPLATE("admin_config_beg"); } + // ?>