0
0
This repository has been archived on 2020-11-15. You can view files and clone it, but cannot push or open issues or pull requests.
OpenShorte.old/index.php
Bryan b21dd0518d
Website refactored
Prepared the website structure for the new layout
2019-05-29 19:03:06 +02:00

29 lines
997 B
PHP

<?php
session_start ( );
require_once ( 'functions.php' );
$GLOBALS [ 'config' ] = load_config ( );
$GLOBALS [ 'request_uri' ] = explode ( "/", $_GET [ 'URI' ] );
if ( isset ( $GLOBALS [ 'request_uri' ] [ 0 ] ) && $GLOBALS [ 'request_uri' ] [ 0 ] != "" ) {
switch ( $GLOBALS [ 'request_uri' ] [ 0 ] ) {
case "go":
include ( 'lib/php/go.php' );
break;
case "login":
include ( 'lib/php/login.php' );
break;
case "logout":
include ( 'lib/php/logout.php' );
break;
case "dashboard":
include ( 'lib/php/dashboard.php' );
break;
default:
http_response_code ( 404 );
include ( 'lib/errors/404.html' );
die ( );
}
}
else {
header ( "Location: " . $GLOBALS [ 'config' ] [ 'installation_path' ] . "/dashboard" );
}