]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_doubler.php
Security line in all includes changed
[mailer.git] / inc / modules / admin / what-config_doubler.php
index 2b80c4c436bb47113a235fd7b38e236312ff5b09..04355fd63d0370ccbf933ba49ced6b3b8aea6220 100644 (file)
  ************************************************************************/
 
 // 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);
 }
+
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
        // Replace commata with decimal dot
        $_POST['doubler_charge'] = str_replace(",", ".", ($_POST['doubler_charge'] / 100));
        $_POST['doubler_ref']    = str_replace(",", ".", ($_POST['doubler_ref'] / 100));
@@ -51,9 +50,7 @@ if (isset($_POST['ok']))
 
        // Save settings
        ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+} else {
        // Prepare data for the template
        // - Charge rate
        define('__DOUBLER_CHARGE', TRANSLATE_COMMA(($_CONFIG['doubler_charge'] * 100), false));