| [ PHPXref.com ] | [ Generated: Sun Jul 20 20:04:03 2008 ] | [ PMtool 1.2.2 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?PHP 2 /*************************************************************************** 3 * $Source: /cvsroot/pmtool/pmtool/projectdetails.php,v $ 4 * $Revision: 1.5 $ 5 * $Date: 2004/03/17 20:19:40 $ 6 * $Author: willuhn $ 7 * $Locker: $ 8 * $State: Exp $ 9 * 10 * Copyright (c) by willuhn.webdesign 11 * All rights reserved 12 * 13 * This program is free software; you can redistribute it and/or modify 14 * it under the terms of the GNU General Public License as published by 15 * the Free Software Foundation; either version 2 of the License, or 16 * (at your option) any later version. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * You should have received a copy of the GNU General Public License 24 * along with this program; if not, write to the Free Software 25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 26 ***************************************************************************/ 27 ?> 28 29 <?PHP 30 ####################################################################### 31 ## check login again 32 if (!$loginInst->id) { 33 echo $lang['common_accessDenied']."\n"; 34 exit; 35 } 36 if (!$loginInst->hasAccess("project")) { 37 echo $lang['common_accessDenied']."\n"; 38 exit; 39 } 40 41 $projectInst = new project(tool::secureGet('projectid')); 42 43 ####################################################################### 44 ## show project details 45 46 $customerInst = new customer($projectInst->customerId); 47 $managerInst = new user($projectInst->managerId); 48 49 $taskInst = new task(); 50 $taskInst->filterProjectId = $projectInst->id; 51 52 ?> 53 <h1><?PHP echo $lang['common_projectDetails'];?></h1> 54 <div align="center"> 55 <table border="0" cellpadding="2" cellspacing="1" width="96%"> 56 <tr> 57 <td><h2><?PHP echo $projectInst->name;?></h2></td> 58 </tr> 59 </table> 60 <table border="0" cellpadding="2" cellspacing="1" width="96%" bgcolor="#ffffff"> 61 <tr> 62 <th><?PHP echo $lang['common_description'];?></th> 63 <th><?PHP echo $projectInst->description;?></a></th> 64 </tr><tr> 65 <th><?PHP echo $lang['common_customer'];?></th> 66 <?PHP if ($customerInst->email) { ?> 67 <th><a href="mailto:<?PHP echo $customerInst->email;?>"><?PHP echo $customerInst->company;?></a></th> 68 <?PHP } else { ?> 69 <th><?PHP echo $customerInst->company;?></a></th> 70 <?PHP } ?> 71 </tr><tr> 72 <th><?PHP echo $lang['common_manager'];?></th> 73 <?PHP if ($customerInst->email) { ?> 74 <th><a href="mailto:<?PHP echo $managerInst->email;?>"><?PHP echo $managerInst->name;?></a></th> 75 <?PHP } else { ?> 76 <th><?PHP echo $managerInst->name;?></a></th> 77 <?PHP } ?> 78 </tr><tr> 79 <th><?PHP echo $lang['common_rate'];?></th> 80 <?PHP if ($projectInst->rate) { ?> 81 <th><?PHP echo $toolInst->formatCurrency($projectInst->rate);?>/hour</th> 82 <?PHP } else { ?> 83 <th>no</th> 84 <?PHP } ?> 85 </tr><tr> 86 <th><?PHP echo $lang['common_budget'];?></th> 87 <?PHP if ($projectInst->budget) { ?> 88 <th><?PHP echo $toolInst->formatCurrency($projectInst->budget);?></th> 89 <?PHP } else { ?> 90 <th>no</th> 91 <?PHP } ?> 92 </tr><tr> 93 <td class="list"><?PHP echo $lang['common_priority'];?></td> 94 <td class="list"><span class="<?PHP echo $projectInst->getPriorityStyle();?>"><?PHP echo $projectInst->getPriorityName();?></span></td> 95 </tr><tr> 96 <td class="list"><?PHP echo $lang['common_status'];?></td> 97 <td class="list"><?PHP echo $projectInst->getStatusName();?></td> 98 </tr> 99 </table> 100 101 <?PHP 102 # order 103 $order = "priority"; 104 if (tool::secureGet('order')) {$order = tool::secureGet('order');} 105 if (tool::secureGet('desc') == "DESC") {$desc = "";} 106 else {$desc = "DESC";} 107 $list = $taskInst->getList($order,$desc); 108 109 if ($taskInst->matches > 0) { 110 ####################################################################### 111 ## show existing tasks 112 ?> 113 <br> 114 <table border="0" cellpadding="2" cellspacing="1" width="96%" bgcolor="#ffffff"> 115 <tr> 116 <th colspan="6"><?PHP echo $taskInst->matches;?> <?PHP echo $lang['project_tasksUntilNow'];?></th> 117 </tr><tr> 118 <?PHP 119 echo "<th><a href=\"".$toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=".$projectInst->id."&order=subject&desc=".$desc)."\" title=\"".$lang['common_orderBySubject']."\">".$lang['common_subject']."</a></th>\n"; 120 echo "<th><a href=\"".$toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=".$projectInst->id."&order=time&desc=".$desc)."\" title=\"".$lang['common_orderByPostedTime']."\">".$lang['common_posted']."</a></th>\n"; 121 echo "<th><a href=\"".$toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=".$projectInst->id."&order=priority&desc=".$desc)."\" title=\"".$lang['common_orderByPriority']."\">".$lang['common_priority']."</a></th>\n"; 122 echo "<th><a href=\"".$toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=".$projectInst->id."&order=type&desc=".$desc)."\" title=\"".$lang['common_orderByType']."\">".$lang['common_type']."</a></th>\n"; 123 echo "<th><a href=\"".$toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=".$projectInst->id."&order=status&desc=".$desc)."\" title=\"".$lang['common_orderByStatus']."\">".$lang['common_status']."</a></th>\n"; 124 echo "<th>".$lang['common_usedTime']."</th>\n"; 125 126 $sum = 0; 127 $sum_private = 0; 128 $costs = 0; 129 $costs_private = 0; 130 $customerSum = 0; 131 $customerCosts = 0; 132 while ($element = current($list)) { 133 $taskInst->activate($element); 134 echo "<tr class=\"light\"><td class=list><nobr><a href=\"".$toolInst->encodeUrl("index.php?content=taskdetails.php&view=details&taskid=".$taskInst->id)."\" title=\"".$lang['common_showTaskdetails']."\">".substr($taskInst->subject,0,15)."</a></nobr></td>\n"; 135 echo "<td class=list><nobr>".$toolInst->getTime("d.m.Y, H:i",$taskInst->time)."</nobr></td>\n"; 136 echo "<td><nobr class=".$taskInst->getPriorityStyle().">".$taskInst->getPriorityName()."</nobr></td>\n"; 137 echo "<td><nobr class=".$taskInst->getTypeStyle().">".$taskInst->getTypeName()."</nobr></td>\n"; 138 echo "<td><nobr class=".$taskInst->getStatusStyle().">".$taskInst->getStatusName()."</nobr></td>\n"; 139 echo "<td class=list align=right><nobr>".$toolInst->formatTime($taskInst->getSummary())."</nobr></td></tr>\n"; 140 $sum += $taskInst->getSummary(); 141 $sum_private += $taskInst->getSummary(true); 142 $costs += $taskInst->getCosts(); 143 $costs_private += $taskInst->getCosts(true); 144 $customerCosts += $taskInst->getCustomerCosts(); 145 $customerSum += $taskInst->getCustomerSummary(); 146 next($list); 147 148 } 149 echo "<tr><td class=list colspan=6> </td></tr>\n"; 150 echo "<tr>\n"; 151 echo "<td class=list colspan=4 align=right><b>".$lang['common_summaryTime']." : </b></td>\n"; 152 echo "<td class=list colspan=2 align=right><nobr><b>".$toolInst->formatTime($sum)."</b></nobr></td>\n"; 153 echo "</tr>\n"; 154 155 echo "<tr>\n"; 156 echo "<td class=list_private colspan=4 align=right><b>".$lang['common_private_jobs']." - ".$lang['common_summaryTime']." : </b></td>\n"; 157 echo "<td class=list_private colspan=2 align=right><b>".$toolInst->formatTime($sum_private)."</b></td>\n"; 158 echo "</tr>\n"; 159 160 if ($loginInst->hasAccess("task.getSummary")) { 161 echo "<tr>\n"; 162 echo "<td class=list colspan=4 align=right><b>".$lang['common_roundedSummaryTime']." : </b></td>\n"; 163 echo "<td class=list colspan=2 align=right><b>".$toolInst->formatTime($toolInst->deductibleSeconds($sum))."</b></td>\n"; 164 echo "</tr>\n"; 165 } 166 if ($loginInst->hasAccess("task.getCosts")) { 167 echo "<tr>\n"; 168 echo "<td class=list colspan=4 align=right><b>".$lang['common_summaryCosts']." :</b></td>\n"; 169 echo "<td class=list colspan=2 align=right><nobr><b>".$toolInst->formatCurrency($costs+$costs_private)."</b></nobr></td>\n"; 170 echo "</tr>\n"; 171 } 172 if ($loginInst->hasAccess("task.getCustomerCosts")) { 173 echo "<tr>\n"; 174 echo "<td class=list colspan=4 align=right><b>".$lang['common_customerCosts']."</b> (".$lang['common_withoutBugsAndTodos'].") (".$toolInst->formatTime($toolInst->deductibleSeconds($customerSum)).") <b>:</b></td>\n"; 175 echo "<td class=list colspan=2 align=right><nobr><b>".$toolInst->formatCurrency($customerCosts)."</b></nobr></td>\n"; 176 echo "</tr>\n"; 177 } 178 if ($loginInst->hasAccess("task.getCustomerCosts") && $projectInst->budget) { 179 $percent = 100 - (($customerCosts * 100) / $projectInst->budget); 180 echo "<tr>\n"; 181 echo "<td class=list colspan=4 align=right><b>budget avaliable:</b></td>\n"; 182 echo "<td class=list colspan=2 align=right><nobr><b>".$toolInst->numberRound($percent,2)." %</b></nobr></td>\n"; 183 echo "</tr>\n"; 184 } 185 echo "</table>\n"; 186 } 187 ?> 188 </div> 189 190 191 <?PHP 192 /*************************************************************************** 193 * $Log: projectdetails.php,v $ 194 * Revision 1.5 2004/03/17 20:19:40 willuhn 195 * @N added priorities to projects 196 * 197 * Revision 1.4 2004/02/28 19:51:42 znouza 198 * 199 * index.php 200 * @B some minor bugs 201 * 202 * projectdetails.php 203 * @N feature private job support added 204 * 205 * taskdetails.php 206 * @N feature private job support added 207 * 208 * reports.php 209 * @B javascript (reports not shown) fixed 210 * @B missing } fixed 211 * @B some bugs fixed 212 * @C displaying tasks even no jobs added (for private jobs support) 213 * @N feature private job support added 214 * 215 * styles.css 216 * @N added list_private item for displaying private jobs (italics) 217 * 218 * Revision 1.3 2003/11/18 01:48:43 willuhn 219 * *** empty log message *** 220 * 221 * Revision 1.2 2003/09/27 18:23:44 willuhn 222 * *** empty log message *** 223 * 224 * Revision 1.1.1.1 2003/07/28 19:22:22 willuhn 225 * reimport 226 * 227 * Revision 1.12 2002/05/02 22:20:19 willuhn 228 * @B order 229 * @B array of rights was loaded everytime a user object was instanciated 230 * 231 * Revision 1.11 2002/04/14 22:03:57 willuhn 232 * @N multilanguage 233 * 234 * Revision 1.10 2002/04/01 23:17:22 willuhn 235 * @N added some language stuff 236 * 237 * Revision 1.9 2002/02/27 22:37:43 willuhn 238 * @C some styling in css 239 * 240 * Revision 1.8 2002/02/09 19:38:27 willuhn 241 * @N added CVS log 242 * @N added french language file 243 * 244 * 245 ***************************************************************************/ 246 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |