X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-sponsor.php;h=fa65035f3a13fb6d21302e2646247e93f805bc5d;hb=d5ee31ebfc85f22fc691b8c2753c42e188c1c4ef;hp=6fecc2371af24427ed9f1a18cb41c0b1d498c114;hpb=9beb33ae0c3194b05d172508768a833b1b69af2f;p=mailer.git diff --git a/inc/modules/member/what-sponsor.php b/inc/modules/member/what-sponsor.php index 6fecc2371a..fa65035f3a 100644 --- a/inc/modules/member/what-sponsor.php +++ b/inc/modules/member/what-sponsor.php @@ -31,18 +31,18 @@ ************************************************************************/ // 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 (!IS_LOGGED_IN()) -{ - LOAD_URL(URL."/modules.php?module=index"); +} elseif (!IS_MEMBER()) { + LOAD_URL("modules.php?module=index"); +} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) { + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + return; } // Add description as navigation point -ADD_DESCR("member", basename(__FILE__)); +ADD_DESCR("member", __FILE__); // Loads the name-matching template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));