]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_admins.php
A lot eval() commands rewritten to constant() function
[mailer.git] / inc / modules / admin / what-config_admins.php
index 5bd3d2cc85005848fb24d42485b2178ce26282c6..d88a2821f1dddc73c4dc557cbf241e65207628bd 100644 (file)
@@ -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);
@@ -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);