2020-04-20 19:49:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$router = new Router();
|
|
|
|
|
|
|
|
$router->setDefault(function(){
|
|
|
|
echo '404';
|
|
|
|
});
|
|
|
|
|
2020-04-21 12:11:34 +00:00
|
|
|
//Pages
|
|
|
|
$router->any('/', 'Home');
|
|
|
|
$router->any('/login', 'Login');
|
|
|
|
$router->any('/logout', 'Logout');
|
|
|
|
$router->any('/automation', 'Automation');
|
|
|
|
$router->any('/dashboard', 'Dashboard');
|
|
|
|
$router->any('/setting', 'Setting');
|
|
|
|
$router->any('/scene', 'Scene');
|
|
|
|
$router->any('/ajax', 'Ajax');
|
|
|
|
$router->any('/log', 'Log');
|
|
|
|
$router->any('/rooms', 'Rooms');
|
|
|
|
|
2020-04-20 19:49:30 +00:00
|
|
|
$router->run($_SERVER['REQUEST_METHOD'], '/'.$_GET['url']);
|