From: maxious Date: Sat, 09 Apr 2011 03:32:02 +0000 Subject: Refactor stop time interpolation X-Git-Url: http://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=9cf61536f5c7ab396a5b3bd38a8e1b00bd75d962 --- Refactor stop time interpolation --- --- a/about.php +++ b/about.php @@ -12,7 +12,7 @@ href="https://github.com/maxious/ACTBus-data">transit feed and this site available from github.
-Uses jQuery Mobile, PHP, Ruby, Python, Google Transit Feed Specification tools, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service
+Uses jQuery Mobile, PHP, PostgreSQL, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service

Feedback encouraged; contact maxious@lambdacomplex.org

--- a/aws/awsStartup.sh +++ /dev/null @@ -1,29 +1,1 @@ -#!/bin/bash -#this script should be run from a fresh git checkout from http://maxious.lambdacomplex.org -#ami base must have yum install lighttpd-fastcgi, git, tomcat6 -#screen php-cli php-gd tomcat6-webapps tomcat6-admin-webapps svn maven2 -#http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12 -cp /root/aws.php /tmp/ -mkdir /var/www/lib/staticmaplite/cache -chcon -h system_u:object_r:httpd_sys_content_t /var/www -chcon -R -h root:object_r:httpd_sys_content_t /var/www/* -chcon -R -t httpd_sys_content_rw_t /var/www/lib/staticmaplite/cache -chmod -R 777 /var/www/lib/staticmaplite/cache -wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \ --O /var/www/cbrfeed.zip -easy_install transitfeed -easy_install simplejson -screen -S viewsh -X quit -screen -S viewsh -d -m /var/www/view.sh - -wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \ --O /tmp/Graph.obj -rm -rfv /usr/share/tomcat6/webapps/opentripplanner* -wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-webapp.war \ --O /usr/share/tomcat6/webapps/opentripplanner-webapp.war -wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-api-webapp.war \ --O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war -/etc/init.d/tomcat6 restart - - --- a/include/common-geo.inc.php +++ b/include/common-geo.inc.php @@ -70,6 +70,7 @@ else return round($km,2)."k"; } else return floor($km * 1000); } + function decodePolylineToArray($encoded) { // source: http://latlongeeks.com/forum/viewtopic.php?f=4&t=5 --- a/include/common-session.inc.php +++ b/include/common-session.inc.php @@ -9,7 +9,7 @@ $_SESSION['time'] = filter_var($_REQUEST['time'], FILTER_SANITIZE_STRING); sessionUpdated(); } -if (isset($_REQUEST['geolocate'])) { +if (isset($_REQUEST['geolocate']) && $_REQUEST['geolocate'] != "Enter co-ordinates or address here") { $geocoded = false; if (isset($_REQUEST['lat']) && isset($_REQUEST['lon'])) { $_SESSION['lat'] = trim(filter_var($_REQUEST['lat'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION)); @@ -17,7 +17,6 @@ } else { $geolocate = filter_var($_REQUEST['geolocate'], FILTER_SANITIZE_URL); - echo $_REQUEST['geolocate']; if (startsWith($geolocate, "-")) { $locateparts = explode(",", $geolocate); $_SESSION['lat'] = $locateparts[0]; --- a/include/common-template.inc.php +++ b/include/common-template.inc.php @@ -1,28 +1,27 @@ '; if ($datepicker) echo ''; - if (isDebugServer()) echo ' + if (isDebugServer()) { + echo ' + '; - else echo ' + } + else { + echo ' - '; - if ($datepicker) echo ''; + } + if ($datepicker) { + echo ' '; + } echo '