コード例 #1
0
        checkMinGroup(3);
    }
}
// Submit
if (!$_GET['rid']) {
    $rid = $_POST['rid'];
    c2r_routepoints_delete($rid);
    $pos = 0;
    for ($i = 0; $i < 10; $i++) {
        if (!$_POST['delete_' . $i]) {
            $pos++;
            $pid = $_POST['point'][$i];
            $st = $_POST['steptime'][$i];
            c2r_routepoints_insert($rid, $pid, $st, $pos);
        }
    }
    addInfoMessage('Route Points saved!');
    // Reload route
    $route = c2r_routes_get($rid);
}
$rps = c2r_route_points_get($rid);
if ($_GET['my']) {
    $smarty->assign('my', true);
}
$smarty->assign('rid', $rid);
$smarty->assign('rps', $rps);
$smarty->assign('locations', $locations);
$smarty->assign('location', $location);
$smarty->assign('route', $route);
#$smarty->assign('company', $company);
smarty_display('route_points');
コード例 #2
0
ファイル: ajax_map.php プロジェクト: smarti04/open-carpool
<?php

/* Open CarPool is free software published under GPLv3 license, see license.txt for details. (C) 2009-2014 Oliver Pintat, Clemens Rath */
require_once '../../functions/functions.php';
$rid = $_GET['rid'];
$route = c2r_routes_get($rid);
$points = c2r_route_points_get($route->id);
$gpoints = array();
foreach ($points as $key => $point) {
    $p = c2r_pickuppoints_get($point->point_id);
    $gpoints[] = $p;
}
?>

<script type="text/javascript">
<!--
var map = null;
var marker = null;
function doInit() {
	<?php 
$helper = split(' ', $gpoints[count($gpoints) - 1]->geo);
?>
  lat = <?php 
echo $helper[0];
?>
;
	lng = <?php 
echo $helper[1];
?>
;
	var myLatlng = new google.maps.LatLng(lat, lng);