2024-07-01 20:53:23 -05:00
|
|
|
<?php // index.php :: Primary program script, evil alien overlord, you decide.
|
|
|
|
|
2024-07-11 18:17:51 -05:00
|
|
|
// define our server path and bootstrap the request
|
2024-07-02 10:33:14 -05:00
|
|
|
const SERVER = '../server';
|
|
|
|
require_once SERVER.'/bootstrap.php';
|
2024-07-01 20:53:23 -05:00
|
|
|
|
2024-07-11 20:47:39 -05:00
|
|
|
// spin up our app container and the initial route
|
2024-07-11 18:17:51 -05:00
|
|
|
$app = new App(DB);
|
|
|
|
$route = App::$req->uri(0);
|
2024-07-11 20:47:39 -05:00
|
|
|
|
|
|
|
// redirect depending on installation status
|
|
|
|
installRedirect($route);
|
|
|
|
|
|
|
|
if ($route == '/') return HomeModule::home();
|
2024-07-11 21:17:06 -05:00
|
|
|
if ($route == 'install') return InstallModule::handle();
|
2024-07-11 20:47:39 -05:00
|
|
|
|
|
|
|
// 404
|
|
|
|
http_response_code(404);
|
|
|
|
echo '404: ' . $route;
|