From: Maxious Date: Sun, 27 Mar 2011 14:53:55 +0000 Subject: Fix double slash jQm click handler bug X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=cd8248db666ffe386af5c6b30f1c7d6f9a814e50 --- Fix double slash jQm click handler bug --- --- a/aws/awsStartup.sh +++ b/aws/awsStartup.sh @@ -5,6 +5,7 @@ #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 --- a/feedback.php +++ b/feedback.php @@ -1,11 +1,11 @@ verifyEmailAddress($address); @@ -24,16 +24,29 @@ mail($address, $topic, $message); } } + +$stopid = ""; +$stopcode = ""; +$urlparts = explode("?",$_SERVER["HTTP_REFERER"]); +if (isset($urlparts[1])) { + $getparams = explode("&",$urlparts[1]); + foreach ($getparams as $param) { + $paramparts=explode("=",$param); + if ($paramparts[0] == "stopid") $stopid = $paramparts[1]; + if ($paramparts[0] == "stopcode") $stopcode = $paramparts[1]; + } +} + ?>

Add/Move/Delete a Bus Stop Location

-StopID: -or StopCode: - if you click on feedback from a stop page, these will get filled in automatically. else describe the location/street of the stop +StopID:
+or StopCode:
+ if you click on feedback from a stop page, these will get filled in automatically. else describe the location/street of the stop in one of these boxes
-Suggested Stop Location (lat/long or words): - if your device supports javascript, you can pick a location from the map above +Suggested Stop Location (lat/long or words):
+ if your device supports javascript, you can pick a location from the map above
-Submit! +

Bug Report/Feedback

Please leave feedback about bugs/errors or general suggestions about improvements that could be made to the way the data is presented! @@ -41,14 +54,18 @@ -Submit! + + --- a/include/common-geo.inc.php +++ b/include/common-geo.inc.php @@ -47,7 +47,7 @@ } $output = ""; if ($collapsible) $output.= '

Open Map...

'; - $output.= '
'; if ($collapsible) $output.= '
'; return $output; --- a/include/common-net.inc.php +++ b/include/common-net.inc.php @@ -24,7 +24,8 @@ $isHTTPS = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on"); $port = (isset($_SERVER["SERVER_PORT"]) && ((!$isHTTPS && $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS && $_SERVER["SERVER_PORT"] != "443"))); $port = ($port) ? ':' . $_SERVER["SERVER_PORT"] : ''; - $url = ($isHTTPS ? 'https://' : 'http://') . $_SERVER["SERVER_NAME"] . $port . htmlentities(dirname($_SERVER['PHP_SELF']) , ENT_QUOTES) . "/"; + $url = ($isHTTPS ? 'https://' : 'http://') . $_SERVER["SERVER_NAME"] . $port . htmlentities(dirname($_SERVER['PHP_SELF']) , ENT_QUOTES); return $url; } ?> + --- a/include/common-template.inc.php +++ b/include/common-template.inc.php @@ -36,9 +36,17 @@ if ($datepicker) echo ''; if (isDebugServer()) echo ' + '; else echo ' + '; if ($datepicker) echo ' "; - } - echo ' +} +$(document).ready(function() { + $('#here').click(function(event) { $('#geolocate').val(geolocate()); return false;}); +$('#here').show(); +}); +"; +if (!isset($_SESSION['lat']) || $_SESSION['lat'] == "") echo "geolocate();"; +echo " "; + } + if (isAnalyticsOn()) echo ' ".' +"; +echo '