Location: PHPKode > projects > Network Asset Management Archive > nama/suslagged.php
<?php
$now = date("m/j/y h:i:s",time());
include "connect.php";

$now = date("j/m/y h:i:s",time());
echo '<body bgcolor="#F9F3E0">';
$tablerow = "style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'";
$stmt2 = "Select distinct o.display_name, a.ip_address, a.netbios_name, a.building, a.room, a.barcode, u.downloaded, u.patch, u2.description, u2.release_date from updates u, arp_table a, owner o, updatelist u2 where (o.serial=a.iaso) and (u.arp_table=a.serial) and (installed_date is null) and (downloaded>'01/25/2004') and (u.patch=u2.patch) order by o.display_name, a.ipnum";
#echo $stmt2 . '<br>';
$sth2 = ibase_query($dbh, $stmt2);
$i = -1;
$first = 0;
$iaso="";
$ip="";
while ($row2 = ibase_fetch_object($sth2)) {
if ($iaso!=$row2->DISPLAY_NAME) {
  if ($first = 0) {
     echo '</table>';
     $first = 1;
  }
   $i = -1;
   echo '<br><b>' . $iaso  . '</b><BR>' ; 
?>
<table style='border-color:#DBB748; border-width:3px; border-right: 3px solid #DBB748; border-collapse: collapse; border-style:solid;' width="700" border="2">
<?
echo "<tr BGCOLOR='#DBB748' ALIGN=left><th " . $tablerow . ">IP / Name</th><th " . $tablerow . ">Building / Room / Bar Code</th><th " . $tablerow . ">Downloaded</th><th " . $tablerow . ">Patch</th><th " . $tablerow . ">Description</th><th " . $tablerow . ">Release Date</th></tr>";
}
if ($i%2) {
   echo "<tr BGCOLOR='#F5EACB'>";
} else {
   echo "<tr>";
}
list ($downloadeddate, $downloadedtime) = split(" ", $row2->DOWNLOADED);
list ($releasedate, $releasetime) = split(" ", $row2->RELEASE_DATE);
if ($ip!=$row2->IP_ADDRESS) {
 $i = $i + 1;
if ($i%2) {
   echo "<tr BGCOLOR='#F5EACB'>";
} else {
   echo "<tr>";
}
   echo '<td ' . $tablerow . 'width="15%">' . $row2->IP_ADDRESS . ' / ';
   echo $row2->NETBIOS_NAME . '</td>';
   echo '<td ' . $tablerow . '>' . $row2->BUILDING . ' / ';
   echo $row2->ROOM . ' / ';
   echo $row2->BARCODE . '</td>';
} else {
if ($i%2) {
   echo "<tr BGCOLOR='#F5EACB'>";
} else {
   echo "<tr>";
}
   echo '<td ' . $tablerow . '>&nbsp</td><td ' . $tablerow . '>&nbsp</td>';
}
echo '<td ' . $tablerow . '>' . $downloadeddate . '</td>';
echo '<td ' . $tablerow . '>' . $row2->PATCH . '</td>';
echo '<td ' . $tablerow . '>' . $row2->DESCRIPTION . '</td>';
echo '<td ' . $tablerow . '>' . $releasedate . '</td>';

echo '</tr>';
//$i = $i + 1;
$iaso=$row2->DISPLAY_NAME;
$ip=$row2->IP_ADDRESS;
}
echo '<B>' . $iaso . '</b>';
echo "</table>";
?>

Return current item: Network Asset Management Archive