Beispiel #1
0
            $message .= '<li>' . $error . '</li>';
        }
        $message .= '</ul>';
        header('Content-Type: text/html; charset=utf-8');
        echo $message;
        exit;
    }
    // Display the installation form if no existing config is found
    install();
}
$GLOBALS['title'] = !empty($GLOBALS['title']) ? escape($GLOBALS['title']) : '';
$GLOBALS['titleLink'] = !empty($GLOBALS['titleLink']) ? escape($GLOBALS['titleLink']) : '';
$GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redirector']) : '';
// a token depending of deployment salt, user password, and the current ip
define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'] . $_SERVER["REMOTE_ADDR"] . $GLOBALS['salt']));
autoLocale();
// Sniff browser language and set date format accordingly.
header('Content-Type: text/html; charset=utf-8');
// We use UTF-8 for proper international characters handling.
//==================================================================================================
// Checking session state (i.e. is the user still logged in)
//==================================================================================================
function setup_login_state()
{
    if ($GLOBALS['config']['OPEN_SHAARLI']) {
        return true;
    }
    $userIsLoggedIn = false;
    // By default, we do not consider the user as logged in;
    $loginFailure = false;
    // If set to true, every attempt to authenticate the user will fail. This indicates that an important condition isn't met.
Beispiel #2
0
        $message .= '</ul>';
        header('Content-Type: text/html; charset=utf-8');
        echo $message;
        exit;
    }
    // Display the installation form if no existing config is found
    install();
}
$GLOBALS['title'] = !empty($GLOBALS['title']) ? escape($GLOBALS['title']) : '';
$GLOBALS['titleLink'] = !empty($GLOBALS['titleLink']) ? escape($GLOBALS['titleLink']) : '';
$GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redirector']) : '';
// a token depending of deployment salt, user password, and the current ip
define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'] . $_SERVER["REMOTE_ADDR"] . $GLOBALS['salt']));
// Sniff browser language and set date format accordingly.
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
    autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']);
}
header('Content-Type: text/html; charset=utf-8');
// We use UTF-8 for proper international characters handling.
//==================================================================================================
// Checking session state (i.e. is the user still logged in)
//==================================================================================================
function setup_login_state()
{
    if ($GLOBALS['config']['OPEN_SHAARLI']) {
        return true;
    }
    $userIsLoggedIn = false;
    // By default, we do not consider the user as logged in;
    $loginFailure = false;
    // If set to true, every attempt to authenticate the user will fail. This indicates that an important condition isn't met.