Location: PHPKode > projects > Network Asset Management Archive > nama/subnets.php
<html>
<head>
<title>Wes Subnets</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
$now = date("m/j/y h:i:s",time());
include "connect.php";

$now = date("j/m/y h:i:s",time());
$stmt = "Select a.*, b.LAB as LAB_DESC FROM subnets a, lab b where (a.lab=b.serial) order by a.subnet_long;";
echo "<BR>";
$sth = ibase_query($dbh, $stmt);
?>
<body text="#000000" bgcolor="#FFFFCC" link="#0000EE" vlink="#551A8B" alink="#FF0000">
<table BORDER=3>
<tr ALIGN=CENTER BGCOLOR="#999999">
<td><b><font face="Times New Roman,Times">SUBNET</font></b></td>

<td><b><font face="Times New Roman,Times">ROUTER</font></b></td>

<td><b><font face="Times New Roman,Times">PORT</font></b></td>

<td width="15%"><b><font face="Times New Roman,Times">LOCATIONS SERVED</font></b></td>

<td><b><font face="Times New Roman,Times">TYPE SUBNET</font></b></td>

<td><b><font face="Times New Roman,Times">UNITS SERVED</font></b></td>

<td><b><font face="Times New Roman,Times">CONTACT</font></b></td>
</tr>
<?
while ($row = ibase_fetch_object($sth)) {
$ip = explode(".", $row->SUBNET);
$row2 = '';
   if ($row->CONTACT > 0) {
      $stmt2 = "select * from owner where serial='$row->CONTACT';";
      $sth2 = ibase_query($dbh,$stmt2);
      $row2 = ibase_fetch_object($sth2);
   }
   $thisip = $ip[0] . '.' . $ip[1] . '.' . $ip[2];
   if ($ip[2]=='50') {
      $thisip = $thisip . '.' . $ip[3];
   }
   print '<tr>';
   print '<td><a href="printsubnet.php?SUBNET=' . $row->SUBNET . '">' . $thisip . '</a></td>';
   print '<td>' . $row->ROUTER . '&nbsp</td>';
   print '<td>' . $row->PORT_NUMBER . '&nbsp</td>';
   print '<td>' . $row->LOCATION_SERVED . '&nbsp;</td>';
   print '<td>' . $row->SUBNET_TYPE . '&nbsp;</td>';
   print '<td>' . $row->LAB_DESC . '&nbsp;</td>';
   print '<td>' . $row2->FIRST_NAME . ' ' . $row2->LAST_NAME . '&nbsp;</td>';
   print '</tr>';
}
?>
</table>
</html>
Return current item: Network Asset Management Archive