mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:47:02 +02:00
added single sign-on support
This commit is contained in:
47
webui/sso.php
Normal file
47
webui/sso.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
function go_to_setup() {
|
||||
Header("Location: setup/setup.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$stat = stat("config.php") or go_to_setup();
|
||||
if($stat[7] < 15){ go_to_setup(); }
|
||||
|
||||
|
||||
require_once("config.php");
|
||||
|
||||
require(DIR_SYSTEM . "/startup.php");
|
||||
|
||||
|
||||
$request = new Request();
|
||||
Registry::set("request", $request);
|
||||
|
||||
|
||||
session_start();
|
||||
|
||||
Registry::set('document', new Document());
|
||||
|
||||
|
||||
$loader = new Loader();
|
||||
Registry::set('load', $loader);
|
||||
|
||||
|
||||
$language = new Language();
|
||||
Registry::set('language', $language);
|
||||
|
||||
|
||||
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE, DB_PREFIX);
|
||||
Registry::set('DB_DATABASE', DB_DATABASE);
|
||||
|
||||
Registry::set('db', $db);
|
||||
|
||||
Registry::set('DB_DRIVER', DB_DRIVER);
|
||||
|
||||
$action = new Router('login/sso');
|
||||
|
||||
$controller = new Front();
|
||||
$controller->dispatch($action, new Router('common/not_found'));
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user