X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Faction-wernis.php;h=65a75c8b6863968cbda210ed90ea6d1ce5280f03;hb=d6834211baacaa54b282898fe54dc8c1511f046b;hp=5b912516790ce758570fb96b13f08b6e11c30e41;hpb=61bddb167e29e7275f5a1c9fa8cb80431fa5ee6f;p=mailer.git diff --git a/inc/modules/admin/action-wernis.php b/inc/modules/admin/action-wernis.php index 5b91251679..65a75c8b68 100644 --- a/inc/modules/admin/action-wernis.php +++ b/inc/modules/admin/action-wernis.php @@ -32,25 +32,22 @@ ************************************************************************/ // 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__)); +ADD_DESCR("admin", __FILE__); // Load the include file -$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']); -if (file_exists($INC)) -{ +$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what'])); +if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); -} - else -{ +} else { ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } + // ?>