]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/index.php
Some old lost copyright lines fixed, edit/delete admin functions rewritten
[mailer.git] / inc / modules / index.php
index afccd22e3370ca9434115fb01cfb4b2b5ea7a6e3..e5019640be8c23f2fcc7cc2f82c26aa3443ab687 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-}
- elseif (!EXT_IS_ACTIVE("sql_patches", true))
-{
+} elseif (!EXT_IS_ACTIVE("sql_patches", true)) {
        // The extension "sql_patches" *MUST* be activated or you have lot's of problems!
-       LOAD_URL(URL."/modules.php?module=admin");
-}
-
-// When the frameset is active redirect the user :)
-if (frameset_active)
-{
-       LOAD_URL(URL."/modules.php?module=frameset");
+       LOAD_URL("modules.php?module=admin");
 }
 
 // Load adverstising template
@@ -56,8 +47,7 @@ define('__GUEST_ADVERT', LOAD_TEMPLATE("guest_advert", true));
 LOAD_TEMPLATE("guest_header");
 
 // Add message here
-if (!empty($_GET['msg']))
-{
+if (!empty($_GET['msg'])) {
        switch ($_GET['msg'])
        {
                case CODE_LOGOUT_DONE      : $msg = LOGOUT_DONE; break;
@@ -82,7 +72,7 @@ if (!empty($_GET['msg']))
 LOAD_TEMPLATE("guest_menu_td");
 
 // When no what value is provided take the "home" value
-if (empty($GLOBALS['what'])) $GLOBALS['what'] = $CONFIG['index_home'];
+if (empty($GLOBALS['what'])) $GLOBALS['what'] = $_CONFIG['index_home'];
 
 // Adding the main content module here
 if (empty($GLOBALS['action']))
@@ -97,7 +87,7 @@ if (empty($GLOBALS['action']))
 }
 
 // Add the guest's menu here...
-if (($CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
+if (($_CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
 {
        // Show only when guest menu is active
        ADD_MENU("guest", $act, $GLOBALS['what']);
@@ -106,7 +96,7 @@ if (($CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
 // TDs between menu and content
 LOAD_TEMPLATE("guest_menu_content");
 
-$INC_ACTION = sprintf(PATH."inc/modules/guest/action-%s.php", $act);
+$INC_ACTION = sprintf("%sinc/modules/guest/action-%s.php", PATH, $act);
 if ((file_exists($INC_ACTION)) && (is_readable($INC_ACTION)) && (VALIDATE_MENU_ACTION("guest", $act, $GLOBALS['what'])))
 {
        // Requested module is available so we load it
@@ -115,10 +105,10 @@ if ((file_exists($INC_ACTION)) && (is_readable($INC_ACTION)) && (VALIDATE_MENU_A
  else
 {
        // Invalid module specified or not found...
-       LOAD_URL(URL."/modules.php?module=index");
+       LOAD_URL("modules.php?module=index");
 }
 
-if (($CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
+if (($_CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
 {
        // TDs between content and </table>
        LOAD_TEMPLATE("guest_content_footer");
@@ -126,7 +116,7 @@ if (($CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
        // Some advertising stuff?
        LOAD_TEMPLATE("guest_advert2");
 
-       OUTPUT_HTML ("  </TD>
+       OUTPUT_HTML("  </TD>
 </TR>");
 
        // Goto TOP template