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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
<?
# 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: helper-add.php3,v 1.10 2000/03/17 05:48:34 atrus Exp $
#
################################################################################
# CHANGELOG #
################################################################################
# 7/22/99 - Keith Schoenefeld: Cleaned up code, converted all IF(): to if(){. #
# 8/20/99 - Yann Ramin: Preview features, nicer text, et al #
# 9/11/99 - Keith Schoenefeld: Added stuff for group stuff. #
# 9/17/99 - Yann Ramin: ID error checking code #
# 11/03/99 - Keith Schoenefeld: If a normal user or admin enters new tracking #
# it will automatically enter their name and #
# email address into the help request form. #
# 11/03/99 - Keith Schoenefeld: Added the ability for someone to request #
# updates to tracking they enter via email. #
################################################################################
include("../irm.inc");
AuthCheck("post-only");
$db = new DB;
$query = "SELECT * FROM users WHERE (name = '$IRMName')";
$result = $db->query($query);
$type = $db->result($result, 0, "type");
$IRMemail = $db->result($result, 0, "email");
if($type != "post-only")
{
$uname = $IRMName;
$uemail = $IRMemail;
}
if($is_group == "yes")
{
$query = "select ID from groups where (name = \"$groupname\")";
$result = $db->query($query);
$ID = $db->result($result, 0, "ID");
}
if($is_group == "no")
{
$query = "SELECT name FROM computers WHERE (ID = $ID)";
} else
{
$query = "SELECT name FROM groups WHERE (ID = $ID)";
}
$result = $db->query($query);
$number = $db->numrows($result);
if ($number != 1) {
commonHeader("IRM Tracking - Bad ID Number");
PRINT "It appears that you have entered an incorrect IRM computer ID or group ID number. Please <a href=helper.php3>try again</a>.<br>";
commonFooter();
exit();
}
commonHeader("IRM Tracking - Add Job");
?>
You can use this form to submit a problem report or request help with a computing
resource in your organization. Please fill out the form as clearly as possible, i.e., don't use
all capitals, be clear about the problem (EXACTLY when does it happen), and please try
to spell correctly.
<hr noshade>
<form method=post action=helper-preview.php3>
<br>
<input type=hidden name=status value=new>
<br>
First, pick how urgent your request is. If it can wait, pick a low priority. If you are stuck, pick a high priority. If you are unsure how important the problem is, leaving it at its present value should be OK.
<br><br>
<strong>Priority:</strong><br><select name=priority>
<option value=5>Very High</option>
<option value=4>High</option>
<option value=3 selected>Normal</option>
<option value=2>Low</option>
<option value=1>Very Low</option>
</select>
<br>
<br>Next, we need to be able to tell who the job came from. Please enter your name below.
<br><br><strong>Author:</strong><br>
<?
PRINT "<input type=text size=15 name=uname value=\"$uname\">";
?>
<br><br>
We need a way to get in contact with you. Please provide an e-mail address, or if you are unable to provide one, a phone number or place of contact.
<br><br>
<strong>E-Mail:</strong><br>
<? PRINT "<input type=text name=uemail size=19 value=\"$uemail\">"; ?>
<br>
<?
if($cfg_userupdates == 1)
{
PRINT "<input type=checkbox name=emailupdates value=\"yes\" $emailupdates>
I would like to receive email updates as changes such as followups are added to this tracking.<br>";
}
?>
<br>
This is the computer you are requesting a work-order on. Provided for informational purposes only.
<br><br><strong>Computer:</strong> <br>
<?
if($is_group == "no")
{
$query = "SELECT name FROM computers WHERE (ID = $ID)";
} else
{
$query = "SELECT name FROM groups WHERE (ID = $ID)";
}
$result = $db->query($query);
$computername = $db->result($result, 0, "name");
PRINT "$computername ($ID) <br>";
PRINT "<input type=hidden name=ID value=\"$ID\">";
PRINT "<input type=hidden name=is_group value=\"$is_group\">";
?>
<br><br>
Now you recieve the chance to explain your problem. Please be as clear as possible, but also keep it short. Do not simply type 'It doesn't turn on', but instead be more specific, for example, "My computer complains that it can't find my CD-ROM, and I need to be able to play my music."
<br>
<br><strong>Describe the problem:</strong>
<br>
<?
PRINT "<textarea cols=50 rows=14 wrap=soft name=contents>$contents</textarea>";
?>
<br>
<input type=submit value="Preview Job"> <input type=reset value="Reset"></form>
<?
commonFooter();
?>
|