more html fixes - yes, Adam, I'm anal like that ;-)

git-svn-id: http://www.observium.org/svn/observer/trunk@627 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-01-09 00:42:45 +00:00
parent 74faf8932c
commit bb0cecc5b0
2 changed files with 80 additions and 102 deletions
+4 -4
View File
@@ -340,13 +340,13 @@ global $config;
$sql = "SELECT * FROM `devices` WHERE `device_id` = '$host'";
$data = mysql_fetch_array(mysql_query($sql));
$type = strtolower($data['os']);
if(file_exists($config['html_dir'] . "/images/os/$type" . ".png")){ $image = "<img src='".$config['base_url']."/images/os/$type.png'>";
} elseif(file_exists($config['html_dir'] . "/images/os/$type" . ".gif")){ $image = "<img src='".$config['base_url']."/images/os/$type.gif'>"; }
if(file_exists($config['html_dir'] . "/images/os/$type" . ".png")){ $image = "<img src='".$config['base_url']."/images/os/$type.png' />";
} elseif(file_exists($config['html_dir'] . "/images/os/$type" . ".gif")){ $image = "<img src='".$config['base_url']."/images/os/$type.gif' />"; }
if($type == "linux") {
$features = strtolower(trim($data['features']));
list($distro) = split(" ", $features);
if(file_exists($config['html_dir'] . "/images/os/$distro" . ".png")){ $image = "<img src='".$config['base_url']."/images/os/$distro" . ".png'>";
} elseif(file_exists($config['html_dir'] . "/images/os/$distro" . ".gif")){ $image = "<img src='".$config['base_url']."/images/os/$distro" . ".gif'>"; }
if(file_exists($config['html_dir'] . "/images/os/$distro" . ".png")){ $image = "<img src='".$config['base_url']."/images/os/$distro" . ".png' />";
} elseif(file_exists($config['html_dir'] . "/images/os/$distro" . ".gif")){ $image = "<img src='".$config['base_url']."/images/os/$distro" . ".gif' />"; }
}
return $image;
}