<?php
#    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.
#
################################################################################

include("../include/irm.inc");
require_once 'lib/Config.php';
require_once 'include/i18n.php';

AuthCheck("tech");

commonHeader(_("Setup") . " - " . _("FastTrack Templates Edit"));

$query = "select * from fasttracktemplates where (ID=$ID)";
$DB = Config::Database();
$result = $DB->getRow($query);
$name = $result["name"];
$priority = $result["priority"];
$request = $result["request"];
$response = $result["response"];

__("Use this form to edit a FastTrack template.");
PRINT '<a href="'.Config::AbsLoc('users/setup-fasttrack.php').'">';
__("Go back to FastTrack tmplates");
PRINT "</a><br>";
PRINT "<table width=100% border=1 noshade><form method=post ";
PRINT ' action="'.Config::AbsLoc('users/setup-fasttrack-update.php').'"><tr bgcolor=#CCCCCC>';
PRINT "<td colspan=2><font face=\"Arial, Helvetica\">";
$new_date = date("Y-m-d H:i:s");
PRINT "<strong>";
__("FastTrack Template Name");
PRINT "<input type=text name=templname value=\"$name\" size=40></strong>";
PRINT "</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><TD colspan=2>";
PRINT "<STRONG>";
__("Priority:");
PRINT "</STRONG> <SELECT NAME=priority>\n";
$opts = array(	5 => _('Very High'),
		4 => _('High'),
		3 => _('Normal'),
		2 => _('Low'),
		1 => _('Very Low')
		);
echo select_options($opts, $priority);
PRINT "</SELECT>\n";
PRINT "<BR>\n";
PRINT "<BR>\n";
PRINT "<STRONG>";
__("Describe the problem:");
PRINT "</STRONG>\n";
PRINT "<BR>\n";
PRINT "<textarea cols=50 rows=4 wrap=soft name=contents>$request</textarea>"; 
PRINT "<BR><BR>\n";
PRINT "<STRONG>";
__("Describe the solution (will be added as a followup):");
PRINT "</STRONG>\n";
PRINT "<BR>\n";
PRINT "<textarea cols=50 rows=4 wrap=soft name=solution>$response</textarea>\n"; 
PRINT "</TD>\n";
PRINT "</TR>\n";
PRINT "<input type=hidden name=ID value=$ID>";
PRINT "<tr bgcolor=#CCCCCC><td><input type=submit value=Update></td><td>
		<input type=Reset value=Reset></form></td></tr></table>";
PRINT "<br>";
PRINT "<br>";
commonFooter();
