Location: PHPKode > projects > Network Asset Management Archive > nama/iaso/iasolist2.php
<?php
include "../connect.php";
$Submit = $_POST['Submit'];
$OWNER = $_POST['OWNER'];
$LIASO = $_POST['LIASO'];
$SERIAL = $_GET['SERIAL'];
if ($SERIAL == '') { 
    print '<body text="#000000" bgcolor="#F9F3E0" link="#000000" vlink="#000000" alink="#000000">';
    print 'Please Pick a lab to edit';
    exit; 
}
$now = date("j/m/y h:i:s",time());
$liaso = "Select o.DISPLAY_NAME, o.PHONE, o.email_address, l.DESCRIPTION from owner o, lab l where (l.serial = '$SERIAL') and (l.liaso = o.serial)";
$liasoq = ibase_query($dbh, $liaso);
$liasorow = ibase_fetch_object($liasoq);
print '<B>LAB:	</B>' . $liasorow->DESCRIPTION . '<BR>';
print '<B>Lead IASO:	</B>' . $liasorow->DISPLAY_NAME . '   <a href="/liaso/summarylab.php?lab=' .  $SERIAL . '" target="_top">Status Report</a><BR>';
print '<B>EMAIL	</B>' . $liasorow->EMAIL_ADDRESS . '<BR>';
print '<B>PHONE	</B>' . $liasorow->PHONE . '<BR>';
$stmtav = "select max(virusdefdate) from arp_table";
$sthav = ibase_query($dbh, $stmtav);
$rowav = ibase_fetch_object($sthav);
$ANTIVIRUS=$rowav->MAX;
?>
<BR><BR>
<body text="#000000" bgcolor="#F9F3E0" link="#000000" vlink="#000000" alink="#000000">
<table BORDER=0>
<tr ALIGN=CENTER BGCOLOR="#DBB748">
<td><b><font face="Times New Roman,Times">Name</font></b></td>
<td><b><font face="Times New Roman,Times">Status</font></b></td>
</tr>

<?
$stmt = "Select b.DISPLAY_NAME, b.email_address, b.phone, a.serial, a.date_added, a.USER_NO FROM iaso a, owner b where (liaso_no = '$SERIAL') and (a.USER_NO = b.serial) order by DISPLAY_NAME;";
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) {
if ($row->USER_NO<>14122) {
$IASO=$row->USER_NO;
$empty=0;
$stmt2 = "select a.* from arp_table a where (a.iaso = " . $IASO . ") and ((owner is null) or (building is null) or (room is null) or (barcode is null) or (owner is null) or (os is null)) and (ip_address <> '0.0.0.0') order by a.iaso, a.ipnum";
$sth2 = ibase_query($dbh, $stmt2);
$i = -1;
if ($row2 = ibase_fetch_object($sth2)) {
        $empty=1;
}
$stmt2 = "select a.* from arp_table a where (a.iaso = " . $IASO . ") and (OS starts with 'Win') and (update_server is null) and (laptop is null) and (ip_address <> '0.0.0.0') order by a.iaso, a.ipnum";
$sth2 = ibase_query($dbh, $stmt2);
if ($row2 = ibase_fetch_object($sth2)) {
        $empty=1;
}
$stmt2 = "select a.* from arp_table a where (a.iaso = " . $IASO . ") and (OS starts with 'Win') and (av_server is null) and (ip_address <> '0.0.0.0') and (laptop is null) order by a.iaso, a.ipnum";
$sth2 = ibase_query($dbh, $stmt2);
if ($row2 = ibase_fetch_object($sth2)) {
        $empty=1;
}
$stmt2 = "select a.* from arp_table a where (a.iaso = " . $IASO . ") and (OS starts with 'Win') and (av_server is not null) and (virusdefdate<>'$ANTIVIRUS') and (ip_address <> '0.0.0.0') and (laptop is null) order by a.iaso, a.ipnum";
$sth2 = ibase_query($dbh, $stmt2);
if ($row2 = ibase_fetch_object($sth2)) {
        $empty=1;
}
if ($empty<>0) {
   print '<td bgcolor="#FE2929"><a href="/iaso/getpicks2.php?iaso=' . $row->USER_NO . '" target="_top"><b>' . $row->DISPLAY_NAME . '&nbsp</a></td>';
   echo '<td bgcolor="#FE2929"><a href="/iaso/summaryiaso.php?iaso=' . $row->USER_NO . '" target="_top">Status Report</a></td>';
} else {
    print '<td bgcolor="#18FF00"><a href="/iaso/getpicks2.php?iaso=' . $row->USER_NO . '" target="_top"><b>' . $row->DISPLAY_NAME . '&nbsp</a></td>';
   echo '<td bgcolor="#18FF00"><a href="/iaso/summaryiaso.php?iaso=' . $row->USER_NO . '" target="_top">Status Report</a></td>';
}
echo '</tr>';
}
}
echo '</table>';
?>

Return current item: Network Asset Management Archive