__NAME__';
$navpage_template = '__NAME__';
$page_dir = "pages";
$site_dirs = array_diff(scandir($page_dir), array('.', '..'));
$domain = basename(explode('.', $_SERVER['HTTP_HOST'])[1]);
$tld = basename(explode('.', $_SERVER['HTTP_HOST'])[2]);
foreach($site_dirs as $site_dir){
$pages_dir = array_diff(scandir("$page_dir/$site_dir"), array('.', '..'));
$navpages = "";
foreach($pages_dir as $page_dir){
$navpage = $navpage_template;
$navpage =
$navpages .= $navpage;
}
}
return ob_get_clean();
?>