* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
************************************************************************/
// 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("")) && (!IS_ADMIN())) {
+ addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "");
+ 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(PATH."inc/modules/guest/what-%s.php", $GLOBALS['what']);
-if (file_exists($INC))
-{
+if (FILE_READABLE($INC)) {
// Ok, we finally load the guest action module
include($INC);
+} elseif ($IS_VALID) {
+ addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+} else {
+ addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
}
- else
-{
- ADD_FATAL(GUEST_404_ACTION_1.$GLOBALS['what'].GUEST_404_ACTION_2);
-}
+
//
?>