2009-09-07 11:07:59 +00:00
<? php
2007-06-24 15:46:47 +00:00
echo ( "<div style='font-family: courier, serif; margin: 10px';><strong>" . $device [ 'sysDescr' ] . "</strong></div>" );
2007-06-24 16:45:18 +00:00
$uptime = @ mysql_result ( mysql_query ( "SELECT `attrib_value` FROM `devices_attribs` WHERE `device_id` = '" . $device [ 'device_id' ] . "' AND `attrib_type` = 'uptime'" ), 0 );
2007-06-24 15:46:47 +00:00
2008-09-25 13:54:58 +00:00
if ( is_file ( "images/devices/" . $device [ 'hardware' ] . ".gif" )) {
$dev_img = "<div style='float: left;'><img src='images/devices/" . $device [ 'hardware' ] . ".gif' align=absmiddle></img></div>" ;
} elseif ( is_file ( "images/devices/" . $device [ 'hardware' ] . ".jpg" )) {
$dev_img = "<div style='float: left;'><img src='images/devices/" . $device [ 'hardware' ] . ".jpg' align=absmiddle></img></div>" ;
} else { unset ( $dev_img ); }
2009-10-05 12:47:16 +00:00
if ( $device [ 'features' ]) { $device [ 'features' ] = "(" . $device [ 'features' ] . ")" ; }
2009-11-30 16:06:30 +00:00
$device [ 'os_text' ] = $os_text [ $device [ os ]];
2009-10-05 12:47:16 +00:00
2008-09-25 13:54:58 +00:00
echo ( " $ddev_img
2007-06-24 15:46:47 +00:00
<table width=100%>
<tr>
<td class=list-bold>Operating System</td>
2009-11-30 16:06:30 +00:00
<td>" . $device [ 'os_text' ] . " " . $device [ 'version' ] . " " . $device [ 'features' ] . " </td>
2008-03-19 19:16:16 +00:00
</tr>" );
if ( $device [ 'hardware' ]) { echo ( "<tr>
2007-06-24 15:46:47 +00:00
<td class=list-bold>Hardware</td>
<td>" . $device [ 'hardware' ] . "</td>
2008-03-19 19:16:16 +00:00
</tr>" ); }
if ( $device [ 'sysContact' ]) { echo ( "<tr>
<td class=list-bold>Contact</td>
<td>" . htmlspecialchars ( $device [ 'sysContact' ]) . "</td>
</tr>" ); }
2007-06-24 16:45:18 +00:00
2008-03-19 19:16:16 +00:00
if ( $device [ 'location' ]) { echo ( "<tr>
<td class=list-bold>Location</td>
<td>" . $device [ 'location' ] . "</td>
</tr>" ); }
if ( $uptime ) { echo ( "<tr>
2007-06-24 15:46:47 +00:00
<td class=list-bold>Uptime</td>
<td>" . formatUptime ( $uptime ) . "</td>
2008-03-19 19:16:16 +00:00
</tr>" ); }
2007-06-24 16:45:18 +00:00
echo ( "
2007-06-24 15:46:47 +00:00
</table>" );
?>