Project

General

Profile

1 4 ryan
<?php
2
3
// $Id: login.php,v 1.8 2005/04/16 01:39:06 rdjurovich Exp $
4
5
/*
6
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9
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
		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index'.PAGE_EXTENSION);
32
	} else {
33
		header('Location: '.WB_URL.'/index'.PAGE_EXTENSION);
34
	}
35
}
36
37
// Required page details
38
$page_id = 0;
39
$page_description = '';
40
$page_keywords = '';
41
define('PAGE_ID', 0);
42
define('ROOT_PARENT', 0);
43
define('PARENT', 0);
44
define('LEVEL', 0);
45
define('PAGE_TITLE', 'Please login');
46
define('MENU_TITLE', 'Please login');
47
define('VISIBILITY', 'public');
48
// Set the page content include file
49
define('PAGE_CONTENT', WB_PATH.'/account/login_form.php');
50
51
require_once(WB_PATH.'/framework/class.login.php');
52
53
// Create new login app
54
$thisApp = new Login(
55
							array(
56
									"MAX_ATTEMPS" => "50",
57
									"WARNING_URL" => ADMIN_URL."/login/warning.html",
58
									"USERNAME_FIELDNAME" => 'username',
59
									"PASSWORD_FIELDNAME" => 'password',
60
									"REMEMBER_ME_OPTION" => SMART_LOGIN,
61
									"MIN_USERNAME_LEN" => "2",
62
									"MIN_PASSWORD_LEN" => "2",
63
									"MAX_USERNAME_LEN" => "30",
64
									"MAX_PASSWORD_LEN" => "30",
65
									"LOGIN_URL" => WB_URL."/account/login".PAGE_EXTENSION,
66
									"DEFAULT_URL" => WB_URL.PAGES_DIRECTORY."/index".PAGE_EXTENSION,
67
									"TEMPLATE_DIR" => ADMIN_PATH."/login",
68
									"TEMPLATE_FILE" => "template.html",
69
									"FRONTEND" => true,
70
									"FORGOTTEN_DETAILS_APP" => WB_URL."/account/forgot.php".PAGE_EXTENSION,
71
									"USERS_TABLE" => TABLE_PREFIX."users",
72
									"GROUPS_TABLE" => TABLE_PREFIX."groups"
73
							)
74
					);
75
76
// Set extra outsider var
77
$globals[] = 'thisApp';
78
79
// Include the index (wrapper) file
80
require(WB_PATH.'/index.php');
81
82
83
?>