Project

General

Profile

« Previous | Next » 

Revision 2098

Added by darkviper over 10 years ago

! activate class Translate for all addons in admin/ (except pages/)
! class.admin >> add translation of the current theme to Translate

View differences:

index.php
17 17

  
18 18
// Include the configuration file
19 19
$config_file = realpath('../../config.php');
20
if(file_exists($config_file) && !defined('WB_URL'))
21
{
20
if(file_exists($config_file) && !defined('WB_URL')) {
22 21
	require_once($config_file);
23 22
}
23
//if(!class_exists('login', false)){ require_once(WB_PATH.'/framework/class.login.php'); }
24
//if(!class_exists('frontend', false)){ require_once(WB_PATH.'/framework/class.frontend.php'); }
24 25

  
25
if(!class_exists('login', false)){ require_once(WB_PATH.'/framework/class.login.php'); }
26
if(!class_exists('frontend', false)){ require_once(WB_PATH.'/framework/class.frontend.php'); }
27

  
28 26
if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
29 27
	// Generate username field name
30 28
	$username_fieldname = 'username_';
......
43 41
	$username_fieldname = 'username';
44 42
	$password_fieldname = 'password';
45 43
}
46

  
47 44
$admin = new frontend();
48

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

  
51 46
$LoginTpl = 'loginBox.htt';
52 47
$ThemePath = dirname($admin->correct_theme_source('loginBox.htt'));
53

  
54 48
$thisApp = new Login( array(
55
					'MAX_ATTEMPS' => "3",
56
					'WARNING_URL' => $WarnUrl,
57
					'INFO_URL' => '##',
58
					'INFO_TEXT' => 'News',
59
					'USERNAME_FIELDNAME' => $username_fieldname,
60
					'PASSWORD_FIELDNAME' => $password_fieldname,
61
					'REMEMBER_ME_OPTION' => SMART_LOGIN,
62
					'MIN_USERNAME_LEN' => "2",
63
					'MIN_PASSWORD_LEN' => "2",
64
					'MAX_USERNAME_LEN' => "30",
65
					'MAX_PASSWORD_LEN' => "30",
66
					'LOGIN_URL' => ADMIN_URL."/login/index.php",
67
					'DEFAULT_URL' => ADMIN_URL."/start/index.php",
68
					'TEMPLATE_DIR' => $ThemePath,
69
					'TEMPLATE_FILE' => $LoginTpl,
70
					'FRONTEND' => false,
71
					'FORGOTTEN_DETAILS_APP' => ADMIN_URL."/login/forgot/index.php",
72
					'USERS_TABLE' => TABLE_PREFIX."users",
73
					'GROUPS_TABLE' => TABLE_PREFIX."groups",
74
			)
75
		);
49
        'MAX_ATTEMPS'           => '3',
50
        'WARNING_URL'           => $WarnUrl,
51
        'INFO_URL'              => '##',
52
        'INFO_TEXT'             => 'News',
53
        'USERNAME_FIELDNAME'    => $username_fieldname,
54
        'PASSWORD_FIELDNAME'    => $password_fieldname,
55
        'REMEMBER_ME_OPTION'    => SMART_LOGIN,
56
        'MIN_USERNAME_LEN'      => '2',
57
        'MIN_PASSWORD_LEN'      => '6',
58
        'MAX_USERNAME_LEN'      => '30',
59
        'MAX_PASSWORD_LEN'      => '30',
60
        'LOGIN_URL'             => ADMIN_URL."/login/index.php",
61
        'DEFAULT_URL'           => ADMIN_URL."/start/index.php",
62
        'TEMPLATE_DIR'          => $ThemePath,
63
        'TEMPLATE_FILE'         => $LoginTpl,
64
        'FRONTEND'              => false,
65
        'FORGOTTEN_DETAILS_APP' => ADMIN_URL."/login/forgot/index.php",
66
        'USERS_TABLE'           => TABLE_PREFIX."users",
67
        'GROUPS_TABLE'          => TABLE_PREFIX."groups",
68
    )
69
);

Also available in: Unified diff