<?php
/*
* ITMS ValleyData source file version 1.0 May 16, 2003
*
* Shows the details of a pending task
* Note, this file expects to 'GET' the task_id from the url
*
*
* Internet Task Management System: An online system used for recording information about and assigning tasks and processes.
* Copyright (C) 2001 ValleyData Programming Group
*
* 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* See file named "gpl.txt" included with source code or
* visit http://www.gnu.org/copyleft/gpl.txt on the internet.
*/
$title="Task Details";
include("config.php");
include("toolbox.php");
include("error_handler.php");
include("db_tools.php");
include("login.php"); //users must be logged in to view task details (this doesn't ensure that the person is viewing his/her own task)
?>
<html>
<head>
<title><?php print($title); ?></title>
<link rel="stylesheet" type="text/css" href="itms.css" title="Default">
</head>
<body>
<?php
if(isset($_GET['task_id']))
{
db_open();
db_use();
$task_id = $_GET['task_id'];
$querySelect = "SELECT * FROM pending_tasks WHERE tid='$task_id'";
$result = db_query($querySelect); // Get the pending task details
while($row = db_fetch_row($result))
{
//Assign Values to variables
$task_uid = $row["uid"];
$task_assigner = get_user_name($row["assigner"]);
$task_title = $row["title"];
$task_info = $row["info"];
$task_date_assigned = convert_date($row["date_assigned"]);
$task_due_date = convert_date($row["due_date"]);
$task_period = $row["period"];
$task_period_unit = $row["period_unit"];
$task_priority = get_priority_string($row["priority"]);
}
$TASK_DETAIL_TABLE = <<<TDT
<table>
<tr>
<td>
<table cellspacing="1" cellpadding="1">
<tr class="menu-sub">
<td colspan="2"><b>$task_title</b></td>
</tr>
<tr class="menu-category">
<td>Assigned At: <br><b>$task_date_assigned</b></td><td>Due By: <br><b>$task_due_date</b></td>
</tr>
<tr class="table-separator-even">
<td colspan="2">
$task_info
</td>
</tr>
<tr class="table-separator-odd">
<td>Priority: <b>$task_priority</b></td><td>Assigned By: <b>$task_assigner</b></td>
</tr>
</table>
</td>
</tr>
</table>
TDT;
print($TASK_DETAIL_TABLE);
}
else
{
print("<b>Data Missing on task_show.php, expecting task_id</b>");
}
?>
</body>
</html>