mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 11:24:52 +00:00
Better logic for the index/root page:
- If app user, send to their start page - If a client contact, send back to the client area - If not logged in at all, make them
This commit is contained in:
23
index.php
23
index.php
@@ -1,10 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
// App setup is complete?
|
||||||
if (file_exists("config.php")) {
|
if (file_exists("config.php")) {
|
||||||
//require_once "includes/check_login.php";
|
require_once "config.php";
|
||||||
|
require_once "includes/session_init.php";
|
||||||
|
|
||||||
header("Location: /user/$config_start_page");
|
// If they are an app user, send them to their start page
|
||||||
|
if (isset($_SESSION['logged'])) {
|
||||||
|
require_once "includes/load_global_settings.php";
|
||||||
|
header("Location: /user/$config_start_page");
|
||||||
|
|
||||||
|
// If they're a client, send them to the client area
|
||||||
|
} elseif (isset($_SESSION['client_logged_in'])) {
|
||||||
|
header("Location: /client/");
|
||||||
|
|
||||||
|
// Else, require login
|
||||||
|
} else {
|
||||||
|
header("Location: /login.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Installation needs to be completed
|
||||||
} else {
|
} else {
|
||||||
header("Location: /setup");
|
header("Location: /setup");
|
||||||
exit();
|
exit();
|
||||||
|
|||||||
Reference in New Issue
Block a user