0 ) ); $bad_root=false; for ($i=0; $i0) { $page_position=(count($page)==1 && $page[0]['id']==0)?0:count($page); $page[$page_position]=$result[0]; } else { $bad_root=true; break; } } if ($bad_root) { header("HTTP/1.0 404 Not Found"); $page[0]['id']=0; $page[0]['father_id']=0; $page[0]['url']=$url_full_path; $page[0]['title']="Top Flooring Contractors - Error 404"; $page[0]['h1']="Page Not Found"; $page[0]['content']="The Page could not be found."; $page[0]['population']=0; } $page_root=$page; $page=$page[count($page)-1]; $h1=($page['h1'])?'

'.ucwords_exeptions(special_chars($page['h1'])).'

':''; $content=str_to_code($page['content']); require "header.php"; if (in_array($page['url'], array("index"))) { $path_to_page=""; } else { $path_to_page=array('Homepage'); $tmp_url=array(); foreach ($page_root as $k => $v) { $tmp_url[]=$page_root[$k]['url']; if ($k+1'.$page_root[$k]['link_text'].''; } else { $path_to_page[]=$page_root[$k]['link_text']; } } $path_to_page='

You are here: '.implode(" » ", $path_to_page).'

'; } echo $path_to_page.$h1.$content; if ($page['url']=="site-map") { make_sitemap(0, ""); } require "footer.php"; ?>