Menu

[r9]: / tasks / historytask.php  Maximize  Restore  History

Download this file

160 lines (132 with data), 5.9 kB

  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
149
150
151
152
153
154
155
156
157
158
159
160
<?php
/*
** Application name: phpCollab
** Last Edit page: 05/11/2004
** Path by root: ../topics/viewtopic.php
** Authors: Ceam / Fullo
**
** =============================================================================
**
** phpCollab - Project Managment
**
** -----------------------------------------------------------------------------
** Please refer to license, copyright, and credits in README.TXT
**
** -----------------------------------------------------------------------------
** FILE: viewtopic.php
**
** DESC: Screen: view task mod history
**
** HISTORY:
** 05/11/2004 - fixed 1059973
** -----------------------------------------------------------------------------
** TO-DO:
** clean code
** =============================================================================
*/
$checkSession = "true";
include_once('../includes/library.php');
if ($type == "2") {
$tmpquery = "WHERE subtas.id = '$item'";
$subtaskDetail = new request();
$subtaskDetail->openSubtasks($tmpquery);
$tmpquery = "WHERE tas.id = '".$subtaskDetail->subtas_task[0]."'";
$taskDetail = new request();
$taskDetail->openTasks($tmpquery);
$tmpquery = "WHERE pro.id = '".$taskDetail->tas_project[0]."'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
if ($projectDetail->pro_enable_phase[0] != "0"){
$tPhase = $taskDetail->tas_parent_phase[0];
$tmpquery = "WHERE pha.project_id = '".$taskDetail->tas_project[0]."' AND pha.order_num = '$tPhase'";
$targetPhase = new request();
$targetPhase->openPhases($tmpquery);
}
}
if ($type == "1") {
$tmpquery = "WHERE tas.id = '$item'";
$taskDetail = new request();
$taskDetail->openTasks($tmpquery);
$tmpquery = "WHERE pro.id = '".$taskDetail->tas_project[0]."'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
if ($projectDetail->pro_enable_phase[0] != "0")
{
$tPhase = $taskDetail->tas_parent_phase[0];
if (!$tPhase){ $tPhase = '0'; }
$tmpquery = "WHERE pha.project_id = '".$taskDetail->tas_project[0]."' AND pha.order_num = '$tPhase'";
$targetPhase = new request();
$targetPhase->openPhases($tmpquery);
}
}
include('../themes/'.THEME.'/header.php');
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?",$strings["projects"],in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=".$projectDetail->pro_id[0],$projectDetail->pro_name[0],in));
if ($projectDetail->pro_phase_set[0] != "0"){
$blockPage->itemBreadcrumbs($blockPage->buildLink("../phases/listphases.php?id=".$projectDetail->pro_id[0],$strings["phases"],in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../phases/viewphase.php?id=".$targetPhase->pha_id[0],$targetPhase->pha_name[0],in));
}
$blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/listtasks.php?project=".$projectDetail->pro_id[0],$strings["tasks"],in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/viewtask.php?id=".$taskDetail->tas_id[0],$taskDetail->tas_name[0],in));
if ($type == "2") {
$blockPage->itemBreadcrumbs($blockPage->buildLink("../subtasks/viewsubtask.php?task=".$taskDetail->tas_id[0]."&id=".$subtaskDetail->subtas_id[0],$subtaskDetail->subtas_name[0],in));
$blockPage->itemBreadcrumbs($strings["updates_subtask"]);
}
if ($type == "1") {
$blockPage->itemBreadcrumbs($strings["updates_task"]);
}
$blockPage->closeBreadcrumbs();
if ($msg != "") {
include('../includes/messages.php');
$blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "tdP";
$block1->openForm("");
if ($error != "") {
$block1->headingError($strings["errors"]);
$block1->contentError($error);
}
if ($type == "1") {
$block1->heading($strings["task"]." : ".$taskDetail->tas_name[0]);
}
if ($type == "2") {
$block1->heading($strings["subtask"]." : ".$subtaskDetail->subtas_name[0]);
}
$block1->openContent();
$block1->contentTitle($strings["details"]);
$tmpquery = "WHERE upd.type='$type' AND upd.item = '$item' ORDER BY upd.created DESC";
$listUpdates = new request();
$listUpdates->openUpdates($tmpquery);
$comptListUpdates=count($listUpdates->upd_id);
for ($i=0;$i<$comptListUpdates;$i++) {
if (ereg("\[status:([0-9])\]",$listUpdates->upd_comments[$i])) {
preg_match("|\[status:([0-9])\]|i",$listUpdates->upd_comments[$i],$matches);
$listUpdates->upd_comments[$i] = ereg_replace("\[status:([0-9])\]","",$listUpdates->upd_comments[$i]."<br/>");
$listUpdates->upd_comments[$i] .= $strings["status"]." ".$status[$matches[1]];
}
if (ereg("\[priority:([0-9])\]",$listUpdates->upd_comments[$i])) {
preg_match("|\[priority:([0-9])\]|i",$listUpdates->upd_comments[$i],$matches);
$listUpdates->upd_comments[$i] = ereg_replace("\[priority:([0-9])\]","",$listUpdates->upd_comments[$i]."<br/>");
$listUpdates->upd_comments[$i] .= $strings["priority"]." ".$priority[$matches[1]];
}
if (ereg("\[datedue:([0-9]{4}-[0-9]{1,2}-[0-9]{1,2})\]",$listUpdates->upd_comments[$i])) {
preg_match("|\[datedue:([0-9]{4}-[0-9]{1,2}-[0-9]{1,2})\]|i",$listUpdates->upd_comments[$i],$matches);
$listUpdates->upd_comments[$i] = ereg_replace("\[datedue:([0-9]{4}-[0-9]{1,2}-[0-9]{1,2})\]","",$listUpdates->upd_comments[$i]."<br/>");
$listUpdates->upd_comments[$i] .= $strings["due_date"]." ".$matches[1];
}
$block1->contentRow($strings["posted_by"],$blockPage->buildLink($listUpdates->upd_mem_email_work[$i],$listUpdates->upd_mem_name[$i],mail));
if ($listUpdates->upd_created[$i] > $lastvisiteSession) {
$block1->contentRow($strings["when"],"<b>".createDate($listUpdates->upd_created[$i],$timezoneSession)."</b>");
} else {
$block1->contentRow($strings["when"],createDate($listUpdates->upd_created[$i],$timezoneSession));
}
$block1->contentRow("",nl2br($listUpdates->upd_comments[$i]));
$block1->contentRow("","","true");
}
$block1->closeContent();
$block1->closeForm();
include('../themes/'.THEME.'/footer.php');
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.