X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Faction-sponsor.php;h=1b7b18db342f387bab4c1d986e95d7a27eaf2e85;hb=a0c37ca650d27d0aed672ebf34e1be4601a2e0e9;hp=52d06df863f9e511dc9f31acbfefecff621199ad;hpb=4ef4c88fc481335dc0631b223111c15a84cccb51;p=mailer.git diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index 52d06df863..1b7b18db34 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -31,17 +31,22 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); +} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) { + ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + return; +} elseif ($BLOCK_MODE) { + // Block mode detected + return; } // Add description as navigation point -ADD_DESCR("guest", basename(__FILE__)); +ADD_DESCR("guest", __FILE__); // Load the include file -$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, $GLOBALS['what']); +$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what'])); if (FILE_READABLE($INC)) { // Ok, we finally load the guest action module include($INC);