]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_admins.php
More fixes for admin functions, thanks to Piter01
[mailer.git] / inc / modules / admin / what-config_admins.php
index c1bf5539c5d020a7c53d21ff90070b06b4b10fa9..c531b3b30f38253689b33baaa3e071c77eac4638 100644 (file)
@@ -38,7 +38,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 }
 
 // Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
 
 $SEL = 0;
 if (!empty($_POST['sel'])) $SEL = SELECTION_COUNT($_POST['sel']);
@@ -110,8 +110,9 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) {
                // Prepare variables
                if (empty($act)) $act = "---";
                if (empty($wht)) $wht   = "---";
-               $eval = "\$mode = ADMINS_".strtoupper($mode)."_MODE;";
-               eval($eval);
+
+               // Get admin mode
+               $mode = constant('ADMINS_'.strtoupper($mode).'_MODE');
 
                // Load admin's data
                $login = GET_ADMIN_LOGIN($admin);
@@ -160,7 +161,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) {
        LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ADMINS_ENTRIES_DELETED);
 } elseif (isset($_POST['add'])) {
        // Check if everything is fine...
-       $mode = GET_ADMIN_DEFAULT_ACL(GET_ADMIN_LOGIN(bigintval($_POST['admin_id'])));
+       $mode = GET_ADMIN_DEFAULT_ACL(bigintval($_POST['admin_id']));
 
        // Default ACL is false
        $ACL = false;
@@ -225,8 +226,9 @@ VALUES ('%s','%s','%s','%s')",
                        // Prepare variables
                        if (empty($act)) $act = "---";
                        if (empty($wht))   $wht   = "---";
-                       $eval = "\$mode = ADMINS_".strtoupper($mode)."_MODE;";
-                       eval($eval);
+
+                       // Get mode
+                       $mode = constant('ADMINS_'.strtoupper($mode).'_MODE');
 
                        // Load admin's data
                        $login = GET_ADMIN_LOGIN($admin);