-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (28 loc) · 1.27 KB
/
index.php
File metadata and controls
33 lines (28 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Created by PhpStorm.
* User: root
* Date: 24.06.18
* Time: 20:54
*/
require "vendor/autoload.php";
/*
* Error and Exception handling
**/
error_reporting(E_ALL);
set_error_handler("Core\Error::errorHandler");
set_exception_handler("Core\Error::exceptionHandler");
$router = new Core\Router();
$router->add("", ["controller" => "LandingPage", "action" => "index"]);
$router->add("login", ["controller" => "Login", "action" => "login"]);
$router->add("logout", ["controller" => "Logout", "action" => "logout"]);
$router->add("home", ["controller" => "Home", "action" => "home"]);
$router->add("register", ["controller" => "Register", "action" => "register"]);
$router->add("monitoring", ["controller" => "Monitoring", "action" => "monitor"]);
$router->add("monitoring/{server:.+}", ["controller" => "Monitoring", "action" => "updateMonitoring"]);
$router->add("raw", ["controller" => "RawLogs", "action" => "rawLogs"]);
$router->add("raw/{server:.+}/{page:\d+}", ["controller" => "RawLogs", "action" => "rawLogsPage"]);
$router->add("raw/refresh/{server:.+}", ["controller" => "RawLogs", "action" => "rawLogsRefresh"]);
$router->add("charts", ["controller" => "LogCharts", "action" => "charts"]);
$router->add("{controller}/{action}");
$router->dispatch($_SERVER["QUERY_STRING"]);