minor code cleanup, change queries to eventlog table to eventlog() function

git-svn-id: http://www.observium.org/svn/observer/trunk@609 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-01-07 16:50:52 +00:00
parent d06a4922fd
commit 6db77f3345
6 changed files with 44 additions and 46 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ while ($device = mysql_fetch_array($device_query)) {
mysql_query("INSERT INTO alerts (importance, device_id, message) VALUES ('9', '" . $device['device_id'] . "', 'Device is down\n')");
mail($email, "Device Down: " . $device['hostname'], "Device Down: " . $device['hostname'] . " at " . date('l dS F Y h:i:s A'), $config['email_headers']);
}
mysql_query("INSERT INTO eventlog (host, interface, datetime, message) VALUES ('" . $device['device_id'] . "', NULL, NOW(), 'Device status changed to $stat')");
eventlog("Device status changed to $stat", $device['device_id']);
echo("Status Changed!\n");
}
}