v1.0 Initial commit of project
This commit is contained in:
34
pub/index.php
Normal file
34
pub/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use bin\php\Classes\pageBuilder;
|
||||
|
||||
session_start();
|
||||
define('APP_INIT', true);
|
||||
|
||||
if (!isset($_SESSION['user'])) {
|
||||
header("Location: /login/");
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once './bin/php/Classes/pageBuilder.php';
|
||||
include_once './bin/php/db_connect.php';
|
||||
include_once './bin/php/Functions/globalFunctions.php';
|
||||
include_once './login/php/authFunctions.php';
|
||||
|
||||
$locale = getPreferredLocale();
|
||||
$translations = require $_SERVER['DOCUMENT_ROOT'] . "/bin/locales/{$locale}.php";
|
||||
|
||||
$GLOBALS['modules_enabled'] = getEnabledModules();
|
||||
|
||||
$pageBuilder = new pageBuilder();
|
||||
|
||||
if ($GLOBALS['pageContentToShow']['noUsersAllowed']) {
|
||||
if (checkIfUser()) {
|
||||
exit;
|
||||
}
|
||||
}
|
||||
setSessionParams();
|
||||
|
||||
$pageBuilder->buildPage();
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user