This commit is contained in:
Bruno Rybársky 2024-01-16 19:38:42 +01:00
parent e97fc554c7
commit f219adfa5f
2 changed files with 12 additions and 12 deletions

@ -32,15 +32,6 @@ if (empty($page_name)){
session_set_cookie_params(0, '/', ".$domain.$tld", true, true);
session_start();
$navpages = generateNavigation($static_page_dir, $protocol, $subdomain, $domain, $tld, $default_page, $page_name);
$nav = str_replace("__NAV_PAGES__", $navpages, $nav);
$out = $skeleton;
$out = str_replace("__TEMPLATE__NAV__", $nav, $out);
$out = str_replace("__TEMPLATE__PAGE__", $page, $out);
$out = str_replace("__TEMPLATE_PAGE_NAME__", $page_name, $out);
echo $out;
echo getPage($routerConfig);
?>

@ -9,7 +9,7 @@ function getProtocol(){
}
function getPage($routerConfig){
$page_dir = $routerConfig['page_dir'];
$page_dir = "pages/";
$dynamic_page_file = $page_dir . $subdomain . "/" . $page_name . ".php";
$page_file = $page_dir . $subdomain . "/" . $page_name . ".html";
@ -35,6 +35,15 @@ function getPage($routerConfig){
else{
$page = file_get_contents($template_dir . "404.html");
}
$navpages = generateNavigation($static_page_dir, $protocol, $subdomain, $domain, $tld, $default_page, $page_name);
$nav = str_replace("__NAV_PAGES__", $navpages, $nav);
$out = $skeleton;
$out = str_replace("__TEMPLATE__NAV__", $nav, $out);
$out = str_replace("__TEMPLATE__PAGE__", $page, $out);
$out = str_replace("__TEMPLATE_PAGE_NAME__", $page_name, $out);
return $out;
}
?>