2 /************************************************************************
\r
3 * MXChange v0.2.1 Start: 10/15/2003 *
\r
4 * =============== Last change: 04/18/2004 *
\r
6 * -------------------------------------------------------------------- *
\r
8 * -------------------------------------------------------------------- *
\r
9 * Short description : Login area for members *
\r
10 * -------------------------------------------------------------------- *
\r
11 * Kurzbeschreibung : Login-Bereich f�r Mitglieder *
\r
12 * -------------------------------------------------------------------- *
\r
14 * -------------------------------------------------------------------- *
\r
15 * Copyright (c) 2003 - 2008 by Roland Haeder *
\r
16 * For more information visit: http://www.mxchange.org *
\r
18 * This program is free software; you can redistribute it and/or modify *
\r
19 * it under the terms of the GNU General Public License as published by *
\r
20 * the Free Software Foundation; either version 2 of the License, or *
\r
21 * (at your option) any later version. *
\r
23 * This program is distributed in the hope that it will be useful, *
\r
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
\r
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
\r
26 * GNU General Public License for more details. *
\r
28 * You should have received a copy of the GNU General Public License *
\r
29 * along with this program; if not, write to the Free Software *
\r
30 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
\r
31 * MA 02110-1301 USA *
\r
32 ************************************************************************/
\r
34 // Some security stuff...
\r
35 if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
\r
37 $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
\r
40 elseif (!IS_LOGGED_IN())
\r
42 $URL = URL."/modules.php?module=index";
\r
43 if ($check == "mem_only") $URL .= "&msg=".urlencode(LANG_MEM_ONLY_1.$GLOBALS['module'].LANG_MEM_ONLY_2);
\r
47 if ($status != "CONFIRMED")
\r
49 // If the status is different than confirmed move the user away from here
\r
53 $ERROR = CODE_ID_LOCKED;
\r
57 $ERROR = CODE_ID_UNCONFIRMED;
\r
61 $ERROR = CODE_UNKNOWN_STATUS;
\r
64 $URL = URL."/modules.php?module=index&login=".$ERROR;
\r
68 // Recheck if he got logged out because bad cookies
\r
69 if (!IS_LOGGED_IN())
\r
71 $URL = URL."/modules.php?module=index";
\r
75 // Load adverstising template
\r
76 define('__MEMBER_ADVERT', LOAD_TEMPLATE("member_banner", true));
\r
78 // Disable block mode by default
\r
79 $BLOCK_MODE = false;
\r
81 // Generate a tableset for the menu title and content
\r
82 LOAD_TEMPLATE("member_header");
\r
84 // Adding your title's template here...
\r
86 <TD class=\"member_menu\">");
\r
88 // Adding the main content module here
\r
89 if (empty($GLOBALS['action']))
\r
91 if (empty($GLOBALS['what'])) $GLOBALS['what'] = "welcome";
\r
95 $act = SQL_ESCAPE($GLOBALS['action']);
\r
98 // Add the member's menu here...
\r
99 if (($CONFIG['member_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
\r
101 ADD_MENU("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what']);
\r
104 OUTPUT_HTML (" </TD>
\r
105 <TD valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
\r
107 $INC_ACTION = sprintf(PATH."inc/modules/member/action-%s.php", $act);
\r
108 if ((file_exists($INC_ACTION)) && (is_readable($INC_ACTION)) && (VALIDATE_MENU_ACTION("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what'])))
\r
110 // Requested module is available so we load it
\r
111 include ($INC_ACTION);
\r
115 // Invalid module specified or not found...
\r
116 LOAD_URL("modules.php?module=login");
\r
119 if (($CONFIG['member_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
\r
121 OUTPUT_HTML (" <BR></TD>
\r
124 <TD align=\"center\" valign=\"top\" class=\"member_advert\">");
\r
126 // Some advertising stuff?
\r
127 LOAD_TEMPLATE("member_advert");
\r
130 OUTPUT_HTML (" </TD>
\r
133 // Load same template for "Goto TOP"
\r
134 LOAD_TEMPLATE("member_goto_top");
\r
136 // Footer template (Thanx to Mr. Glaus!)
\r
137 LOAD_TEMPLATE("member_footer");
\r