stylehub/index.php
Bruno Rybársky 8ba1637176 Add some more account actions,
Add return types,
Add some stuff
2024-01-31 23:07:12 +01:00

33 lines
861 B
PHP

<?php
/** @noinspection PhpIncludeInspection */
require_once "secrets/config.php";
require_once "lib/config.php";
require_once "lib/navigation.php";
require_once "lib/router.php";
require_once "lib/page.php";
require_once "lib/endpoint.php";
$routerConfig = array();
$routerRequest = array();
loadRouterConfig();
if(initRouter()) {
/** @noinspection PhpArrayIsAlwaysEmptyInspection */
session_set_cookie_params(0, '/', "." . $routerRequest["domain"] . "." . $routerRequest["tld"], true, true);
session_start();
if($routerRequest["type"] == "api") {
echo getEndpoint($routerRequest["page_name"]);
}elseif ($routerRequest["type"] == "page") {
/** @noinspection PhpArrayIsAlwaysEmptyInspection */
echo getPage($routerRequest["page_name"]);
}
else{
echo "Unknown request";
}
}
else{
exit();
}