Location: PHPKode > projects > Network Asset Management Archive > nama/barcode.php
<?php

$lastname = $_POST['lastname'];
include "connect.php";
$now = date("j/m/y h:i:s",time());
$fromdate = date("m/j/y",time()-(15*60*60*24));
$stmt = "Select a.*, o.display_name FROM arp_table a,owner o where (a.iaso=o.serial) and ((lower(BARCODE) CONTAINING '" . strtolower($lastname) . "') or (lower(MONITOR_BARCODE) CONTAINING '" . strtolower($lastname) . "')) order by ipnum;";
//$stmt = "Select a.*, c.lab as mylab, c.iaso as liaso FROM arp_table a, subnets b, lab c where (a.subnet = b.subnet) and (b.lab = c.serial) ";
//echo $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">BARCODE</font></b></td>
<td><b><font face="Times New Roman,Times">IP</font></b></td>
<td><b><font face="Times New Roman,Times">MAC ADDRESS</font></b></td>
<td><b><font face="Times New Roman,Times">IASO</font></b></td>
<td><b><font face="Times New Roman,Times">Building</font></b></td>
<td><b><font face="Times New Roman,Times">Room</font></b></td>
</tr>

<?
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) {
echo '<TR>';
echo '<td>' . $row->BARCODE . '&nbsp</td>';
echo '<td>' . $row->IP_ADDRESS . '&nbsp</td>';
echo '<td>' . $row->MAC_ADDRESS . '&nbsp</td>';
echo '<td>' . $row->DISPLAY_NAME . '&nbsp</td>';
echo '<td>' . $row->BUILDING . '&nbsp</td>';
echo '<td>' . $row->ROOM . '&nbsp</td>';
echo '</tr>';
}
echo '</table>';
?>
Return current item: Network Asset Management Archive