]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/action-admin.php
moved into
[mailer.git] / inc / modules / guest / action-admin.php
index d62329fd1a8fb76f15a72938f59fb61121f9bd99..038bf7cc91875671f489edb0363a6754ec36e918 100644 (file)
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif ($BLOCK_MODE) {
+} elseif ($GLOBALS['block_mode']) {
        // Block mode detected
        return;
 }
 
-if (GET_ACTION("guest", $GLOBALS['what']) == "admin") {
-       // Only when one admin link is clicked...
-       $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);
-       } else {
-               ADD_FATAL(GUEST_404_ACTION_1.$GLOBALS['what'].GUEST_404_ACTION_2);
-       }
-} // END - if
+// Only when one admin link is clicked...
+$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (INCLUDE_READABLE($INC)) {
+       // Ok, we finally load the guest action module
+       LOAD_INC($INC);
+} else {
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+}
 
 //
 ?>