Id() ) { $message[] = array($eid=>'Event not found.'); } else if ( $event->Archived() ) { $message[] = array($eid=>'Event is archived, cannot delete it.'); } else { $event->delete(); } break; } // end switch action } // end foreach ajaxResponse($message); } // end if canEdit('Events') ajaxError('Unrecognised action '.$_REQUEST['action'].' or insufficient permissions for user '.$user['Username']); ?>