// get the prefered date format $df = $AppUI->getPref('SHDATEFORMAT'); $project = new CProject(); $criticalTasks = $project_id > 0 ? $project->getCriticalTasks($project_id) : null; // pull valid projects and their percent complete information $projects = $project->getAllowedProjects($AppUI->user_id, false); ############################################## /* gantt is called now by the todo page, too. ** there is a different filter approach in todo ** so we have to tweak a little bit, ** also we do not have a special project available */ $caller = w2PgetParam($_REQUEST, 'caller', null); if ($caller == 'todo') { $user_id = w2PgetParam($_REQUEST, 'user_id', $AppUI->user_id); $projects[$project_id]['project_name'] = $AppUI->_('Todo for') . ' ' . CContact::getContactByUserid($user_id); $projects[$project_id]['project_color_identifier'] = 'ff6000'; $showLabels = w2PgetParam($_REQUEST, 'showLabels', false); $showPinned = w2PgetParam($_REQUEST, 'showPinned', false); $showArcProjs = w2PgetParam($_REQUEST, 'showArcProjs', false); $showHoldProjs = w2PgetParam($_REQUEST, 'showHoldProjs', false); $showDynTasks = w2PgetParam($_REQUEST, 'showDynTasks', false); $showLowTasks = w2PgetParam($_REQUEST, 'showLowTasks', true); $q = new DBQuery(); $q->addQuery('ta.*'); $q->addQuery('project_name, project_id, project_color_identifier'); $q->addQuery('tp.task_pinned'); $q->addTable('projects', 'pr'); $q->addTable('tasks', 'ta'); $q->addTable('user_tasks', 'ut'); $q->leftJoin('user_task_pin', 'tp', 'tp.task_id = ta.task_id and tp.user_id = ' . (int) $user_id);
function w2PgetUsernameFromID($userId) { trigger_error("w2PcontextHelp() has been deprecated in v3.1 and will be removed by v5.0. Please use CContact::getContactByUserid() instead.", E_USER_NOTICE); return CContact::getContactByUserid($userId); }
echo $AppUI->_($message_id ? 'Edit Message' : 'Add Message'); ?> </strong></th> </tr> <?php if ($message_parent >= 0) { //check if this is a reply-post; if so, printout the original message $date = intval($message->message_date) ? new w2p_Utilities_Date($message->message_date) : new w2p_Utilities_Date(); ?> <tr> <td align="right"><?php echo $AppUI->_('Author'); ?> :</td> <td align="left"><?php echo CContact::getContactByUserid($message->message_author); ?> (<?php echo $AppUI->formatTZAwareTime($message->message_date, $df . ' ' . $tf); ?> )</td> </tr> <tr><td align="right"><?php echo $AppUI->_('Subject'); ?> :</td><td align="left"><?php echo $message->message_title; ?> </td></tr> <tr><td align="right" valign="top"><?php echo $AppUI->_('Message');
// check permissions for this record $canEdit = canEdit('system'); // Check permissions if (!$canEdit && $user_id != $AppUI->user_id) { $AppUI->redirect('m=public&a=access_denied'); } // load the preferences $q = new w2p_Database_Query(); $q->addTable('user_preferences'); $q->addQuery('pref_name, pref_value'); $q->addWhere('pref_user = '******'Default'; } $titleBlock = new w2p_Theme_TitleBlock('Edit User Preferences', 'myevo-weather.png', $m, $m . '.' . $a); $perms =& $AppUI->acl(); if ($canEdit) { $titleBlock->addCrumb('?m=system', 'system admin'); $titleBlock->addCrumb('?m=system&a=systemconfig', 'system configuration'); } $titleBlock->show(); ?> <script language="javascript" type="text/javascript"> function submitIt() { var form = document.changeuser; // Collate the checked states of the task log stuff
</strong> </th> </tr> <?php if ($message_parent >= 0) { //check if this is a reply-post; if so, printout the original message $messageAuthor = isset($message->message_author) ? $message->message_author : $AppUI->user_id; $date = intval($message->message_date) ? new w2p_Utilities_Date($message->message_date) : new w2p_Utilities_Date(); ?> <tr> <td align="right"><?php $form->showLabel('Author'); ?> </td> <td align="left"><?php echo CContact::getContactByUserid($messageAuthor); ?> (<?php echo $AppUI->formatTZAwareTime($message->message_date, $df . ' ' . $tf); ?> )</td> </tr> <tr><td align="right"><?php $form->showLabel('Subject'); ?> </td> <td align="left"><?php echo $message->message_title; ?> </td></tr> <tr><td align="right" valign="top"><?php
</font> </td> <td> <a href="?m=projects&a=view&project_id=<?php echo $project->project_id; ?> "> <?php $projectName = htmlentities($project->project_name); echo $projectName; ?> </a> </td> <td align="center" nowrap="nowrap"> <?php $contactName = htmlentities(CContact::getContactByUserid($project->project_owner)); echo $contactName; ?> </td> <td><?php echo $AppUI->formatTZAwareTime($project->project_start_date, $df); ?> </td> <td><?php echo $AppUI->formatTZAwareTime($criticalTasks[0]['task_end_date'], $df); ?> </td> <td align="center"> <?php $totalBudget = 0; foreach ($billingCategory as $id => $category) {
function w2PgetUsernameFromID($userId) { return CContact::getContactByUserid($userId); }
<a href="?m=tasks&a=view&task_id=<?php echo $task->task_id; ?> "> <?php $taskName = htmlentities($task->task_name); echo $taskName; if ($task->task_id != $task->task_parent) { $taskName = '--' . $taskName; } ?> </a> </td> <td align="center" nowrap="nowrap"> <?php $contactName = htmlentities(CContact::getContactByUserid($task->task_owner)); echo $contactName; ?> </td> <td><?php echo $AppUI->formatTZAwareTime($task->task_start_date, $df); ?> </td> <td><?php echo $AppUI->formatTZAwareTime($task->task_end_date, $df); ?> </td> <td align="center"> <?php $targetBudget = $w2Pconfig['currency_symbol'] . (int) ($task->task_target_budget * $factor); echo $targetBudget;
echo $AppUI->_($message_id ? 'Edit Message' : 'Add Message'); ?> </strong></th> </tr> <?php if ($message_parent >= 0) { //check if this is a reply-post; if so, printout the original message $date = intval($message_info['message_date']) ? new CDate($message_info['message_date']) : new CDate(); ?> <tr> <td align="right"><?php echo $AppUI->_('Author'); ?> :</td> <td align="left"><?php echo CContact::getContactByUserid($message_info['message_author']); ?> (<?php echo $date->format($df . ' ' . $tf); ?> )</td> </tr> <tr><td align="right"><?php echo $AppUI->_('Subject'); ?> :</td><td align="left"><?php echo $message_info['message_title']; ?> </td></tr> <tr><td align="right" valign="top"><?php echo $AppUI->_('Message');
<td width="50%"> <table cellspacing="1" cellpadding="2" border="0" width="100%"> <tr> <td colspan="3"><strong><?php echo $AppUI->_('Assigned Users'); ?> </strong></td> </tr> <tr> <td colspan="3"> <?php $s = ''; $s = count($users) == 0 ? '<tr><td bgcolor="#ffffff">' . $AppUI->_('none') . '</td></tr>' : ''; foreach ($users as $row) { $s .= '<tr>'; $s .= '<td class="hilite"><a href="mailto:' . $row['user_email'] . '">' . CContact::getContactByUserid($row['user_id']) . '</a></td>'; $s .= '<td class="hilite" align="right">' . $row['perc_assignment'] . '%</td>'; $s .= '</tr>'; } echo '<table width="100%" cellspacing="1" bgcolor="black">' . $s . '</table>'; ?> </td> </tr> <?php $taskDep = $obj->getDependencyList($task_id); ?> <tr> <td colspan="3"><strong><?php echo $AppUI->_('Dependencies'); ?>