X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Faction-theme.php;h=dbf518f62b9f7c0c24e6197ec9d6e321cd016f0f;hb=22a33b87f9894a94efb71de7630f12129e34f83b;hp=8b702b0aef2034eaac32eaf1dc6c07475cc7d4d7;hpb=61bddb167e29e7275f5a1c9fa8cb80431fa5ee6f;p=mailer.git diff --git a/inc/modules/admin/action-theme.php b/inc/modules/admin/action-theme.php index 8b702b0aef..dbf518f62b 100644 --- a/inc/modules/admin/action-theme.php +++ b/inc/modules/admin/action-theme.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); } + // ?>