--- a/include/common-transit.inc.php +++ b/include/common-transit.inc.php @@ -27,7 +27,8 @@ return $_SESSION['service_period']; $override = getServiceOverride($date); if ($override['service_id']) { - return $override['service_id']; + $idParts = explode("-",$override['service_id']); + return strtolower($idParts[2]); } switch (date('w', ($date != "" ? $date : time()))) { @@ -37,6 +38,17 @@ return 'saturday'; default: return 'weekday'; + } +} +function service_ids($service_period) { + switch ($service_period) { + case 'sunday': + return Array("2010-TUGGSUN-Sunday-20","2010-BELCSUN-Sunday-19"); + case 'saturday': + return Array("2010-BELCSAT-Saturday-19","2010-TUGGSAT-Saturday-19"); + default: + //return 'weekday'; + return Array("2010-BELCMAST-Weekday-15","2010-TUGGMAST-Weekday-14"); } } @@ -87,7 +99,7 @@ "UNKNOWN_EFFECT" => "Unknown effect", "STOP_MOVED" => "Stop moved"); - set_include_path(get_include_path() . PATH_SEPARATOR . $labsPath . "lib/Protobuf-PHP/library/DrSlump/"); + set_include_path(get_include_path() . PATH_SEPARATOR . ($basePath . "lib/Protobuf-PHP/library/DrSlump/")); include_once("Protobuf.php"); include_once("Protobuf/Message.php"); @@ -95,7 +107,7 @@ include_once("Protobuf/Descriptor.php"); include_once("Protobuf/Field.php"); - include_once($labsPath . "lib/Protobuf-PHP/gtfs-realtime.php"); + include_once($basePath . "lib/Protobuf-PHP/gtfs-realtime.php"); include_once("Protobuf/CodecInterface.php"); include_once("Protobuf/Codec/PhpArray.php"); include_once("Protobuf/Codec/Binary.php");