Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         login
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2011, 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.3
11
 * @requirements    PHP 5.3.6 and higher
12
 * @version         $Id: index.php 2 2017-07-02 15:14:29Z Manuela $
13
 * @filesource      $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/admin/login/index.php $
14
 * @lastmodified    $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
15
 *
16
*/
17

    
18
if ( !defined('WB_PATH') ){ require(dirname(dirname(__DIR__))."/config.php"); }
19
if( !class_exists('Login', false) ){ require(WB_PATH."/framework/Login.php"); }
20
if( !class_exists('frontend', false) ){ require(WB_PATH."/framework/class.frontend.php"); }
21

    
22
$username_fieldname = 'username';
23
$password_fieldname = 'password';
24
if(defined('SMART_LOGIN') && SMART_LOGIN == 'true') {
25
    $sTmp = '_'.substr(md5(microtime()), -8);
26
    $username_fieldname .= $sTmp;
27
    $password_fieldname .= $sTmp;
28
}
29

    
30
$admin = new frontend();
31

    
32
// Setup template object, parse vars to it, then parse it
33
$WarnUrl = str_replace(WB_PATH,WB_URL,$admin->correct_theme_source('warning.html'));
34
$LoginTpl = 'login.htt';
35
$ThemePath = dirname($admin->correct_theme_source($LoginTpl));
36

    
37
$thisApp = new Login( array(
38
        'MAX_ATTEMPS'           => 3,
39
        'WARNING_URL'           => $WarnUrl,
40
        'USERNAME_FIELDNAME'    => $username_fieldname,
41
        'PASSWORD_FIELDNAME'    => $password_fieldname,
42
        'REMEMBER_ME_OPTION'    => SMART_LOGIN,
43
        'MIN_USERNAME_LEN'      => 2,
44
        'MIN_PASSWORD_LEN'      => 3,
45
        'MAX_USERNAME_LEN'      => 100,
46
        'MAX_PASSWORD_LEN'      => 100,
47
        'LOGIN_URL'             => ADMIN_URL."/login/index.php",
48
        'DEFAULT_URL'           => ADMIN_URL."/start/index.php",
49
//        'REDIRECT_URL'          => ADMIN_URL."/pages/index.php",
50
        'TEMPLATE_DIR'          => $ThemePath,
51
        'TEMPLATE_FILE'         => $LoginTpl,
52
        'FRONTEND'              => false,
53
        'FORGOTTEN_DETAILS_APP' => ADMIN_URL."/login/forgot/index.php",
54
        'USERS_TABLE'           => TABLE_PREFIX."users",
55
        'GROUPS_TABLE'          => TABLE_PREFIX."groups",
56
    )
57
);
58

    
    (1-1/1)