From: Maxious Date: Thu, 29 Sep 2011 08:35:53 +0000 Subject: Make geo kml work X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=04b727d9383a1195428deac5ac6acb0537580fc6 --- Make geo kml work --- --- a/geo/route.kml.php +++ b/geo/route.kml.php --- a/geo/stops.kml.php +++ b/geo/stops.kml.php @@ -1,4 +1,5 @@ saveXML(); echo $kmlOutput; -?> +?> + --- a/include/common.inc.php +++ b/include/common.inc.php @@ -49,6 +49,7 @@ if (strstr($_SERVER['PHP_SELF'], "labs/") || strstr($_SERVER['PHP_SELF'], "myway/") || strstr($_SERVER['PHP_SELF'], "lib/") + || strstr($_SERVER['PHP_SELF'], "geo/") || strstr($_SERVER['PHP_SELF'], "include/") || strstr($_SERVER['PHP_SELF'], "servicealerts/")) $basePath = "../"; --- a/include/db/servicealert-dao.inc.php +++ b/include/db/servicealert-dao.inc.php @@ -32,7 +32,7 @@ function getServiceAlert($alertID) { global $conn; - $query = "SELECT id,extract('epoch', start) as start, extract('epoch', end) as end,cause,effect,header,description,url from servicealerts_alerts where id = :servicealert_id"; + $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from end) as end,cause,effect,header,description,url from servicealerts_alerts where id = :servicealert_id"; debug($query, "database"); $query = $conn->prepare($query); $query->bindParam(":servicealert_id", $alertID); @@ -87,7 +87,7 @@ function getCurrentAlerts() { global $conn; - $query = "SELECT id,extract('epoch', start) as start, extract('epoch', end) as end,cause,effect,header,description,url from servicealerts_alerts where NOW() > start and NOW() < \"end\""; + $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from end) as end,cause,effect,header,description,url from servicealerts_alerts where NOW() > start and NOW() < \"end\""; // debug($query, "database"); $query = $conn->prepare($query); $query->execute(); @@ -100,7 +100,7 @@ function getFutureAlerts() { global $conn; - $query = "SELECT id,extract('epoch', start) as start, extract('epoch', end) as end,cause,effect,header,description,url from servicealerts_alerts where NOW() > start or NOW() < \"end\""; + $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from end) as end,cause,effect,header,description,url from servicealerts_alerts where NOW() > start or NOW() < \"end\""; // debug($query, "database"); $query = $conn->prepare($query); $query->execute();