FORM; /* delete a map if needed */ if($_REQUEST["delete"]) if($_REQUEST["delete"] != ".htaccess") if($_REQUEST["delete"] != "style.css"){ if(file_exists(MAP_LOCATION. $_REQUEST["delete"])) if(unlink(MAP_LOCATION.$_REQUEST["delete"])) echo "Deteled ". $_REQUEST["delete"] . "

"; } /* display the maps */ $hasMaps = false; if ($handle = opendir(MAP_LOCATION)) { echo "Existing Maps

"; /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { if($file != ".htaccess") if($file != "style.css") if($file != ".") if($file !=".."){ echo <<$file
MAP; $hasMaps = true; } } closedir($handle); if(!$hasMaps) echo"There are no maps yet"; } echo "
"; include("classes/footer.php"); ?>