updated index.php with a getlocations and getorders function