update changelog, clean up files

git-svn-id: http://www.observium.org/svn/observer/trunk@1893 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-16 22:04:29 +00:00
parent 2d5eee1c95
commit 39dc6e9053
7 changed files with 127 additions and 115 deletions

View File

@@ -6,7 +6,8 @@ include("config.php");
include("includes/functions.php");
$alert_query = mysql_query("SELECT *, A.id as id FROM `alerts` as A, `devices` as D where A.device_id = D.device_id AND alerted = '0'");
while ($alert = mysql_fetch_array($alert_query)) {
while ($alert = mysql_fetch_array($alert_query))
{
$id = $alert['id'];
$host = $alert['hostname'];
$date = $alert['time_logged'];
@@ -14,12 +15,12 @@ while ($alert = mysql_fetch_array($alert_query)) {
$alert_text .= "$date $host $msg";
mysql_query("UPDATE `alerts` SET alerted = '1' WHERE `id` = '$id'");
}
if($alert_text) {
if ($alert_text)
{
echo("$alert_text");
# `echo '$alert_text' | gnokii --sendsms <NUMBER>`;
}
?>
?>