Project

General

Profile

1 432 doc
<?php
2
3
// $Id$
4
5
/*
6
7
 Website Baker Project <http://www.websitebaker.org/>
8 915 Ruebenwurz
 Copyright (C) 2004-2009, Ryan Djurovich
9 432 doc
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
24
*/
25
26
require_once("../config.php");
27
28
// Make sure the login is enabled
29
if(!FRONTEND_LOGIN) {
30
	if(INTRO_PAGE) {
31 540 Ruebenwurz
		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
32 432 doc
		exit(0);
33
	} else {
34 540 Ruebenwurz
		header('Location: '.WB_URL.'/index.php');
35 432 doc
		exit(0);
36
	}
37
}
38
39
// Required page details
40
$page_id = 0;
41
$page_description = '';
42
$page_keywords = '';
43
define('PAGE_ID', 0);
44
define('ROOT_PARENT', 0);
45
define('PARENT', 0);
46
define('LEVEL', 0);
47 538 Ruebenwurz
define('PAGE_TITLE', $TEXT['PLEASE_LOGIN']);
48
define('MENU_TITLE', $TEXT['PLEASE_LOGIN']);
49 432 doc
define('VISIBILITY', 'public');
50
// Set the page content include file
51
define('PAGE_CONTENT', WB_PATH.'/account/login_form.php');
52
53
require_once(WB_PATH.'/framework/class.login.php');
54
55
// Create new login app
56 669 thorn
$redirect = strip_tags((isset($_REQUEST['redirect'])) ? $_REQUEST['redirect'] : '');
57 432 doc
$thisApp = new Login(
58
							array(
59
									"MAX_ATTEMPS" => "3",
60
									"WARNING_URL" => ADMIN_URL."/login/warning.html",
61
									"USERNAME_FIELDNAME" => 'username',
62
									"PASSWORD_FIELDNAME" => 'password',
63
									"REMEMBER_ME_OPTION" => SMART_LOGIN,
64
									"MIN_USERNAME_LEN" => "2",
65
									"MIN_PASSWORD_LEN" => "2",
66
									"MAX_USERNAME_LEN" => "30",
67
									"MAX_PASSWORD_LEN" => "30",
68 550 doc
									"LOGIN_URL" => WB_URL."/account/login.php?redirect=" .$redirect,
69 540 Ruebenwurz
									"DEFAULT_URL" => WB_URL.PAGES_DIRECTORY."/index.php",
70 432 doc
									"TEMPLATE_DIR" => ADMIN_PATH."/login",
71
									"TEMPLATE_FILE" => "template.html",
72
									"FRONTEND" => true,
73 540 Ruebenwurz
									"FORGOTTEN_DETAILS_APP" => WB_URL."/account/forgot.php",
74 432 doc
									"USERS_TABLE" => TABLE_PREFIX."users",
75
									"GROUPS_TABLE" => TABLE_PREFIX."groups",
76 549 doc
									"REDIRECT_URL" => $redirect
77 432 doc
							)
78
					);
79
80
// Set extra outsider var
81
$globals[] = 'thisApp';
82
83
// Include the index (wrapper) file
84
require(WB_PATH.'/index.php');
85
86
87 239 stefan
?>