]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/action-sponsor.php
A lot fixes to templates and missing functions added, more rewrites
[mailer.git] / inc / modules / guest / action-sponsor.php
index 994c04959c95a03e978f82a4c7528fd43036d1a3..28266cf40a55db68765e0a4d1e2b7dd1e2258909 100644 (file)
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
+} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) {
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       return;
+} elseif ($BLOCK_MODE) {
+       // Block mode detected
+       return;
 }
 
 // Add description as navigation point
 ADD_DESCR("guest", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, $GLOBALS['what']);
-if (FILE_READABLE($INC)) {
+$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       include($INC);
+       LOAD_INC($INC);
 } else {
-       ADD_FATAL(GUEST_404_ACTION_1.$GLOBALS['what'].GUEST_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
 }
 
 //