Example #1
0
        $AppUI->setMsg('Event');
        $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
        $AppUI->redirect();
    }
}
// load the event types
$types = w2PgetSysVal('EventType');
// Load the users
$users = $perms->getPermittedUsers('calendar');
// Load the assignees
$assigned = array();
if ($is_clash) {
    $assignee_list = $_SESSION['add_event_attendees'];
    if (isset($assignee_list) && $assignee_list) {
        $event = new Event();
        $assigned = $event->getAssigneeList($assignee_list);
    }
} else {
    if ($event_id == 0) {
        $assigned[$AppUI->user_id] = $AppUI->user_first_name . ' ' . $AppUI->user_last_name;
    } else {
        $assigned = $obj->getAssigned();
    }
    // Now that we have loaded the possible replacement event,  remove the stored
    // details, NOTE: This could cause using a back button to make things break,
    // but that is the least of our problems.
    if ($is_clash) {
        unset($_SESSION['add_event_post']);
        unset($_SESSION['add_event_attendees']);
        unset($_SESSION['add_event_mail']);
        unset($_SESSION['add_event_clash']);