From: Maxious Date: Tue, 20 Mar 2012 23:35:19 +0000 Subject: Merge branch 'master' of github.com:maxious/ACTBus-ui X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=d3875c56a93293248be8ea7c0af8cf264ab7aa9a --- Merge branch 'master' of github.com:maxious/ACTBus-ui --- --- a/include/db/servicealert-dao.inc.php +++ b/include/db/servicealert-dao.inc.php @@ -106,7 +106,19 @@ function getFutureAlerts() { global $conn; - $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\""; + $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() < \"end\""; + // debug($query, "database"); + $query = $conn->prepare($query); + $query->execute(); + if (!$query) { + databaseError($conn->errorInfo()); + return Array(); + } + return $query->fetchAll(); +} +function getAllAlerts() { + global $conn; + $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from \"end\") as \"end\",cause,effect,header,description,url from servicealerts_alerts"; // debug($query, "database"); $query = $conn->prepare($query); $query->execute(); --- a/rtpis/servicealert_editor.php +++ b/rtpis/servicealert_editor.php @@ -82,7 +82,7 @@ '; + echo "'; } ?>
" . date("c", $alert['start']) . "" . date("c", $alert['end']) . "" . substr($alert['description'], 0, 999) . 'edit
" . date("c", $alert['start']) . "
to
" . date("c", $alert['end']) . "
" .$alert['header']."
". $alert['description'] . '
edit