test
This commit is contained in:
parent
53d3c1be54
commit
56b338e65f
@ -59,7 +59,7 @@ else{
|
||||
$page = file_get_contents($template_dir . "404.html");
|
||||
}
|
||||
|
||||
$navpages = include_once $template_dir . "navpages.php";
|
||||
$navpages = generateNavigation($static_page_dir, $protocol, $subdomain, $domain, $tld, $default_page, $page_name);
|
||||
|
||||
$nav = str_replace("__NAV_PAGES__", $navpages, $nav);
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
function generateNavigation($static_page_dir, $protocol, $subdomain, $domain, $tld, $default_page, $page_name)
|
||||
{
|
||||
$navsite_template = '<li class="navsite_item"><a href="__LOCATION__" __CLASS__>__NAME__</a><ul class="navpage_list">__NAVPAGES__</ul></li>';
|
||||
$navpage_template = '<li class="navpage_item"><a href="__LOCATION__" __CLASS__>__NAME__</a></li>';
|
||||
|
||||
|
||||
$site_dirs = array_diff(scandir($static_page_dir), array('.', '..'));
|
||||
|
||||
$nav_out = "";
|
||||
@ -16,7 +17,7 @@ foreach($site_dirs as $site_dir){
|
||||
$site_name = str_replace("_", " ", $site_dir);
|
||||
if ($site_name == "global") {
|
||||
$site_name = "misc";
|
||||
$site_dir = $default_site;
|
||||
$site_dir = $default_page;
|
||||
}
|
||||
$site_location = "$protocol$site_dir.$domain.$tld/$default_page";
|
||||
$navsite = str_replace("__CLASS__", $site_class, $navsite);
|
||||
@ -52,5 +53,6 @@ foreach($site_dirs as $site_dir){
|
||||
}
|
||||
|
||||
return $nav_out;
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user