echo display_error(); application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] does not have access to this module [" . $MODULE . "]"); } else { if ($EVENT_ID) { $query = "\tSELECT a.*, b.`organisation_id`\n\t\t\t\t\tFROM `events` AS a\n\t\t\t\t\tLEFT JOIN `courses` AS b\n\t\t\t\t\tON b.`course_id` = a.`course_id`\n\t\t\t\t\tWHERE a.`event_id` = " . $db->qstr($EVENT_ID); $event_info = $db->GetRow($query); if ($event_info) { if (!$ENTRADA_ACL->amIAllowed(new EventContentResource($event_info["event_id"], $event_info["course_id"], $event_info["organisation_id"]), "update")) { application_log("error", "Someone attempted to view statistics for an event [" . $EVENT_ID . "] that they were not the coordinator for."); header("Location: " . ENTRADA_URL . "/admin/" . $MODULE); exit; } else { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/events?" . replace_query(array("section" => "Statistics", "id" => $EVENT_ID)), "title" => "Event Statistics"); $PROCESSED["proxy_id"] = $ENTRADA_USER->getID(); //This will create a record set that has the proxyid, firstname, lastname, last timestamp, view per user. $statistics = Models_Statistic::getEventViews($EVENT_ID); $total_views = 0; events_subnavigation($event_info, 'statistics'); ?> <div class="content-small"><?php echo fetch_course_path($event_info["course_id"]); ?> </div> <h1 id="page-top" class="event-title"><?php echo html_encode($event_info["event_title"]); ?> </h1> <h2 title="Event Statistics Section">Event Statistics</h2> <?php $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_RELATIVE . "/javascript/jquery/jquery.dataTables.min.js?release=" . html_encode(APPLICATION_VERSION) . "\"></script>"; ?>