Project

General

Profile

1 1425 Luisehahne
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         login
6 1529 Luisehahne
 * @author          Ryan Djurovich, WebsiteBaker Project
7 1709 Luisehahne
 * @copyright       2009-2012, Website Baker Org. e.V.
8 1425 Luisehahne
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16 1709 Luisehahne
 */
17 1425 Luisehahne
18 1709 Luisehahne
	require('../../config.php');
19
// Include the configuration file
20
if(!defined('WB_URL') && file_exists(realpath('../../config.php'))) {
21
}
22 1425 Luisehahne
require_once(WB_PATH."/framework/class.login.php");
23
24
if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
25
	// Generate username field name
26
	$username_fieldname = 'username_';
27
	$password_fieldname = 'password_';
28
	$salt = "abchefghjkmnpqrstuvwxyz0123456789";
29
	srand((double)microtime()*1000000);
30
	$i = 0;
31
	while ($i <= 7) {
32
		$num = rand() % 33;
33
		$tmp = substr($salt, $num, 1);
34
		$username_fieldname = $username_fieldname . $tmp;
35
		$password_fieldname = $password_fieldname . $tmp;
36
		$i++;
37
	}
38
} else {
39
	$username_fieldname = 'username';
40
	$password_fieldname = 'password';
41
}
42
43 1529 Luisehahne
$admin = new admin('Start', '', false, false);
44 1625 Luisehahne
45
$WarnUrl = str_replace(WB_PATH,WB_URL,$admin->correct_theme_source('warning.html'));
46 1529 Luisehahne
47 1709 Luisehahne
$LoginTpl = 'loginBox.htt';
48
$ThemePath = dirname($admin->correct_theme_source('loginBox.htt'));
49
50 1457 Luisehahne
$thisApp = new Login( array(
51 1709 Luisehahne
					'MAX_ATTEMPS' => "3",
52
					'WARNING_URL' => $WarnUrl,
53
					'INFO_URL' => '##',
54
					'INFO_TEXT' => 'News',
55
					'USERNAME_FIELDNAME' => $username_fieldname,
56
					'PASSWORD_FIELDNAME' => $password_fieldname,
57
					'REMEMBER_ME_OPTION' => SMART_LOGIN,
58
					'MIN_USERNAME_LEN' => "2",
59
					'MIN_PASSWORD_LEN' => "2",
60
					'MAX_USERNAME_LEN' => "30",
61
					'MAX_PASSWORD_LEN' => "30",
62
					'LOGIN_URL' => ADMIN_URL."/login/index.php",
63
					'DEFAULT_URL' => ADMIN_URL."/start/index.php",
64
					'TEMPLATE_DIR' => $ThemePath,
65
					'TEMPLATE_FILE' => $LoginTpl,
66
					'FRONTEND' => false,
67
					'FORGOTTEN_DETAILS_APP' => ADMIN_URL."/login/forgot/index.php",
68
					'USERS_TABLE' => TABLE_PREFIX."users",
69
					'GROUPS_TABLE' => TABLE_PREFIX."groups",
70
			)
71 1457 Luisehahne
		);
72 1709 Luisehahne
//$admin->print_footer();