Location: PHPKode > projects > Network Asset Management Archive > nama/phones.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 owner where ((lower(DISPLAY_NAME) CONTAINING '" . strtolower($lastname) . "') or (SUBSTR(PHONE, 9,12) CONTAINING '$lastname') or (UID CONTAINING '$lastname')) and (LAST_TIME>'$fromdate') order by last_name;";
$stmt = "Select * FROM owner where ((lower(DISPLAY_NAME) CONTAINING '" . strtolower($lastname) . "') or (SUBSTR(PHONE, 9,12) CONTAINING '$lastname') or (UID CONTAINING '$lastname')) order by last_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;'>
<tr ALIGN=LEFT BGCOLOR="#DBB748">
<th>UID</th>
<th>Name</th>
<th>E mail</th>
<th width="15%">Phone</th>
</tr>
<?
$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->UID . '&nbsp</td>';
    echo "<td style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'>" . $row->DISPLAY_NAME . '&nbsp</td>';
    echo "<td style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'>";
    echo  '<A HREF="mailto:' . $row->EMAIL_ADDRESS . '"&nbsp</a>' . $row->EMAIL_ADDRESS . '</td>';
    echo "<td style='border-color:#DBB748; border-width:1px; border-right: 2px solid #DBB748; border-collapse: collapse; border-style:solid;'>" . $row->PHONE . '&nbsp</td>';
    echo '</tr>';
    $i=$i+1;
}
echo '</table>';
?>

Return current item: Network Asset Management Archive