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
// Include the configuration file
19 2119 darkviper
$sStartFile = dirname(dirname(__DIR__)).'/framework/initialize.php';
20
if (!defined('SYSTEM_RUN')) {
21 2125 darkviper
    require($sStartFile);
22 1709 Luisehahne
}
23 2125 darkviper
$username_fieldname = 'username';
24
$password_fieldname = 'password';
25
if(isset($oReg->SmartLogin) && $oReg->SmartLogin == 'true') {
26
    $sTmp = '_'.substr(md5(microtime()), -8);
27
    $username_fieldname .= $sTmp;
28
    $password_fieldname .= $sTmp;
29
}
30 1425 Luisehahne
31 1782 Luisehahne
$admin = new frontend();
32 2125 darkviper
$WarnUrl = str_replace($oReg->AppPath, $oReg->AppUrl, $admin->correct_theme_source('warning.html'));
33 1709 Luisehahne
$LoginTpl = 'loginBox.htt';
34
$ThemePath = dirname($admin->correct_theme_source('loginBox.htt'));
35 1457 Luisehahne
$thisApp = new Login( array(
36 2125 darkviper
        'MAX_ATTEMPS'           => 3,
37 2098 darkviper
        'WARNING_URL'           => $WarnUrl,
38
        'INFO_URL'              => '##',
39
        'INFO_TEXT'             => 'News',
40
        'USERNAME_FIELDNAME'    => $username_fieldname,
41
        'PASSWORD_FIELDNAME'    => $password_fieldname,
42 2125 darkviper
        'REMEMBER_ME_OPTION'    => $oReg->SmartLogin,
43
        'MIN_USERNAME_LEN'      => 2,
44
        'MIN_PASSWORD_LEN'      => 3,
45
        'MAX_USERNAME_LEN'      => 100,
46
        'MAX_PASSWORD_LEN'      => 100,
47
        'LOGIN_URL'             => $oReg->AcpUrl."login/index.php",
48
        'DEFAULT_URL'           => $oReg->AcpUrl."start/index.php",
49 2098 darkviper
        'TEMPLATE_DIR'          => $ThemePath,
50
        'TEMPLATE_FILE'         => $LoginTpl,
51
        'FRONTEND'              => false,
52 2125 darkviper
        'FORGOTTEN_DETAILS_APP' => $oReg->AcpUrl."login/forgot/index.php",
53
        'USERS_TABLE'           => $oDb->TablePrefix."users",
54
        'GROUPS_TABLE'          => $oDb->TablePrefix."groups",
55 2098 darkviper
    )
56
);