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
|
<?
# 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-mark.php3,v 1.7 2000/03/27 00:26:40 atrus Exp $
#
################################################################################
# CHANGELOG #
################################################################################
# 7/22/99 - Keith Schoenefeld: Cleaned up code, converted all IF(): to if(){. #
################################################################################
include("../irm.inc");
AuthCheck("admin");
$db = new DB;
header("Location: $HTTP_REFERER");
$query = "UPDATE tracking SET status = 'old' WHERE ID = $ID";
$result = $db->query($query);
$query = "UPDATE tracking SET closedate = NOW() WHERE ID = $ID";
$result = $db->query($query);
$query = "SELECT * FROM tracking WHERE (ID = $ID)";
$result = $db->query($query);
$resultnum = $db->numrows($result);
$emailupdates = $db->result($result,0,"emailupdates");
$cID = $db->result($result, 0, "computer");
logevent($cID, "computers", 4, "tracking", "$IRMName closed job $ID");
if($cfg_userupdates == 1)
{
if($emailupdates == "yes")
{
$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 = StripSlashes($contents);
$closedate = $db->result($result, 0, "closedate");
$assign = $db->result($result, 0, "assign");
$uemail = $db->result($result,0,"uemail");
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");
$emailmessage = "Job Number: $ID\n";
$emailmessage .= "Status: $status\n";
$emailmessage .= "Author: $author ($uemail)\n";
$emailmessage .= "Computer: $computername\n";
$emailmessage .= "Assigned to: $assign\n";
$emailmessage .= "Problem Description:\n$contents\n";
text_followups($ID, $emailmessage);
$emailmessage .= "\n\nTracking Marked as old on: $date\n";
mail("$uemail", "Tracking Job number $ID has been marked old!",
"$emailmessage", "From: irm\n\n");
}
}
?>
|