0
0

deleted config.json - no more need of it, added installer to create config.json

This commit is contained in:
Bryan
2019-06-02 15:20:08 +02:00
parent 312d03599f
commit 8abf2c5e8a
5 changed files with 160 additions and 15 deletions

View File

@@ -1,8 +1,17 @@
<?php
session_start ( );
$GLOBALS [ 'request_uri' ] = explode ( "/", $_GET [ 'URI' ] );
if ( ! file_exists ( 'config.json' ) ) {
if ( $GLOBALS[ 'request_uri' ] [ 0 ] !== "install" ) {
header ( "Location: " . substr ( $_SERVER [ 'SCRIPT_NAME' ], 0, -10 ) . "/install" );
}
}
if ( $GLOBALS [ 'request_uri' ] [ 0 ] == "install" ) {
include ( 'lib/php/install.php' );
exit;
}
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":
@@ -24,5 +33,5 @@
}
}
else {
header ( "Location: " . $GLOBALS [ 'config' ] [ 'installation_path' ] . "/dashboard" );
header ( "Location: " . $GLOBALS [ 'config' ] [ 'installation_path' ] . "/login" );
}