Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         login
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
9
 * @link			http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.x
12
 * @requirements    PHP 5.2.2 and higher
13
 * @version         $Id: index.php 1374 2011-01-10 12:21:47Z Luisehahne $
14
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/login/index.php $
15
 * @lastmodified    $Date: 2011-01-10 13:21:47 +0100 (Mon, 10 Jan 2011) $
16
 *
17
*/
18

    
19
require_once("../../config.php");
20
require_once(WB_PATH."/framework/class.login.php");
21

    
22
if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
23
	// Generate username field name
24
	$username_fieldname = 'username_';
25
	$password_fieldname = 'password_';
26
	$salt = "abchefghjkmnpqrstuvwxyz0123456789";
27
	srand((double)microtime()*1000000);
28
	$i = 0;
29
	while ($i <= 7) {
30
		$num = rand() % 33;
31
		$tmp = substr($salt, $num, 1);
32
		$username_fieldname = $username_fieldname . $tmp;
33
		$password_fieldname = $password_fieldname . $tmp;
34
		$i++;
35
	}
36
} else {
37
	$username_fieldname = 'username';
38
	$password_fieldname = 'password';
39
}
40

    
41
$thisApp = new Login(
42
							array(
43
									'MAX_ATTEMPS' => "3",
44
									'WARNING_URL' => THEME_URL."/templates/warning.html",
45
									'USERNAME_FIELDNAME' => $username_fieldname,
46
									'PASSWORD_FIELDNAME' => $password_fieldname,
47
									'REMEMBER_ME_OPTION' => SMART_LOGIN,
48
									'MIN_USERNAME_LEN' => "2",
49
									'MIN_PASSWORD_LEN' => "2",
50
									'MAX_USERNAME_LEN' => "30",
51
									'MAX_PASSWORD_LEN' => "30",
52
									'LOGIN_URL' => ADMIN_URL."/login/index.php",
53
									'DEFAULT_URL' => ADMIN_URL."/start/index.php",
54
									'TEMPLATE_DIR' => THEME_PATH."/templates",
55
									'TEMPLATE_FILE' => "login.htt",
56
									'FRONTEND' => false,
57
									'FORGOTTEN_DETAILS_APP' => ADMIN_URL."/login/forgot/index.php",
58
									'USERS_TABLE' => TABLE_PREFIX."users",
59
									'GROUPS_TABLE' => TABLE_PREFIX."groups",
60
							)
61
					);
62

    
63
?>
    (1-1/1)