revert r1957 patch

git-svn-id: http://www.observium.org/svn/observer/trunk@1960 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-23 09:54:56 +00:00
parent 459af33c43
commit de7ff537cc
43 changed files with 3461 additions and 3452 deletions

View File

@@ -8,19 +8,19 @@ 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))
{
$id = $alert['id'];
$host = $alert['hostname'];
$date = $alert['time_logged'];
$msg = $alert['message'];
$alert_text .= "$date $host $msg";
$id = $alert['id'];
$host = $alert['hostname'];
$date = $alert['time_logged'];
$msg = $alert['message'];
$alert_text .= "$date $host $msg";
mysql_query("UPDATE `alerts` SET alerted = '1' WHERE `id` = '$id'");
mysql_query("UPDATE `alerts` SET alerted = '1' WHERE `id` = '$id'");
}
if ($alert_text)
{
echo("$alert_text");
# `echo '$alert_text' | gnokii --sendsms <NUMBER>`;
echo("$alert_text");
# `echo '$alert_text' | gnokii --sendsms <NUMBER>`;
}
?>
?>