]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_beg.php
More use of REVERT_COMMA() fixes problems
[mailer.git] / inc / modules / admin / what-config_beg.php
index dcc8d4985311208a38f6856887772d2bd782eac8..5342beb5ad4a77e051c4c70c38f1ae8d4573f7a5 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))
-{
+if ((!defined('__SECURITY')) || (!is_admin())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -44,9 +43,9 @@ ADD_DESCR("admin", basename(__FILE__));
 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);
@@ -57,7 +56,7 @@ if (isset($_POST['ok']))
        $_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')))
+       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");
        }
@@ -78,90 +77,90 @@ if (isset($_POST['ok']))
        switch ($_CONFIG['beg_rallye'])
        {
        case 'Y':
-               define('__BEG_RALLYE_Y', ' checked');
+               define('__BEG_RALLYE_Y', " checked=\"checked\"");
                define('__BEG_RALLYE_N', "");
                break;
 
        case 'N':
                define('__BEG_RALLYE_Y', "");
-               define('__BEG_RALLYE_N', ' checked');
+               define('__BEG_RALLYE_N', " checked=\"checked\"");
                break;
        }
        switch ($_CONFIG['beg_active'])
        {
        case 'Y':
-               define('__BEG_ACTIVE_Y', ' checked');
+               define('__BEG_ACTIVE_Y', " checked=\"checked\"");
                define('__BEG_ACTIVE_N', "");
                break;
 
        case 'N':
                define('__BEG_ACTIVE_Y', "");
-               define('__BEG_ACTIVE_N', ' checked');
+               define('__BEG_ACTIVE_N', " checked=\"checked\"");
                break;
        }
        switch ($_CONFIG['beg_mode'])
        {
        case "DIRECT":
-               define('__BEG_MODE_DIRECT', ' checked');
+               define('__BEG_MODE_DIRECT', " checked=\"checked\"");
                define('__BEG_MODE_REF'   , "");
                break;
 
        case "REF":
                define('__BEG_MODE_DIRECT', "");
-               define('__BEG_MODE_REF'   , ' checked');
+               define('__BEG_MODE_REF'   , " checked=\"checked\"");
                break;
        }
        switch ($_CONFIG['beg_ral_en_notify'])
        {
        case 'Y':
-               define('__BEG_RAL_EN_NOTIFY_Y', ' checked');
+               define('__BEG_RAL_EN_NOTIFY_Y', " checked=\"checked\"");
                define('__BEG_RAL_EN_NOTIFY_N', "");
                break;
 
        case 'N':
                define('__BEG_RAL_EN_NOTIFY_Y', "");
-               define('__BEG_RAL_EN_NOTIFY_N', ' checked');
+               define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\"");
                break;
        }
        switch ($_CONFIG['beg_ral_di_notify'])
        {
        case 'Y':
-               define('__BEG_RAL_DI_NOTIFY_Y', ' checked');
+               define('__BEG_RAL_DI_NOTIFY_Y', " checked=\"checked\"");
                define('__BEG_RAL_DI_NOTIFY_N', "");
                break;
 
        case 'N':
                define('__BEG_RAL_DI_NOTIFY_Y', "");
-               define('__BEG_RAL_DI_NOTIFY_N', ' checked');
+               define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\"");
                break;
        }
        switch ($_CONFIG['beg_new_mem_notify'])
        {
        case 'Y':
-               define('__BEG_NEW_MEMBER_NOTIFY_Y', ' checked');
+               define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
                define('__BEG_NEW_MEMBER_NOTIFY_N', "");
                break;
 
        case 'N':
                define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
-               define('__BEG_NEW_MEMBER_NOTIFY_N', ' checked');
+               define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
                break;
        }
        switch ($_CONFIG['beg_include_own'])
        {
        case 'Y':
-               define('__BEG_INCLUDE_OWN_Y', ' checked');
+               define('__BEG_INCLUDE_OWN_Y', " checked=\"checked\"");
                define('__BEG_INCLUDE_OWN_N', "");
                break;
 
        case 'N':
                define('__BEG_INCLUDE_OWN_Y', "");
-               define('__BEG_INCLUDE_OWN_N', ' checked');
+               define('__BEG_INCLUDE_OWN_N', " checked=\"checked\"");
                break;
        }
 
        // Add data to constant __MEMBER_SELECTION
-       ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['beg_uid']);
+       define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['beg_uid'], false, true, true, "beg_uid"));
 
        // Load form template
        LOAD_TEMPLATE("admin_config_beg");