device subpages cleanup, remove dead code

git-svn-id: http://www.observium.org/svn/observer/trunk@1896 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-16 23:10:10 +00:00
parent b3dc4c3129
commit 1a477eebbe
57 changed files with 1072 additions and 1061 deletions

View File

@@ -1,20 +1,23 @@
<?php
<?php
$sql = "SELECT * FROM ipv4_mac AS M, ports AS I WHERE I.interface_id = M.interface_id AND I.device_id = '".$device['device_id']."'";
$query = mysql_query($sql);
echo("<table border=0 cellspacing=0 cellpadding=5 width=100%>");
echo('<table border="0" cellspacing="0" cellpadding="5" width="100%">');
$i = "1";
while($arp = mysql_fetch_array($query)) {
if(!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; }
while ($arp = mysql_fetch_array($query))
{
if (!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; }
$arp_host = mysql_fetch_array(mysql_query("SELECT * FROM ipv4_addresses AS A, ports AS I, devices AS D WHERE A.ipv4_address = '".$arp['ipv4_address']."' AND I.interface_id = A.interface_id AND D.device_id = I.device_id"));
if($arp_host) { $arp_name = generate_device_link($arp_host); } else { unset($arp_name); }
if($arp_host) { $arp_if = generate_port_link($arp_host); } else { unset($arp_if); }
if ($arp_host) { $arp_name = generate_device_link($arp_host); } else { unset($arp_name); }
if ($arp_host) { $arp_if = generate_port_link($arp_host); } else { unset($arp_if); }
if($arp_host['device_id'] == $device['device_id']) { $arp_name = "Localhost"; }
if($arp_host['interface_id'] == $arp['interface_id']) { $arp_if = "Local Port"; }
if ($arp_host['device_id'] == $device['device_id']) { $arp_name = "Localhost"; }
if ($arp_host['interface_id'] == $arp['interface_id']) { $arp_if = "Local Port"; }
echo("
<tr bgcolor=$bg_colour>
@@ -29,4 +32,4 @@ while($arp = mysql_fetch_array($query)) {
echo("</table>");
?>
?>