html fixes on locations page

git-svn-id: http://www.observium.org/svn/observer/trunk@665 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-01-10 20:20:18 +00:00
parent 52ebd08762
commit 476316f7f8
2 changed files with 11 additions and 15 deletions
-1
View File
@@ -85,5 +85,4 @@ if($services['down']) { $services['bgcolour'] = "#ffcccc"; } else { $services['b
<td> ) </td> <td> ) </td>
<td width="5"></td> <td width="5"></td>
</tr> </tr>
<tr>
</table> </table>
+11 -14
View File
@@ -1,5 +1,5 @@
<?php <?php
echo("<table cellpadding=7 cellspacing=0 class=devicetable width=100%>"); echo('<table cellpadding="7" cellspacing="0" class="devicetable" width="100%">');
if($_SESSION['userlevel'] == '10') { if($_SESSION['userlevel'] == '10') {
$sql = "SELECT `location` FROM `devices` GROUP BY `location` ORDER BY `location`"; $sql = "SELECT `location` FROM `devices` GROUP BY `location` ORDER BY `location`";
@@ -27,21 +27,18 @@ while($device = mysql_fetch_array($device_query)) {
$hostalerts = mysql_result(mysql_query("SELECT COUNT(device_id) FROM devices AS D, devices_perms AS P WHERE location = '" . $device['location'] . "' AND status = '0'"),0); $hostalerts = mysql_result(mysql_query("SELECT COUNT(device_id) FROM devices AS D, devices_perms AS P WHERE location = '" . $device['location'] . "' AND status = '0'"),0);
} }
if($hostalerts) { $alert = "<img src='images/16/flag_red.png'>"; } else { $alert = ""; } if($hostalerts) { $alert = '<img src="images/16/flag_red.png" alt="alert" />'; } else { $alert = ""; }
$loc = $device[location]; if($device['location'] != "") {
echo(' <tr bgcolor="' . $bg . '">
if($loc != "") { <td class="interface" width="300"><a class="list-bold" href="?page=devices&amp;location=' . urlencode($device['location']) . '">' . $device['location'] . '</a></td>
echo("<table border=0 cellspacing=0 cellpadding=7 class=devicetable width=100%> <td width="100">' . $alert . '</td>
<tr bgcolor='$bg'> <td width="100">' . $num . ' devices</td>
<td class=interface width=300><a class='list-bold' href='?page=devices&location=$device[location]'>$loc</a></td> <td width="100">' . $net . ' network</td>
<td width='100'>$alert</td> <td width="100">' . $srv . ' servers</td>
<td width='100'>$num devices</td> <td width="100">' . $fwl . ' firewalls</td>
<td width='100'>$net network</td>
<td width='100'>$srv servers</td>
<td width='100'>$fwl firewalls</td>
</tr> </tr>
"); ');
$done = "yes"; $done = "yes";
} }