Exemplo n.º 1
0
function get_route_metadata($route) {
  $metadata = Array();
  $metadata['route_id'] = $route;
  $metadata['title'] = ShuttleSchedule::get_title($route);
  $metadata['interval'] = ShuttleSchedule::get_interval($route) / 60;
  $metadata['isSafeRide'] = ShuttleSchedule::is_safe_ride($route);
  $metadata['isRunning'] = ShuttleSchedule::is_running($route);
  $metadata['summary'] = ShuttleSchedule::get_summary($route);
  return $metadata;
}
Exemplo n.º 2
0
<?php

require_once "../config/mobi_web_constants.php";
require_once PAGE_HEADER;
require_once LIBDIR . "ShuttleSchedule.php";
require_once LIBDIR . "NextBusReader.php";
NextBusReader::init();
$now = time();
$routes = ShuttleSchedule::get_active_routes();
$day_routes = array();
$night_routes = array();
foreach ($routes as $route) {
    if (ShuttleSchedule::is_safe_ride($route)) {
        $night_routes[] = $route;
    } else {
        $day_routes[] = $route;
    }
}
require "{$page->branch}/index.html";
$page->output();