2 /************************************************************************
\r
3 * MXChange v0.2.1 Start: 08/25/2003 *
\r
4 * =============== Last change: 11/23/2004 *
\r
6 * -------------------------------------------------------------------- *
\r
8 * -------------------------------------------------------------------- *
\r
9 * Short description : Index page. A simple redirection to modules.php *
\r
10 * -------------------------------------------------------------------- *
\r
11 * Kurzbeschreibung : Index-Seite. Eine simple Weiterleitung auf die *
\r
13 * -------------------------------------------------------------------- *
\r
15 * -------------------------------------------------------------------- *
\r
16 * Copyright (c) 2003 - 2008 by Roland Haeder *
\r
17 * For more information visit: http://www.mxchange.org *
\r
19 * This program is free software; you can redistribute it and/or modify *
\r
20 * it under the terms of the GNU General Public License as published by *
\r
21 * the Free Software Foundation; either version 2 of the License, or *
\r
22 * (at your option) any later version. *
\r
24 * This program is distributed in the hope that it will be useful, *
\r
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
\r
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
\r
27 * GNU General Public License for more details. *
\r
29 * You should have received a copy of the GNU General Public License *
\r
30 * along with this program; if not, write to the Free Software *
\r
31 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
\r
32 * MA 02110-1301 USA *
\r
33 ************************************************************************/
\r
35 // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
\r
36 require_once("inc/libs/security_functions.php");
\r
38 // Init "action" and "what"
\r
39 global $what, $action;
\r
40 $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
\r
41 if (!empty($_GET['action'])) $GLOBALS['action'] = secureString($_GET['action']);
\r
42 if (!empty($_GET['what'])) $GLOBALS['what'] = secureString($_GET['what']);
\r
45 $GLOBALS['module'] = "index";
\r
48 require ("inc/config.php");
\r
50 // Is the script installed?
\r
51 if (defined('mxchange_installed') && (mxchange_installed))
\r
54 require(PATH."inc/header.php");
\r
56 // Check for cookies
\r
57 if (empty($_COOKIE['visited']) || ($CONFIG['index_delay'] == 0) || ($CONFIG['index_cookie'] == 0))
\r
59 if ($CONFIG['index_cookie'] > 0)
\r
61 // Set cookie and remeber it for specified time
\r
62 @setcookie("visited", "true", (time() + $CONFIG['index_cookie']), COOKIE_PATH);
\r
64 elseif (!empty($_COOKIE['visited']))
\r
66 // Remove cookie when admin set 0 in setup
\r
67 @setcookie("visited", "", (time() - 3600), COOKIE_PATH);
\r
71 LOAD_TEMPLATE("index", false, ADD_URL_DATA(""));
\r
73 // Shall I insert an automated forward?
\r
74 if ($CONFIG['index_delay'] > 0)
\r
76 // This will be a JavaScript-redirect!
\r
77 define('__DELAY_VALUE', ($CONFIG['index_delay'] * 1000 + 500));
\r
78 define('__MOD_VALUE' , ADD_URL_DATA("index"));
\r
79 LOAD_TEMPLATE("index_forward");
\r
84 // Redirect to main page
\r
85 LOAD_URL(URL."/modules.php?module=index");
\r
89 require(PATH."inc/footer.php");
\r
93 // You have to configure first!
\r
94 LOAD_URL("install.php");
\r