$tours) { $tr = $tours; } // count down tour num till we find one that DOES exist.. if ($page != 'index.php') { if (!file_exists(file_exists("$path/$page"))) { for ($a = $tr; $a > 1; $a -= 1) { if (!$true) { if (file_exists("$path/$a.php")) { $page = "$a.php"; $true = 1; } } } } } if (file_exists("$path/$page")) { include_once("$path/$page"); } // we default to index.php if shit happens! else { include_once("$path/index.php"); } ?>