Exemplo n.º 1
0
$SEARCH_FORM = $util->makeSearchForm();
// route
$id = isset($_GET["id"]) ? intval($_GET["id"]) : 1;
$route = $db->getRouteById($id);
$com_id = $route["company_id"];
$route_name = $route["bus_line"];
$route_day = $route["day"];
$route_saturday = $route["saturday"];
$route_holiday = $route["holiday"];
$route_type = $util->getBusType($route["type"]);
list($map_lat, $map_lon, $map_zoom) = $util->calcMapCenter($route["max_lat"], $route["min_lat"], $route["max_lon"], $route["min_lon"]);
$map_corves = $db->getMapCorvesByRoutes(array($route));
$map_lines = $util->makeLines($map_corves);
// company
$com_id = $route["company_id"];
$com = $db->getCompanyById($route["company_id"]);
$url_corp = "<a href=\"company.php?id=" . $com_id . "\">" . $com["name"] . "</a>";
$url_home = "";
if ($com["url_home"]) {
    $url_home = "<a href=\"" . $com["url_home"] . "\" target=\"_blank\">[ホームページ]</a>";
}
$url_search = "";
if ($com["url_search"]) {
    $url_search = "<a href=\"" . $com["url_search"] . "\" target=\"_blank\">[時刻表]</a>";
}
// nodes
$nodes = $db->getNodesByRouteId($id);
$map_markers = $util->makeNodeMarkers($nodes);
$list = $util->makeNodeList($nodes);
$node_num = count($nodes);
// prefs
Exemplo n.º 2
0
 * 2015-12-01 K.OHWADA
 */
/**
 * company
 */
include_once "config.php";
include_once "class/BusDb.php";
include_once "class/BusUtil.php";
$util = new BusUtil();
$db = new BusDb();
$db->connect();
$SEARCH_FORM = $util->makeSearchForm();
$MAP_MAX_ZOOM = 13;
// company
$id = isset($_GET["id"]) ? intval($_GET["id"]) : 1;
$com = $db->getCompanyById($id);
$com_name = $com["name"];
list($map_lat, $map_lon, $map_zoom) = $util->calcMapCenter($com["max_lat"], $com["min_lat"], $com["max_lon"], $com["min_lon"]);
$url_home = "";
if ($com["url_home"]) {
    $url_home = "<a href=\"" . $com["url_home"] . "\" target=\"_blank\">[ホームページ]</a>";
}
$url_search = "";
if ($com["url_search"]) {
    $url_search = "<a href=\"" . $com["url_search"] . "\" target=\"_blank\">[時刻表]</a>";
}
// routes
$routes = $db->getRoutesByComId($id);
list($list, $list_navi, $list_height) = $util->makeRouteList($routes, false);
$map_corves = $db->getMapCorvesByRoutes($routes);
$map_lines = $util->makeLines($map_corves);