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
|
<?
# IRM - The Information Resource Manager
# Copyright (C) 1999 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: tracking-followups.php3,v 1.8 2000/03/17 05:48:34 atrus Exp $
#
################################################################################
# CHANGELOG #
################################################################################
# 7/22/99 - Keith Schoenefeld: Cleaned up code, converted all IF(): to if(){. #
# 7/29/99 - Yann Ramin: Redid the entire page, hope you like it :) #
# 10/31/99- Keith Schoenefeld: Added an is_group to fix an error that occured #
# when details were viewed on a group ticket #
# 11/18/99- Keith Schoenefeld: Added the nl2br function so that the $contents #
# variable is properly html-ized. #
################################################################################
include("../irm.inc");
AuthCheck("post-only");
$db = new DB;
commonHeader("IRM Tracking - More Information");
PRINT "<a href=\"$HTTP_REFERER\">Go Back</a><hr noshade><br>";
$query = "SELECT * FROM tracking WHERE (ID = $ID)";
$result = $db->query($query);
$resultnum = $db->numrows($result);
$date = $db->result($result,0,"date");
$status = $db->result($result, 0, "status");
$author = $db->result($result, 0, "author");
$computer = $db->result($result, 0, "computer");
$contents = $db->result($result, 0, "contents");
$priority = $db->result($result, 0, "priority");
$is_group = $db->result($result, 0, "is_group");
$contents = nl2br(StripSlashes($contents));
$closedate = $db->result($result, 0, "closedate");
$assign = $db->result($result, 0, "assign");
if($is_group == "yes")
{
$query = "SELECT name FROM groups WHERE (ID = $computer)";
} else
{
$query = "SELECT name FROM computers WHERE (ID = $computer)";
}
$result = $db->query($query);
$computername = $db->result($result, 0, "name");
PRINT "<table border=1 width=100%><tr><th colspan=2>Job Number $ID</th></tr>";
PRINT "<tr bgcolor=#DDDDDD><td width=50%>Status:<br>";
if ($status == "new") {
PRINT "<font color=\"green\"><b>NEW";
}
else {
PRINT "<font><b>OLD";
}
PRINT "</b></font></td><td>Date Opened:<br>$date<br>Date Closed:<br>";
if ($closedate == "0000-00-00 00:00:00" || $closedate == "") {
PRINT "Job Still Open";
}
else {
$query = "SELECT SEC_TO_TIME(UNIX_TIMESTAMP('$closedate') - UNIX_TIMESTAMP('$date'))";
$result = $db->query($query);
$opentime = $db->result($result, 0, 0); # There has got to be a better way of doing this...
PRINT "$closedate<br>This job was open for: $opentime";
}
PRINT "</td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td>Priority:<br>$priority</td><td>Author:<br><a href=users-info.php3?ID=$author>$author</a></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td>Computer:<br><b><a href=computers-info.php3?ID=$computer>$computername ($computer)</a></b></td><td>Assigned to:<br><form method=post action=tracking-assign.php3>";
Tech_list($assign, "user");
PRINT "<input type=hidden name=ID value=$ID><input type=submit value=Assign></form></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td colspan=2>Problem Description:<br><b>$contents</b></td></tr>";
if ($status == "new") {
PRINT "<tr bgcolor=#DDDDDD><td colspan=2 align=center><a href=tracking-mark.php3?ID=$ID>Mark Old</a></td></tr>";
}
PRINT "</table>";
Show_followups($ID);
PRINT "<br>";
commonFooter();
?>
|