$location = $event->location; echo "<li data-equalizer style='display:block;float:none;width:100%;padding:0;'>\n\t\t\t\t \t<a href='" . $url . "' target='_blank'>\n\t\t\t\t <p class='event_date' data-equalizer-watch>" . $monthDisplay . "\n\t\t\t\t <span>" . $dayDisplay . "</span>\n\t\t\t\t </p>\n\t\t\t\t <p class='event_info' data-equalizer-watch>\n\t\t\t\t <span class='event_title'>" . $title . "</span>\n\t\t\t\t <span class='event_time'>" . $location . "\n\t\t\t\t <br>" . $time . "</span>\n\t\t\t\t </p>\n\t\t\t\t </a>\n\t\t\t\t </li>"; $itemCount++; } } if ($itemCount <= 5 && $backfill == '1') { getEvents("http://events.uoit.ca/api/v1/rss"); } } echo "<section class='events' style='width:100%'>\n\t\t\t<ul id='list_events' style='max-height:none;overflow:hidden;'>"; getEvents("http://events.uoit.ca/api/v1/rss/" . $query, $_GET['count'], $_GET['backfill']); echo "</ul>\n\t\t\t</section>"; } else { if (isset($_GET['type']) && $_GET['type'] == 3) { $event = new DB(); $buildings = $event->getBuildings(); $event = $event->getById($_GET['id']); if (!empty($event)) { //print_r($event); $card_title = $event[0]['event_name']; $card_desc = $event[0]['event_description']; $card_link = 'http://events.uoit.ca/event/' . $event[0]['id']; $loc_building = $event[0]['location_building']; $loc_campus = $event[0]['location_campus']; $loc_room = $event[0]['location_room']; $loc_other = $event[0]['location_other'] ? $event[0]['location_other'] : ''; $loc_building = $loc_building != 0 ? $buildings[$loc_building] : ''; $card_url = $event[0]['event_url']; $card_img = $event[0]['upload_image']; if ($loc_campus != 2) { $card_loc .= $loc_campus == 0 ? 'North Oshawa Location' : 'Downtown Oshawa Location';
/** * FACULTIES endpoint */ protected function buildings() { $feed = new DB(); if ($this->method == 'GET') { $builds = $feed->getBuildings($this->verb); return json_encode($builds); } else { return "Only accepts GET requests"; } }