X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Faction-sponsor.php;h=df18e405970a269791e87dbef04ebba93fe0515e;hb=27f65d023a3388a8bd85be8ee5991f776f541847;hp=de40dbc7152aea6df5e38695bf1a0d4aba5773db;hpb=d18075f375db1b9db40773cdf80a5d6f2c36cd3a;p=mailer.git diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index de40dbc715..df18e40597 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -31,22 +31,30 @@ ************************************************************************/ // 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']); -if (file_exists($INC)) { +$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); +} elseif ($IS_VALID) { + ADD_FATAL(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } else { - $FATAL[] = GUEST_404_ACTION_1.$GLOBALS['what'].GUEST_404_ACTION_2; + ADD_FATAL(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } + // ?>