fix
This commit is contained in:
parent
e97fc554c7
commit
f219adfa5f
11
index.php
11
index.php
@ -32,15 +32,6 @@ if (empty($page_name)){
|
|||||||
session_set_cookie_params(0, '/', ".$domain.$tld", true, true);
|
session_set_cookie_params(0, '/', ".$domain.$tld", true, true);
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
$navpages = generateNavigation($static_page_dir, $protocol, $subdomain, $domain, $tld, $default_page, $page_name);
|
echo getPage($routerConfig);
|
||||||
|
|
||||||
$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;
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -9,7 +9,7 @@ function getProtocol(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getPage($routerConfig){
|
function getPage($routerConfig){
|
||||||
$page_dir = $routerConfig['page_dir'];
|
$page_dir = "pages/";
|
||||||
|
|
||||||
$dynamic_page_file = $page_dir . $subdomain . "/" . $page_name . ".php";
|
$dynamic_page_file = $page_dir . $subdomain . "/" . $page_name . ".php";
|
||||||
$page_file = $page_dir . $subdomain . "/" . $page_name . ".html";
|
$page_file = $page_dir . $subdomain . "/" . $page_name . ".html";
|
||||||
@ -35,6 +35,15 @@ function getPage($routerConfig){
|
|||||||
else{
|
else{
|
||||||
$page = file_get_contents($template_dir . "404.html");
|
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user