Location: PHPKode > projects > Network Asset Management Archive > nama/phones2.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 * FROM PHONEBOOK where ((lower(NAME) CONTAINING '" . strtolower($lastname) . "') or (EXTENSION CONTAINING '$lastname') or (OFFICESYM CONTAINING '$lastname') or (BUILDING='$lastname')) order by name;";
//echo $stmt;
?>
<body text="#000000" bgcolor="#F9F3E0" link="#0000EE" vlink="#551A8B" alink="#FF0000">
<table style='border-color:#DBB748; border-width:3px; border-right: 3px solid #DBB748; border-collapse: collapse; border-style:solid;'>
<th BGCOLOR='#DBB748' ALIGN=left>Name</th>
<th BGCOLOR='#DBB748' ALIGN=left>Extension</th>
<th BGCOLOR='#DBB748' width="18%" ALIGN=left>Office Symbol</th>
<th BGCOLOR='#DBB748' ALIGN=left>Building</th>
<th BGCOLOR='#DBB748' ALIGN=left>Room</th>
<?
$i = 0;
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) {
if ($i%2) {
   echo "<tr BGCOLOR='#F5EACB'>";
} else {
   echo '<tr>';
}
echo "<td style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'>" . $row->NAME . "&nbsp</td>";
echo "<td style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'>(601) 634-" . $row->EXTENSION . "&nbsp</td>";
echo "<td style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'>" . $row->OFFICESYM . "&nbsp</td>";
echo "<td style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'>" . $row->BUILDING . "&nbsp</td>";
echo "<td style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'>" . $row->ROOM . "&nbsp</td>";
echo '</tr>';
$i = $i + 1;
}
echo '</table>';
?>
Return current item: Network Asset Management Archive