예제 #1
0
                if ($_POST['locationID'] == '' && $_POST['location'] != "") {
                    $addressValues['locationID'] = EventDatabaseManager::addLocation($_POST['location']);
                }
                $address = new Address($addressValues);
                EventDatabaseManager::addAddress($address);
                $eventParams['addressID'] = $address->getID();
            }
            if (!isset($_POST['event_visible'])) {
                $eventParams['event_visible'] = 0;
            }
            $event = new Event($eventParams);
            if (isset($_GET['eventID'])) {
                $event->setEventID(mysql_real_escape_string($_GET['eventID']));
                $result = EventDatabaseManager::updateEvent($event);
            } else {
                $result = EventDatabaseManager::addEvent($event);
            }
            if ($result) {
                MessageHandling::m(EVENT_ADDED_MESSAGE);
            } else {
                MessageHandling::m(EVENT_NOT_ADDED_MESSAGE);
            }
        }
    }
}
function show_progress()
{
    /* this function is a copy of edit_event() */
    /*
    $mandants = EventDatabaseManager::getAllMandants();
    View::outputAllMandants('edit_mandants', $mandants);