--- a/include/db/trip-dao.inc.php +++ b/include/db/trip-dao.inc.php @@ -1,1 +1,132 @@ + $row) { + if ($foundStop) { + if (!$timingPointsOnly || !startsWith($row[5], "Wj")) { + $viaPoints[] = Array( + "id" => $row[0], + "name" => $row[1], + "time" => $times[$key] + ); + } + } + else { + if ($row[0] == $stopid) $foundStop = true; + } + } + return $viaPoints; +} +function viaPointNames($tripid, $stopid) +{ + $points = viaPoints($tripid, $stopid, true); + $pointNames = Array(); + foreach ($points as $point) { + $pointNames[] = $point['name']; + } + return implode(", ", $pointNames); +} +?>