1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
<?
# IRM - The Information Resource Manager
# Copyright (C) 1999,2000 Yann Ramin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License (in file COPYING) for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: computers-info.php3,v 1.13.2.1 2000/05/06 17:33:18 atrus Exp $
#
################################################################################
# CHANGELOG #
################################################################################
# 7/22/99 - Keith Schoenefeld: Cleaned up code, converted all IF(): to if(){. #
# 9/11/99 - Keith Schoenefeld: Changed query so it did proper searching to #
# display group tracking. #
# 1/26/00 - Yann Ramin: Forgot to add changelog. Added SNMP, fixed group #
# query bug. Enjoy! q #
# 2/25/00 - Yann Ramin: Networking prelim support
# 2/29/00 - Keith Schoenefeld: Fixed query so that it returned only distinct ## ID's in the select statement. #################################################################################
include("../irm.inc");
AuthCheck("normal");
$db = new DB;
commonHeader("IRM Computers - Info");
?>
<form method=get action=computers-info.php3>
<? PRINT "<input type=hidden name=ID value=$ID>"; ?>
<select name=showfollowups size=1>
<option value=1>Show Followups</option>
<option value=0 selected>Hide Followups</option>
</select>
<input type=submit value=Show></form>
<?
showComputer($ID, 1);
showPortsOnDevice($ID, 1);
#$query = "SELECT ID FROM tracking WHERE (computer = $ID) ORDER BY date DESC";
$query = "SELECT DISTINCT(ID) FROM tracking,comp_group WHERE ((tracking.computer = $ID AND tracking.is_group = \"no\") OR (tracking.computer = comp_group.comp_id AND tracking.computer = $ID AND tracking.is_group = \"yes\")) ORDER BY date DESC";
$result = $db->query($query);
$resultnum = $db->numrows($result);
if ($resultnum == 0)
{
PRINT "<i>No Tracking Found</i>";
} else
{
$i = 0;
$number = $db->numrows($result);
PRINT "<center><table border=1 width=\"100%\">";
PRINT "<tr bgcolor=#DDDDDD><th>Status</th><th>Date</th><th width=5>Pri</th>
<th>Author</th><th>Assigned</th><th>Computer</th><th colspan=2 width=70%>
Description</th></tr>";
while ($i < $number)
{
$IDjob = $db->result($result, $i, "ID");
if ($showfollowups == 1)
{
Show_tracking($IDjob, 1);
} else
{
Show_tracking($IDjob, 0);
}
$i++;
}
PRINT "</table><br>";
}
PRINT "<br><br>";
compsoftShow($ID);
PRINT "</center><br>";
if ($cfg_groups == 1) {
PRINT "<br><b>Group Memberships</b><p> ";
$query = "SELECT * FROM comp_group where comp_id = $ID";
$result = $db->query($query);
$i = 0;
while ($i < $db->numrows($result)) {
$gID = $db->result($result, $i, "group_id");
$q2 = "SELECT * FROM groups WHERE id = $gID";
$r2 = $db->query($q2);
$gname = $db->result($r2, 0, "name");
PRINT "<a href=setup-groups-members.php3?id=$gID>$gname</a><br>";
$i++;
}
}
commonFooter();
?>
|