* Check if preferences need to be updated. */ preferences_update($MODULE, $PREFERENCES); /** * Fetch all of the events that apply to the current filter set. */ $learning_events = events_fetch_filtered_events($ENTRADA_USER->getActiveId(), $ENTRADA_USER->getActiveGroup(), $ENTRADA_USER->getActiveRole(), $ENTRADA_USER->getActiveOrganisation(), $_SESSION[APPLICATION_IDENTIFIER]["events"]["sb"], $_SESSION[APPLICATION_IDENTIFIER]["events"]["so"], $_SESSION[APPLICATION_IDENTIFIER]["events"]["dtype"], $_SESSION[APPLICATION_IDENTIFIER]["tmp"]["dstamp"], 0, $_SESSION[APPLICATION_IDENTIFIER]["events"]["filters"], true, isset($_GET["pv"]) ? (int) trim($_GET["pv"]) : 1, $_SESSION[APPLICATION_IDENTIFIER]["events"]["pp"], false, false); echo "<h1>" . $MODULES[strtolower($MODULE)]["title"] . "</h1>"; if (isset($_SESSION["export_error"]) && $_SESSION["export_error"]) { add_error($_SESSION["export_error"]); echo display_error(); } /** * Output the filter HTML. */ events_output_filter_controls("admin"); if ($ENTRADA_ACL->amIAllowed("event", "create", false)) { ?> <div class="row-fluid"> <span class="pull-right"> <a class="btn space-right" href="<?php echo ENTRADA_RELATIVE; ?> /admin/events/drafts"><i class="icon-file"></i> Manage My Drafts</a> <a class="btn btn-success" href="<?php echo ENTRADA_RELATIVE; ?> /admin/events?section=add"><i class="icon-plus-sign icon-white"></i> Add New Event</a> </span> </div> <br />
/** * Process any filter requests. */ events_process_filters($ACTION); /** * Check if preferences need to be updated. */ preferences_update($MODULE, $PREFERENCES); /** * Fetch all of the events that apply to the current filter set. */ $learning_events = events_fetch_filtered_events($ENTRADA_USER->getActiveId(), $ENTRADA_USER->getActiveGroup(), $ENTRADA_USER->getActiveRole(), $ENTRADA_USER->getActiveOrganisation(), $_SESSION[APPLICATION_IDENTIFIER]["events"]["sb"], $_SESSION[APPLICATION_IDENTIFIER]["events"]["so"], $_SESSION[APPLICATION_IDENTIFIER]["events"]["dtype"], $_SESSION[APPLICATION_IDENTIFIER]["tmp"]["dstamp"], 0, $_SESSION[APPLICATION_IDENTIFIER]["events"]["filters"], true, isset($_GET["pv"]) ? (int) trim($_GET["pv"]) : 1, $_SESSION[APPLICATION_IDENTIFIER]["events"]["pp"]); /** * Output the filter HTML. */ events_output_filter_controls(); /** * Output the calendar controls and pagination. */ events_output_calendar_controls(); if (!empty($learning_events["events"])) { ?> <div class="tableListTop"> <img src="<?php echo ENTRADA_RELATIVE; ?> /images/lecture-info.gif" width="15" height="15" alt="" title="" style="vertical-align: middle" /> <?php switch ($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["dtype"]) { case "day": echo "Found " . count($learning_events["result_ids_map"]) . " event" . (count($learning_events["result_ids_map"]) != 1 ? "s" : "") . " that take place on <strong>" . date("D, M jS, Y", $learning_events["duration_start"]) . "</strong>.\n";