Example #1
0
/**
 * Outputs the form for editing existing location
 */
function edit_locations()
{
    View::loadScripts();
    $locations = EventDatabaseManager::getAllLocations();
    View::outputAllLocations('edit_locations', $locations);
    View::linkToAddLocation();
    if (isset($_GET['locationID']) && is_numeric($_GET['locationID'])) {
        $location = EventDatabaseManager::getLocation($_GET['locationID']);
        View::locationFormOutput($location['locationID'], $location['name']);
    } else {
        if (isset($_GET['locationID'])) {
            echo MANDANT_ID_INCORRECT_MESSAGE;
        }
    }
}