Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         login
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2012, Website Baker Org. e.V.
8
 * @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: index.php 1709 2012-08-29 11:37:46Z Luisehahne $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/login/index.php $
14
 * @lastmodified    $Date: 2012-08-29 13:37:46 +0200 (Wed, 29 Aug 2012) $
15
 *
16
 */
17

    
18
	require('../../config.php');
19
// Include the configuration file
20
if(!defined('WB_URL') && file_exists(realpath('../../config.php'))) {
21
}
22
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
$admin = new admin('Start', '', false, false);
44

    
45
$WarnUrl = str_replace(WB_PATH,WB_URL,$admin->correct_theme_source('warning.html'));
46

    
47
$LoginTpl = 'loginBox.htt';
48
$ThemePath = dirname($admin->correct_theme_source('loginBox.htt'));
49

    
50
$thisApp = new Login( array(
51
					'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
		);
72
//$admin->print_footer();
    (1-1/1)