-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1 Start: 09/23/2003 *\r
- * =============== Last change: 03/27/2004 *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * File : index.php *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Entrance page *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung : Eingangsseite *\r
- * -------------------------------------------------------------------- *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 by Roland Haeder *\r
- * For more information visit: http://www.mxchange.org *\r
- * *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or *\r
- * (at your option) any later version. *\r
- * *\r
- * This program is distributed in the hope that it will be useful, *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\r
- * GNU General Public License for more details. *\r
- * *\r
- * You should have received a copy of the GNU General Public License *\r
- * along with this program; if not, write to the Free Software *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *\r
- * MA 02110-1301 USA *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))\r
-{\r
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";\r
- require($INC);\r
-}\r
- elseif (!EXT_IS_ACTIVE("sql_patches", true))\r
-{\r
- // The extension "sql_patches" *MUST* be activated or you have lot's of problems!\r
- LOAD_URL(URL."/modules.php?module=admin");\r
-}\r
-\r
-// When the frameset is active redirect the user :)\r
-if (frameset_active)\r
-{\r
- LOAD_URL(URL."/modules.php?module=frameset");\r
-}\r
-\r
-// Load adverstising template\r
-define('__GUEST_ADVERT', LOAD_TEMPLATE("guest_advert", true));\r
-\r
-// Generate a tableset for the menu title and content\r
-LOAD_TEMPLATE("guest_header");\r
-\r
-// Add message here\r
-if (!empty($_GET['msg']))\r
-{\r
- switch ($_GET['msg'])\r
- {\r
- case CODE_LOGOUT_DONE : $msg = LOGOUT_DONE; break;\r
- case CODE_LOGOUT_FAILED : $msg = "<SPAN class=\"guest_failed\">".LOGOUT_FAILED."</SPAN>"; break;\r
- case CODE_DATA_INVALID : $msg = MAIL_DATA_INVALID; break;\r
- case CODE_POSSIBLE_INVALID : $msg = MAIL_POSSIBLE_INVALID; break;\r
- case CODE_ACCOUNT_LOCKED : $msg = MEMBER_ACCOUNT_LOCKED_UNC; break;\r
- case CODE_USER_404 : $msg = USER_NOT_FOUND; break;\r
- case CODE_STATS_404 : $msg = MAIL_STATS_404; break;\r
- case CODE_ALREADY_CONFIRMED: $msg = MAIL_ALREADY_CONFIRMED; break;\r
- case CODE_ERROR_MAILID : $msg = ERROR_CONFIRMING_MAIL; break;\r
- case CODE_EXTENSION_PROBLEM: $msg = sprintf(EXTENSION_PROBLEM_EXT_INACTIVE, "mailid"); break;\r
- case CODE_COOKIES_DISABLED : $msg = LOGIN_NO_COOKIES; break;\r
- case CODE_BEG_SAME_AS_OWN : $msg = BEG_SAME_UID_AS_OWN; break;\r
- case CODE_LOGIN_FAILED : $msg = LOGIN_FAILED_GENERAL; break;\r
- default : $msg = UNKNOWN_MAILID_CODE_1.$_GET['msg'].UNKNOWN_MAILID_CODE_2; break;\r
- }\r
- LOAD_TEMPLATE("message", false, $msg);\r
-}\r
-\r
-// Some of you needs this to be extracted into a template... ???\r
-LOAD_TEMPLATE("guest_menu_td");\r
-\r
-// When no what value is provided take the "home" value\r
-if (empty($GLOBALS['what'])) $GLOBALS['what'] = $CONFIG['index_home'];\r
-\r
-// Adding the main content module here\r
-if (empty($GLOBALS['action']))\r
-{\r
- // Get action value from what value\r
- $act = GET_ACTION("guest", $GLOBALS['what']);\r
-}\r
- else\r
-{\r
- // Get action value directly from URL\r
- $act = COMPILE_CODE($GLOBALS['action']);\r
-}\r
-\r
-// Add the guest's menu here...\r
-if (($CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))\r
-{\r
- // Show only when guest menu is active\r
- ADD_MENU("guest", $act, $GLOBALS['what']);\r
-}\r
-\r
-// TDs between menu and content\r
-LOAD_TEMPLATE("guest_menu_content");\r
-\r
-$INC_ACTION = sprintf(PATH."inc/modules/guest/action-%s.php", $act);\r
-if ((file_exists($INC_ACTION)) && (is_readable($INC_ACTION)) && (VALIDATE_MENU_ACTION("guest", $act, $GLOBALS['what'])))\r
-{\r
- // Requested module is available so we load it\r
- require_once($INC_ACTION);\r
-}\r
- else\r
-{\r
- // Invalid module specified or not found...\r
- LOAD_URL(URL."/modules.php?module=index");\r
-}\r
-\r
-if (($CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))\r
-{\r
- // TDs between content and </table>\r
- LOAD_TEMPLATE("guest_content_footer");\r
-\r
- // Some advertising stuff?\r
- LOAD_TEMPLATE("guest_advert2");\r
-\r
- OUTPUT_HTML (" </TD>\r
-</TR>");\r
-\r
- // Goto TOP template\r
- LOAD_TEMPLATE("guest_goto_top");\r
-}\r
-\r
-// Footer template (Thanx to Mr. Glaus!)\r
-LOAD_TEMPLATE("guest_footer");\r
-\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/23/2003 *
+ * =============== Last change: 03/27/2004 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : index.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Entrance page *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Eingangsseite *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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 *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+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))
+{
+ // 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 adverstising template
+define('__GUEST_ADVERT', LOAD_TEMPLATE("guest_advert", true));
+
+// Generate a tableset for the menu title and content
+LOAD_TEMPLATE("guest_header");
+
+// Add message here
+if (!empty($_GET['msg']))
+{
+ switch ($_GET['msg'])
+ {
+ case CODE_LOGOUT_DONE : $msg = LOGOUT_DONE; break;
+ case CODE_LOGOUT_FAILED : $msg = "<SPAN class=\"guest_failed\">".LOGOUT_FAILED."</SPAN>"; break;
+ case CODE_DATA_INVALID : $msg = MAIL_DATA_INVALID; break;
+ case CODE_POSSIBLE_INVALID : $msg = MAIL_POSSIBLE_INVALID; break;
+ case CODE_ACCOUNT_LOCKED : $msg = MEMBER_ACCOUNT_LOCKED_UNC; break;
+ case CODE_USER_404 : $msg = USER_NOT_FOUND; break;
+ case CODE_STATS_404 : $msg = MAIL_STATS_404; break;
+ case CODE_ALREADY_CONFIRMED: $msg = MAIL_ALREADY_CONFIRMED; break;
+ case CODE_ERROR_MAILID : $msg = ERROR_CONFIRMING_MAIL; break;
+ case CODE_EXTENSION_PROBLEM: $msg = sprintf(EXTENSION_PROBLEM_EXT_INACTIVE, "mailid"); break;
+ case CODE_COOKIES_DISABLED : $msg = LOGIN_NO_COOKIES; break;
+ case CODE_BEG_SAME_AS_OWN : $msg = BEG_SAME_UID_AS_OWN; break;
+ case CODE_LOGIN_FAILED : $msg = LOGIN_FAILED_GENERAL; break;
+ default : $msg = UNKNOWN_MAILID_CODE_1.$_GET['msg'].UNKNOWN_MAILID_CODE_2; break;
+ }
+ LOAD_TEMPLATE("message", false, $msg);
+}
+
+// Some of you needs this to be extracted into a template... ???
+LOAD_TEMPLATE("guest_menu_td");
+
+// When no what value is provided take the "home" value
+if (empty($GLOBALS['what'])) $GLOBALS['what'] = $CONFIG['index_home'];
+
+// Adding the main content module here
+if (empty($GLOBALS['action']))
+{
+ // Get action value from what value
+ $act = GET_ACTION("guest", $GLOBALS['what']);
+}
+ else
+{
+ // Get action value directly from URL
+ $act = COMPILE_CODE($GLOBALS['action']);
+}
+
+// Add the guest's menu here...
+if (($CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
+{
+ // Show only when guest menu is active
+ ADD_MENU("guest", $act, $GLOBALS['what']);
+}
+
+// TDs between menu and content
+LOAD_TEMPLATE("guest_menu_content");
+
+$INC_ACTION = sprintf(PATH."inc/modules/guest/action-%s.php", $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
+ require_once($INC_ACTION);
+}
+ else
+{
+ // Invalid module specified or not found...
+ LOAD_URL(URL."/modules.php?module=index");
+}
+
+if (($CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
+{
+ // TDs between content and </table>
+ LOAD_TEMPLATE("guest_content_footer");
+
+ // Some advertising stuff?
+ LOAD_TEMPLATE("guest_advert2");
+
+ OUTPUT_HTML (" </TD>
+</TR>");
+
+ // Goto TOP template
+ LOAD_TEMPLATE("guest_goto_top");
+}
+
+// Footer template (Thanx to Mr. Glaus!)
+LOAD_TEMPLATE("guest_footer");
+
+//
+?>