* Copyright 2002 GForge, LLC
* http://gforge.org/
*
- * @version $Id$
*/
/*
Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
*/
-require_once('note.php');
-require_once('common/reporting/report_utils.php');
-require_once('common/reporting/Report.class.php');
-
-echo notepad_func();
+require_once $gfwww.'include/note.php';
+require_once $gfcommon.'reporting/report_utils.php';
+require_once $gfcommon.'reporting/Report.class.php';
pm_header(array('title'=>_('Modify Task'),'pagename'=>'pm_modtask','group_project_id'=>$group_project_id));
+echo notepad_func();
+
?>
<form action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&group_project_id=$group_project_id"; ?>" method="post">
<input type="hidden" name="func" value="postmodtask" />
<input type="hidden" name="project_task_id" value="<?php echo $project_task_id; ?>" />
-<table border="0" width="100%">
+<table border="0" width="100%" class="mod_task">
<tr>
<td><strong><?php echo _('Submitted by') ?>:</strong><br />
<tr>
<td>
- <strong><?php echo _('Category') ?>:</strong><br />
- <?php echo $pg->categoryBox('category_id',$pt->getCategoryID()); ?> <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/pm/admin/?<?php echo "group_id=$group_id&add_cat=1&group_project_id=$group_project_id"; ?>">(admin)</a>
+ <strong><?php echo _('Category') ?></strong><br />
+ <?php echo $pg->categoryBox('category_id',$pt->getCategoryID()); ?> <?php util_make_link ('/pm/admin/?<?php echo "group_id=$group_id&add_cat=1&group_project_id='.$group_project_id,_('admin')); ?>
</td>
<td>
<tr>
<td>
<strong><?php echo _('Task Summary') ?>:</strong><br />
- <input type="text" name="summary" size="40" maxlength="65" value="<?php echo $pt->getSummary(); ?>" />
+ <input type="text" name="summary" size="65" maxlength="65" value="<?php echo $pt->getSummary(); ?>" />
</td>
<td>
<a href="<?php echo getStringFromServer('PHP_SELF')."?func=deletetask&project_task_id=$project_task_id&group_id=$group_id&group_project_id=$group_project_id"; ?>"><?php echo _('Delete this task') ?></a>
<strong><?php echo _('Original Comment') ?>:</strong><br />
<?php echo nl2br( $pt->getDetails() ); ?>
<p />
- <strong><?php echo _('Add A Comment') ?>:</strong><?php echo notepad_button('document.forms[1].details') ?><br />
- <textarea name="details" rows="5" cols="40" wrap="soft"></textarea>
+ <strong><?php echo _('Add A Comment') ?>:</strong><?php echo notepad_button('document.forms[2].details') ?><br />
+ <textarea name="details" rows="5" cols="80"></textarea>
</td>
</tr>
?>
</td>
</tr>
- <input type="hidden" name="duration" value="<?php echo $pt->getDuration(); ?>">
- <input type="hidden" name="parent_id" value="<?php echo $pt->getParentID(); ?>">
+ <input type="hidden" name="duration" value="<?php echo $pt->getDuration(); ?>" />
+ <input type="hidden" name="parent_id" value="<?php echo $pt->getParentID(); ?>" />
<!--
//will add duration and parent selection boxes
<tr>
</td>
<td>
- <strong><?php echo _('Status') ?>:</strong><br />
+ <strong><?php echo _('Status') ?></strong><br />
<?php
// echo $pg->statusBox('status_id', $pt->getStatusID(), false );
?>
</table>
</form>
-<p>
+
<h3><?php echo _('Time tracking'); ?></h3>
-<p>
+
<?php
$title_arr = array();
$title_arr[]=_('Week');
echo '<form action="/reporting/timeadd.php" method="post" />
<input type="hidden" name="project_task_id" value="'.$project_task_id.'">
<input type="hidden" name="submit" value="1" />
- <tr '.$HTML->boxGetAltRowStyle($xi++).'>
+ <tr '.$HTML->boxGetAltRowStyle(@$xi++).'>
<td style="text-align:center">'. report_weeks_box($report, 'week') .'</td>
<td style="text-align:center">'. report_day_adjust_box($report, 'days_adjust') .'</td>
<td style="text-align:center"><input type="text" name="hours" value="" size="3" maxlength="3" /></td>
//
// Display Time Recorded for this task
//
-$sql="SELECT users.realname, rep_time_tracking.report_date, rep_time_tracking.hours, rep_time_category.category_name
+
+
+$res=db_query_params ('SELECT users.realname, rep_time_tracking.report_date, rep_time_tracking.hours, rep_time_category.category_name
FROM users,rep_time_tracking,rep_time_category
WHERE
users.user_id=rep_time_tracking.user_id
AND rep_time_tracking.time_code=rep_time_category.time_code
- AND rep_time_tracking.project_task_id='$project_task_id'";
-
-$res=db_query($sql);
+ AND rep_time_tracking.project_task_id=$1',
+ array($project_task_id));
+$total_hours =0;
for ($i=0; $i<db_numrows($res); $i++) {
echo '
<tr '.$HTML->boxGetAltRowStyle($xi++).'>
<td> </td>
- <td>'.date($sys_datefmt,db_result($res,$i,'report_date')).'</td>
+ <td>'.date(_('Y-m-d H:i'),db_result($res,$i,'report_date')).'</td>
<td>'.db_result($res,$i,'hours').'</td>
<td>'.db_result($res,$i,'category_name').'</td>
<td>'.db_result($res,$i,'realname').'</td>