Location: PHPKode > projects > Network Asset Management Archive > nama/liaso/custreport.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;'";
$title = $_GET["title"];
$stmt2 = 'select ' . stripslashes($_GET["query"]);

//$stmt2 = "select count(v.eventdate) as total, l.lab as lab, o.display_name as IASO from arp_table a, viruslog v, owner o, lab l where (a.serial=v.arp_table) and (a.iaso=o.serial) and (v.eventdate>'02/02/04') and (alert_type='VF') and (a.mylab=l.serial) group by l.lab, o.display_name";
//$stmt2 = "select * from lab";
//echo $stmt2 . '<br>';
echo '<CENTER><H1>' . $title . '</H1></CENTER><br>';
?>
<table style='border-color:#DBB748; border-width:3px; border-right: 3px solid #DBB748; border-collapse: collapse; border-style:solid;' width="700" border="2">
<?
$sth2 = ibase_query($dbh, $stmt2);
$coln = ibase_num_fields($sth2);
echo "<tr BGCOLOR='#DBB748' ALIGN=left>";
for ($i=0; $i < $coln; $i++) {
      $col_info = ibase_field_info($sth2, $i); 
      echo "<th>" . $col_info['alias']  . "</th>";
}
echo "</tr>";
$j=0;
while ($row2 = ibase_fetch_object($sth2)) {
if ($j%2) {
   echo "<tr BGCOLOR='#F5EACB'>";
} else {
   echo "<tr>";
}
$coln = ibase_num_fields($sth2);
for ($i=0; $i < $coln; $i++) {
      $col_info = ibase_field_info($sth2, $i);
      echo "<td>" . $row2->$col_info['alias']  . "</td>";
}
echo '</tr>';
$j = $j + 1;
}
echo "</table>";
?>

Return current item: Network Asset Management Archive