Changed id field in devices table to device_id (!!!1!!1!!eleven!1)

git-svn-id: http://www.observium.org/svn/observer/trunk@69 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2007-04-08 14:34:19 +00:00
parent ff04606a2f
commit e52334f578
20 changed files with 151 additions and 367 deletions

View File

@@ -1,6 +1,6 @@
<?
$device_query = mysql_query("select * from devices WHERE id = '$_GET[id]'");
$device_query = mysql_query("select * from devices WHERE `device_id` = '$_GET[id]'");
while($device = mysql_fetch_array($device_query)) {
$hostname = $device[hostname];
$bg="#ffffff";

View File

@@ -4,7 +4,7 @@ $overview = 1;
$id = $_GET[id];
$device = mysql_fetch_array(mysql_query("SELECT * FROM `devices` WHERE id = '$_GET[id]'"));
$device = mysql_fetch_array(mysql_query("SELECT * FROM `devices` WHERE `device_id` = '$_GET[id]'"));
$interfaces['total'] = mysql_result(mysql_query("SELECT count(*) FROM interfaces WHERE device_id = '$id'"),0);
$interfaces['up'] = mysql_result(mysql_query("SELECT count(*) FROM interfaces WHERE device_id = '$id' AND ifOperStatus = 'up'"),0);
@@ -51,7 +51,7 @@ echo("</td><td width=50% valign=top>");
if($interfaces['total']) {
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>
<p class=sectionhead>Total Traffic</p>" . device_traffic_image($device['id'], 490, 100, $day, $now) . "</div>");
<p class=sectionhead>Total Traffic</p>" . device_traffic_image($device['device_id'], 490, 100, $day, $now) . "</div>");
}
if($interfaces['total']) {