<td align="right" nowrap="nowrap"><?php echo $AppUI->_('File Name'); ?> :</td> <td align="left" class="hilite"><?php echo strlen($obj->file_name) == 0 ? "n/a" : $obj->file_name; ?> </td> </tr> <tr valign="top"> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Type'); ?> :</td> <?php echo $htmlHelper->createCell('file_type', $obj->file_type); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Size'); ?> :</td> <?php echo $htmlHelper->createCell('file_size', $obj->file_size); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Uploaded By'); ?>
?> <?php echo htmlspecialchars($department->company_name, ENT_QUOTES); ?> <?php } ?> </td> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Department'); ?> :</td> <?php echo $htmlHelper->createCell('dept_name', $department->dept_name); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Owner'); ?> :</td> <?php echo $htmlHelper->createCell('contact_name', $department->contact_name); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Type'); ?>
$s .= $row[$field] ? '</a>' : ''; $s .= '</td>'; break; case 'department_list': $dept_array = CProject::getDepartments($AppUI, $row['project_id']); $s .= '<td class="data _list">'; foreach ($dept_array as $dept) { $s .= '<a href="?m=departments&a=view&dept_id=' . $dept['dept_id'] . '">'; $s .= $dept['dept_name']; $s .= '</a>'; $s .= '<br />'; } $s .= '</td>'; break; default: $s .= $htmlHelper->createCell($field, $row[$field]); } } if ($show_all_projects) { $s .= '<td class="data _status" nowrap="nowrap">'; $s .= $row['project_status'] == 0 ? $AppUI->_('Not Defined') : ($projectStatuses[0] ? $AppUI->_($project_statuses[$row['project_status'] + 2]) : $AppUI->_($project_statuses[$row['project_status'] + 1])); $s .= '</td>'; } $s .= '<td class="center"><input type="checkbox" name="project_id[]" value="' . $row['project_id'] . '" /></td>'; if ($level) { $s .= '</div>'; } $s .= '</tr>'; if ($project_id > 0 && !isset($projectArray[$project_id]) || !$project_id && !isset($projectArray[$row['project_id']])) { echo $s; }
foreach ($modules as $row) { // clear the file system entry if (isset($modFiles[$row['mod_directory']])) { $modFiles[$row['mod_directory']] = ''; } $query_string = '?m=' . $m . '&u=' . $u . '&a=domodsql&mod_id=' . $row['mod_id']; $s = ''; $s .= '<td width="64" align="center">'; if ($canEdit) { $s .= '<a href="' . $query_string . '&cmd=movefirst"><img src="' . w2PfindImage('icons/2uparrow.png') . '" /></a>'; $s .= '<a href="' . $query_string . '&cmd=moveup"><img src="' . w2PfindImage('icons/1uparrow.png') . '" /></a>'; $s .= '<a href="' . $query_string . '&cmd=movedn"><img src="' . w2PfindImage('icons/1downarrow.png') . '" /></a>'; $s .= '<a href="' . $query_string . '&cmd=movelast"><img src="' . w2PfindImage('icons/2downarrow.png') . '" /></a>'; } $s .= '</td>'; $s .= $htmlHelper->createCell('na', $row['mod_name']); $s .= '<td>'; $s .= '<img src="' . w2PfindImage('obj/dot' . ($row['mod_active'] ? 'green' : 'yellowanim') . '.gif') . '" alt="" /> '; if ($canEdit) { $s .= '<a href="' . $query_string . '&cmd=toggle&">'; } $s .= $row['mod_active'] ? $AppUI->_('active') : $AppUI->_('disabled'); if ($canEdit) { $s .= '</a>'; } if ($row['mod_type'] != 'core' && $canEdit) { $s .= ' | <a href="' . $query_string . '&cmd=remove" onclick="return window.confirm(' . "'" . $AppUI->_('This will delete all data associated with the module!') . "\\n\\n" . $AppUI->_('Are you sure?') . "\\n" . "'" . ');">' . $AppUI->_('remove') . '</a>'; } //check for a setup file $ok = file_exists(W2P_BASE_DIR . '/modules/' . $row['mod_directory'] . '/setup.php'); if ($ok) {
$status = w2PgetSysVal('TaskStatus'); $task_types = w2PgetSysVal('TaskType'); $customLookups = array('budget_category' => $billingCategory, 'task_duration_type' => $durnTypes, 'task_log_reference' => $taskLogReference, 'task_status' => $status, 'task_type' => $task_types); if (count($logs)) { foreach ($logs as $row) { $s .= '<tr bgcolor="white" valign="top"><td>'; if ($canEdit) { $s .= '<a href="?m=tasks&a=view&task_id=' . $task_id . '&tab='; $s .= $tab == -1 ? $AppUI->getState('TaskLogVwTab') : '1'; $s .= '&task_log_id=' . $row['task_log_id'] . '">' . w2PshowImage('icons/stock_edit-16.png', 16, 16, '') . '</a>'; } $s .= '<a name="tasklog' . $row['task_log_id'] . '"></a>'; $s .= '</td>'; $htmlHelper->stageRowData($row); foreach ($fieldList as $index => $column) { $s .= $htmlHelper->createCell($fieldList[$index], $row[$fieldList[$index]], $customLookups); } $s .= '<td>'; if ($canDelete) { $s .= '<a href="javascript:delIt2(' . $row['task_log_id'] . ');" title="' . $AppUI->_('delete log') . '">' . w2PshowImage('icons/stock_delete-16.png', 16, 16, '') . '</a>'; } $s .= '</td></tr>'; $hrs += (double) $row['task_log_hours']; } } $s .= '<tr bgcolor="white" valign="top">'; $s .= '<td colspan="6" align="right">' . $AppUI->_('Total Hours') . ' =</td>'; $s .= $htmlHelper->createCell('total_duration', sprintf('%.2f', $hrs)); $s .= '<td align="right" colspan="3">'; if ($perms->checkModuleItem('tasks', 'edit', $task_id)) { $s .= '<form action="?m=tasks&a=view&tab=1&task_id=' . $task_id . '" method="post" accept-charset="utf-8">';
<table class="tbl list center" width="50%"> <tr> <?php foreach ($fieldNames as $index => $name) { ?> <th><?php echo $AppUI->_($fieldNames[$index]); ?> </th> <?php } ?> </tr> <?php $htmlHelper = new w2p_Output_HTMLHelper($AppUI); foreach ($rows as $row) { $htmlHelper->stageRowData($row); ?> <tr><?php echo $htmlHelper->createCell('na', $row['contact_first_name']); echo $htmlHelper->createCell('na', $row['contact_last_name']); echo $htmlHelper->createCell('user_ip', $row['user_ip']); echo $htmlHelper->createCell('log_in_datetime', $row['date_time_in']); echo $htmlHelper->createCell('log_out_datetime', $row['date_time_out']); ?> </tr><?php } ?> </table> <?php }
</form> <table border="0" cellpadding="4" cellspacing="0" width="100%" class="std view"> <tr> <td valign="top" width="50%"> <strong><?php echo $AppUI->_('Details'); ?> </strong> <table cellspacing="1" cellpadding="2" width="100%"> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Event Title'); ?> :</td> <?php echo $htmlHelper->createCell('event_title', $event->event_title); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Type'); ?> :</td> <?php echo $htmlHelper->createCell('event_type', $AppUI->_($types[$event->event_type])); ?> </tr> <?php if ($event->event_project) { ?> <tr>
function showtask_pr_ed(&$arr, $level = 0, $today_view = false) { global $AppUI, $done; //Check for Tasks Access $tmpTask = new CTask(); $tmpTask->load($arr['task_id']); $canAccess = $tmpTask->canAccess(); if (!$canAccess) { return false; } $htmlHelper = new w2p_Output_HTMLHelper($AppUI); $htmlHelper->df .= ' ' . $AppUI->getPref('TIMEFORMAT'); $done[] = $arr['task_id']; $s = '<tr>'; // dots $s .= '<td style="width: ' . ($today_view ? '20%' : '50%') . '" class="data _name">'; for ($y = 0; $y < $level; $y++) { if ($y + 1 == $level) { $image = w2PfindImage('corner-dots.gif', $m); } else { $image = w2PfindImage('shim.gif', $m); } $s .= '<img src="' . $image . '" width="16" height="12" border="0" alt="" />'; } // name link $alt = mb_strlen($arr['task_description']) > 80 ? mb_substr($arr['task_description'], 0, 80) . '...' : $arr['task_description']; // instead of the statement below $alt = mb_str_replace('"', """, $alt); $alt = mb_str_replace("\r", ' ', $alt); $alt = mb_str_replace("\n", ' ', $alt); $open_link = w2PshowImage('collapse.gif'); if ($arr['task_milestone'] > 0) { $s .= ' <b>' . $arr["task_name"] . '</b><!--</a>--> <img src="' . w2PfindImage('icons/milestone.gif', $m) . '" border="0" alt="" />'; } elseif ($arr['task_dynamic'] == '1') { $s .= $open_link; $s .= '<strong>' . $arr['task_name'] . '</strong>'; } else { $s .= $arr['task_name']; } $s .= '</td>'; $s .= $htmlHelper->createCell('task_percent_complete', $arr['task_percent_complete']); $s .= $htmlHelper->createCell('task_start_date', $arr['task_start_date']); $s .= $htmlHelper->createCell('task_end_date', $arr['task_end_date']); $s .= $htmlHelper->createCell('last_update', $arr['last_update']); $s .= '</tr>'; return $s; }
$task_types = w2PgetSysVal('TaskType'); $customLookups = array('budget_category' => $billingCategory, 'task_duration_type' => $durnTypes, 'task_log_reference' => $taskLogReference, 'task_status' => $status, 'task_type' => $task_types); if (count($logs)) { foreach ($logs as $row) { $s .= '<tr>'; $s .= '<td class="data _edit">'; if ($canEdit) { $s .= '<a href="?m=tasks&a=view&task_id=' . $task_id . '&tab='; $s .= $tab == -1 ? $AppUI->getState('TaskLogVwTab') : '1'; $s .= '&task_log_id=' . $row['task_log_id'] . '">' . w2PshowImage('icons/stock_edit-16.png', 16, 16, '') . '</a>'; } $s .= '<a name="tasklog' . $row['task_log_id'] . '"></a>'; $s .= '</td>'; $htmlHelper->stageRowData($row); foreach ($fieldList as $index => $column) { $s .= $htmlHelper->createCell($fieldList[$index], $row[$fieldList[$index]], $customLookups); } $s .= '<td class="data _delete">'; if ($canDelete) { $s .= '<a href="javascript:delIt2(' . $row['task_log_id'] . ');" title="' . $AppUI->_('delete log') . '">' . w2PshowImage('icons/stock_delete-16.png', 16, 16, '') . '</a>'; } $s .= '</td>'; $s .= '</tr>'; $hrs += (double) $row['task_log_hours']; } } $s .= '<tr>'; $s .= '<td colspan="6" align="right">' . $AppUI->_('Total Hours') . ' =</td>'; $s .= $htmlHelper->createCell('task_log_hours', sprintf('%.2f', $hrs)); $s .= '<td align="right" colspan="3">'; if ($perms->checkModuleItem('tasks', 'edit', $task_id)) {
function displayFiles($AppUI, $folder_id, $task_id, $project_id, $company_id) { global $m, $tab, $xpg_min, $xpg_pagesize, $showProject, $file_types, $company_id, $current_uri, $canEdit; // SETUP FOR FILE LIST $q = new w2p_Database_Query(); $q->addQuery('f.*, max(f.file_id) as latest_id, count(f.file_version) as file_versions, round(max(file_version), 2) as file_lastversion, file_owner, user_id'); $q->addQuery('ff.*, max(file_version) as file_version, f.file_date as file_datetime'); $q->addTable('files', 'f'); $q->addJoin('file_folders', 'ff', 'ff.file_folder_id = file_folder'); $q->addJoin('projects', 'p', 'p.project_id = file_project'); $q->addJoin('tasks', 't', 't.task_id = file_task'); $q->addJoin('users', 'u', 'u.user_id = file_owner'); $q->leftJoin('project_departments', 'project_departments', 'p.project_id = project_departments.project_id OR project_departments.project_id IS NULL'); $q->leftJoin('departments', 'departments', 'departments.dept_id = project_departments.department_id OR dept_id IS NULL'); //TODO: apply permissions properly $project = new CProject(); $deny1 = $project->getDeniedRecords($AppUI->user_id); if (count($deny1) > 0) { $q->addWhere('file_project NOT IN (' . implode(',', $deny1) . ')'); } //TODO: apply permissions properly $task = new CTask(); $deny2 = $task->getDeniedRecords($AppUI->user_id); if (count($deny2) > 0) { $q->addWhere('file_task NOT IN (' . implode(',', $deny2) . ')'); } if ($project_id) { $q->addWhere('file_project = ' . (int) $project_id); } if ($task_id) { $q->addWhere('file_task = ' . (int) $task_id); } if ($company_id) { $q->addWhere('project_company = ' . (int) $company_id); } //$tab = ($m == 'files') ? $tab-1 : -1; $temp_tab = $m == 'files' ? $tab - 1 : -1; if ($temp_tab >= 0 and count($file_types) - 1 > $temp_tab) { //if ($tab >= 0) { $q->addWhere('file_category = ' . (int) $temp_tab); } $q->setLimit($xpg_pagesize, $xpg_min); if ($folder_id > -1) { $q->addWhere('file_folder = ' . (int) $folder_id); } $q->addGroup('file_version_id DESC'); $q->addOrder('project_name ASC, file_parent ASC, file_id DESC'); $qv = new w2p_Database_Query(); $qv->addTable('files'); $qv->addQuery('file_id, file_version, file_project, file_name, file_task, file_description, file_owner, file_size, file_category, task_name, file_version_id, file_date as file_datetime, file_checkout, file_co_reason, file_type, file_date, cu.user_username as co_user, project_name, project_color_identifier, project_owner, u.user_id, con.contact_first_name, con.contact_last_name, con.contact_display_name as contact_name, co.contact_first_name as co_contact_first_name, co.contact_last_name as co_contact_last_name, co.contact_display_name as co_contact_name '); $qv->addJoin('projects', 'p', 'p.project_id = file_project'); $qv->addJoin('users', 'u', 'u.user_id = file_owner'); $qv->addJoin('contacts', 'con', 'con.contact_id = u.user_contact'); $qv->addJoin('tasks', 't', 't.task_id = file_task'); $qv->addJoin('file_folders', 'ff', 'ff.file_folder_id = file_folder'); if ($project_id) { $qv->addWhere('file_project = ' . (int) $project_id); } if ($task_id) { $qv->addWhere('file_task = ' . (int) $task_id); } if ($company_id) { $qv->addWhere('project_company = ' . (int) $company_id); } if ($temp_tab >= 0 and count($file_types) - 1 > $temp_tab) { //if ($tab >= 0) { $qv->addWhere('file_category = ' . (int) $temp_tab); } $qv->leftJoin('users', 'cu', 'cu.user_id = file_checkout'); $qv->leftJoin('contacts', 'co', 'co.contact_id = cu.user_contact'); if ($folder_id > -1) { $qv->addWhere('file_folder = ' . (int) $folder_id); } $files = $q->loadList(); $file_versions = $qv->loadHashList('file_id'); $module = new w2p_System_Module(); $fields = $module->loadSettings('files', 'index_list'); if (count($fields) > 0) { $fieldList = array_keys($fields); $fieldNames = array_values($fields); } else { // TODO: This is only in place to provide an pre-upgrade-safe // state for versions earlier than v3.0 // At some point at/after v4.0, this should be deprecated $fieldList = array('file_name', 'file_description', 'file_version', 'file_category', 'file_folder', 'file_task', 'file_owner', 'file_datetime'); $fieldNames = array('File Name', 'Description', 'Version', 'Category', 'Folder', 'Task Name', 'Owner', 'Date'); $module->storeSettings('files', 'index_list', $fieldList, $fieldNames); } $s = '<tr>'; $s .= '<th></th>'; $s .= '<th>' . $AppUI->_('co') . '</th>'; foreach ($fieldNames as $index => $name) { $s .= '<th>' . $AppUI->_($fieldNames[$index]) . '</th>'; } $s .= '<th></th>'; $s .= '</tr>'; $fp = -1; $htmlHelper = new w2p_Output_HTMLHelper($AppUI); $htmlHelper->df .= ' ' . $AppUI->getPref('TIMEFORMAT'); $file_types = w2PgetSysVal('FileType'); $customLookups = array('file_category' => $file_types); foreach ($files as $row) { $latest_file = $file_versions[$row['latest_id']]; if ($fp != $latest_file['file_project']) { if (!$latest_file['file_project']) { $latest_file['project_name'] = $AppUI->_('Not attached to a project'); $latest_file['project_color_identifier'] = 'f4efe3'; } if ($showProject) { $style = 'background-color:#' . $latest_file['project_color_identifier'] . ';color:' . bestColor($latest_file['project_color_identifier']); $s .= '<tr>'; $s .= '<td colspan="20" style="text-align: left; border: outset 2px #eeeeee;' . $style . '">'; if ($latest_file['file_project'] > 0) { $href = './index.php?m=projects&a=view&project_id=' . $latest_file['file_project']; } else { $href = './index.php?m=projects'; } $s .= '<a href="' . $href . '">'; $s .= '<span style="' . $style . '">' . $latest_file['project_name'] . '</span></a>'; $s .= '</td></tr>'; } } $fp = $latest_file['file_project']; $row['file_datetime'] = $latest_file['file_datetime']; $row['file_id'] = $latest_file['file_id']; $htmlHelper->stageRowData($row); $s .= '<tr>'; $s .= '<td class="data">'; if ($canEdit && (empty($latest_file['file_checkout']) || $latest_file['file_checkout'] == 'final' && ($canEdit || $latest_file['project_owner'] == $AppUI->user_id))) { $s .= '<a href="./index.php?m=files&a=addedit&file_id=' . $latest_file['file_id'] . '">' . w2PshowImage('kedit.png', '16', '16', 'edit file', 'edit file', 'files') . '</a>'; } $s .= '</td>'; $s .= '<td class="data">'; if ($canEdit && empty($latest_file['file_checkout'])) { $s .= '<a href="?m=files&a=co&file_id=' . $latest_file['file_id'] . '">' . w2PshowImage('up.png', '16', '16', 'checkout', 'checkout file', 'files') . '</a>'; } else { if ($latest_file['file_checkout'] == $AppUI->user_id) { $s .= '<a href="?m=files&a=addedit&ci=1&file_id=' . $latest_file['file_id'] . '">' . w2PshowImage('down.png', '16', '16', 'checkin', 'checkin file', 'files') . '</a>'; } else { if ($latest_file['file_checkout'] == 'final') { $s .= 'final'; } else { $s .= $latest_file['co_contact_name'] . '<br>(' . $latest_file['co_user'] . ')'; } } } $version_link = ''; $hidden_table = ''; if ($row['file_versions'] > 1) { $version_link = ' <a href="javascript: void(0);" onClick="expand(\'versions_' . $latest_file['file_id'] . '\'); ">(' . $row['file_versions'] . ')</a>'; $hidden_table = '<tr><td colspan="20"> <table style="display: none" id="versions_' . $latest_file['file_id'] . '" class="tbl list"> <tr>'; foreach ($fieldNames as $index => $name) { $hidden_table .= '<th nowrap="nowrap">'; $hidden_table .= $AppUI->_($fieldNames[$index]); $hidden_table .= '</th>'; } $hidden_table .= '</tr>'; $sub_htmlHelper = new w2p_Output_HTMLHelper($AppUI); $sub_htmlHelper->df .= ' ' . $AppUI->getPref('TIMEFORMAT'); foreach ($file_versions as $file) { $sub_htmlHelper->stageRowData($file); if ($file['file_version_id'] == $latest_file['file_version_id']) { foreach ($fieldList as $index => $column) { $hidden_table .= $sub_htmlHelper->createCell($fieldList[$index], $file[$fieldList[$index]], $customLookups); } if ($canEdit && w2PgetConfig('files_show_versions_edit')) { $hidden_table .= '<a href="./index.php?m=files&a=addedit&file_id=' . $file['file_id'] . '">' . w2PshowImage('kedit.png', '16', '16', 'edit file', 'edit file', 'files') . "</a>"; } $hidden_table .= '</td><tr>'; } } $hidden_table .= '</table>'; } $s .= '</td>'; foreach ($fieldList as $index => $column) { $cell = $htmlHelper->createCell($fieldList[$index], $row[$fieldList[$index]], $customLookups); if ('file_version' == $fieldList[$index]) { $cell = str_replace('</td>', $version_link . '</td>', $cell); } $s .= $cell; } $s .= '<td>'; $s .= '<form name="frm_remove_file_' . $latest_file['file_id'] . '" action="?m=files" method="post" accept-charset="utf-8"> <input type="hidden" name="dosql" value="do_file_aed" /> <input type="hidden" name="del" value="1" /> <input type="hidden" name="file_id" value="' . $latest_file['file_id'] . '" /> <input type="hidden" name="redirect" value="' . $current_uri . '" /> </form>'; $s .= '<a href="javascript: void(0);" onclick="if (confirm(\'' . $AppUI->_('Are you sure you want to delete this file?') . '\')) {document.frm_remove_file_' . $latest_file['file_id'] . '.submit()}">' . w2PshowImage('remove.png', '16', '16', 'delete file', 'delete file', 'files') . '</a>'; $s .= '</td>'; $s .= '</tr>'; $s .= $hidden_table; } if (0 == count($files)) { $s .= '<tr><td colspan="' . (count($fieldNames) + 3) . '">' . $AppUI->_('No data available') . '</td></tr>'; } return $s; }
case 'project_departments': $tmpProject->project_id = $row['project_id']; $dept_array = $tmpProject->getDepartmentList(); $s .= '<td class="data _list">'; if (is_array($dept_array)) { foreach ($dept_array as $dept) { $s .= '<a href="?m=departments&a=view&dept_id=' . $dept['dept_id'] . '">'; $s .= $dept['dept_name']; $s .= '</a>'; $s .= '<br />'; } } $s .= '</td>'; break; default: $s .= $htmlHelper->createCell($field, $row[$field], $customLookups); } } $s .= '<td class="center"><input type="checkbox" name="project_ids[]" value="' . $row['project_id'] . '" /></td>'; if ($level) { $s .= '</div>'; } $s .= '</tr>'; if ($project_id > 0 && !isset($projectArray[$project_id]) || !$project_id && !isset($projectArray[$row['project_id']])) { echo $s; } } } $pstatus = w2PgetSysVal('ProjectStatus'); if ($none) { echo '<tr><td colspan="25">' . $AppUI->_('No projects to display for this Company, Owner and Type, or your Search returned no results. Please check the filters above and try again.') . '</td></tr>';
echo $AppUI->_($fieldNames[$index]); ?> </a> </th><?php } ?> </tr> <?php $htmlHelper = new w2p_Output_HTMLHelper($AppUI); foreach ($rows as $row) { $htmlHelper->stageRowData($row); $s = '<tr>'; $s .= '<td align="center" nowrap="nowrap">'; if ($canEdit && $canDelete) { $s .= '<input type="button" class="button" value="' . $AppUI->_('logout_session') . '" onclick="javascript:window.location=\'./index.php?m=users&tab=3&out_session=' . $row['session_id'] . '&out_user_log_id=' . $row['user_access_log_id'] . '&out_user_id=' . $row['u_user_id'] . '&out_name=' . addslashes($row['contact_display_name']) . '\';"></input>'; } $s .= '</td><td align="center" nowrap="nowrap">'; if ($canEdit && $canDelete && $logoutUserFlag) { $s .= '<input type="button" class=button value="' . $AppUI->_('logout_user') . '" onclick="javascript:window.location=\'./index.php?m=users&tab=3&out_user_id=' . $row['u_user_id'] . '&out_name=' . addslashes($row['contact_display_name']) . '\';"></input>'; } $s .= '</td>'; $s .= $htmlHelper->createCell('na', $row['user_username']); $s .= $htmlHelper->createCell('na', $row['contact_display_name']); $s .= $htmlHelper->createCell('contact_company', $row['contact_company']); $s .= $htmlHelper->createCell('log_in_datetime', $row['date_time_in']); $s .= $htmlHelper->createCell('user_ip', $row['user_ip']); $s .= '</tr>'; echo $s; } ?> </table>
$fieldNames = array('Name', 'Description', 'Type', 'Published', 'Order'); $rows = $manager->getStructure($module['mod_name']); $htmlHelper = new w2p_Output_HTMLHelper($AppUI); $s = ''; if (count($rows)) { $s .= '<tr><th width="10"></th>'; foreach ($fieldNames as $index => $name) { $s .= '<th>' . $AppUI->_($fieldNames[$index]) . '</th>'; } $s .= '<th width="10"></th></tr>'; foreach ($rows as $row) { $s .= '<tr><td class="hilite">'; $s .= w2PtoolTip('', $AppUI->_('Click this icon to Edit this Custom Field.'), true); $s .= '<a href="?m=system&u=customfields&a=addedit&module=' . $module['mod_id'] . '&field_id=' . $row['field_id'] . '"><img src="' . w2PfindImage('icons/stock_edit-16.png') . '" /></a>'; $s .= w2PendTip(); $s .= $htmlHelper->createCell('na', $row['field_name']); $s .= $htmlHelper->createCell('field_description', $row['field_description']); $s .= '<td>' . $AppUI->_($manager->getType($row['field_htmltype'])) . '</td>'; $s .= '<td>' . ($row['field_published'] ? $AppUI->_('Yes') : $AppUI->_('No')) . '</td>'; $s .= $htmlHelper->createCell('field_order', $row['field_order']); $s .= '<td>'; $s .= w2PtoolTip('', $AppUI->_('Click this icon to Delete this Custom Field.'), true); $s .= '<a href="javascript:delIt(' . $row['field_id'] . ');"><img src="' . w2PfindImage('icons/stock_delete-16.png') . '" /></a>'; $s .= w2PendTip(); $s .= '</td></tr>'; } echo $s; } } ?> </table>
</tr> <?php $none = true; $project_statuses = w2PgetSysVal('ProjectStatus'); $project_types = w2PgetSysVal('ProjectType'); $customLookups = array('project_status' => $project_statuses, 'project_type' => $project_types); $htmlHelper = new w2p_Output_HTMLHelper($AppUI); foreach ($projects as $row) { $htmlHelper->stageRowData($row); if ($show_all_projects || $row['project_active'] && $row['project_status'] == $project_status_filter || $row['project_active'] && $row['project_status'] == $project_status_filter || !$row['project_active'] && $project_status_filter == -3) { $none = false; $end_date = intval($row['project_end_date']) ? new w2p_Utilities_Date($row['project_end_date']) : null; $actual_end_date = intval($row['project_actual_end_date']) ? new w2p_Utilities_Date($row['project_actual_end_date']) : null; $style = $actual_end_date > $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : ''; $s = '<tr><td width="65" align="center" style="border: outset #eeeeee 2px;background-color:#' . $row['project_color_identifier'] . '"><font color="' . bestColor($row['project_color_identifier']) . '">' . sprintf("%.1f%%", $row['project_percent_complete']) . '</font></td>'; $s .= $htmlHelper->createCell('project_priority', $row['project_priority']); $s .= $htmlHelper->createCell('project_id', $row['project_id']); $s .= $htmlHelper->createCell('na', $row['project_name']); $s .= $htmlHelper->createCell('na', $row['company_name']); $s .= $htmlHelper->createCell('project_start_date', $row['project_start_date']); $s .= $htmlHelper->createCell('project_end_date', $row['project_end_date']); $s .= $htmlHelper->createCell('project_actual_end_date', $row['project_actual_end_date']); $s .= $htmlHelper->createCell('na', $row['owner_name']); $s .= $htmlHelper->createCell('project_task_count', $row['project_task_count']); if ($show_all_projects) { $s .= $htmlHelper->createCell('project_status', $row['project_status'], $customLookups); } $s .= '</tr>'; echo $s; echo '<tr><td height="1" colspan="12" style="border-bottom: 1px solid;padding:0px;" bgcolor="#FFFFFF"><img src="' . w2PfindImage('shim.gif') . '" /></td></tr>'; }
</td> </tr> <tr> <td class="view-column"> <strong><?php echo $AppUI->_('Details'); ?> </strong> <table cellspacing="1" cellpadding="2" border="0" width="100%" class="well"> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Company'); ?> :</td> <?php echo $htmlHelper->createCell('project_company', $project->project_company); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Short Name'); ?> :</td> <?php // TODO Need to rename field to avoid confusing HTMLhelper echo $htmlHelper->createCell('project_shortname', $project->project_short_name); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Start Date');
$str = '<tr>'; if (count($project_ids) > 1) { $str .= '<td>' . $task['project_name'] . '</td>'; } $str .= '<td>'; $indent_count = substr_count($task['task_path_enumeration'], '/') * 3; $str .= $task['task_id'] == $task['task_parent'] ? '' : str_repeat(' ', $indent_count) . '<img src="' . w2PfindImage('corner-dots.gif') . '" />'; $str .= ' <a href="?m=tasks&a=view&task_id=' . $task['task_id'] . '">' . $task['task_name'] . '</a></td>'; $str .= '<td>' . nl2br($task['task_description']) . '</td>'; $users = array(); $assignees = $obj->assignees($task['task_id']); foreach ($assignees as $assignee) { $users[] = $assignee['contact_name']; } $str .= '<td>' . implode($users, ', ') . '</td>'; $str .= $htmlHelper->createCell('task_start_date', $task['task_start_date']); $str .= $htmlHelper->createCell('task_end_date', $task['task_end_date']); $str .= $htmlHelper->createCell('task_percent_complete', $task['task_percent_complete']); $str .= '</tr>'; echo $str; if ($project_id == 0) { $pdfdata[] = array($task['project_name'], $task['task_name'], $task['task_description'], $users, $start_date != ' ' ? $start_date->format($df) : ' ', $end_date != ' ' ? $end_date->format($df) : ' ', $task['task_percent_complete'] . '%'); } else { $start_date = new w2p_Utilities_Date($task['task_start_date']); $end_date = new w2p_Utilities_Date($task['task_end_date']); $spacer = str_repeat(' ', $task['depth']); $pdfdata[] = array($spacer . $task['task_name'], $task['task_description'], implode($users, ', '), $start_date != ' ' ? $start_date->format($df) : ' ', $end_date != ' ' ? $end_date->format($df) : ' ', $task['task_percent_complete'] . '%'); } } } echo '</table>';
echo isset($countries[$user->contact_country]) ? $countries[$user->contact_country] : $user->contact_country; ?> </td> </tr> </table> </td> <td width="50%"> <table width="100%"> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Birthday'); ?> :</td> <?php echo $helper->createCell('_date', $user->contact_birthday); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Email'); ?> :</td> <?php echo $helper->createCell('contact_email', $user->contact_email); ?> </tr> <?php $fields = $methods['fields']; foreach ($fields as $key => $field) { ?>
?> "><?php echo $obj_parent->task_name; ?> </a></td> </tr> <?php } ?> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Owner'); ?> :</td> <?php echo $htmlHelper->createCell('task_owner', $obj->task_owner_name); ?> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Priority'); ?> :</td> <td class="hilite"> <?php $task_priotities = w2PgetSysVal('TaskPriority'); echo $AppUI->_($task_priotities[$obj->task_priority]); ?> </td> </tr> <tr>
form.submit(); } } </script> <table border="0" cellpadding="4" cellspacing="0" width="100%" class="std view"> <tr> <td valign="top"> <table border="0" cellpadding="1" cellspacing="1"> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('First Name'); ?> :</td> <?php echo $htmlHelper->createCell('contact_first_name', $contact->contact_first_name); ?> </tr> <tr> <td align="right" nowrap="nowrap"> <?php echo $AppUI->_('Last Name'); ?> :</td> <?php echo $htmlHelper->createCell('contact_last_name', $contact->contact_last_name); ?> </tr> <tr> <td align="right" width="100"><?php echo $AppUI->_('Display Name'); ?>
?> <th nowrap="nowrap"> <!-- <a href="?m=departments&orderby=<?php echo $fieldList[$index]; ?> " class="hdr">--> <?php echo $AppUI->_($fieldNames[$index]); ?> <!-- </a>--> </th><?php } ?> </tr> <?php if (count($depts)) { $htmlHelper = new w2p_Output_HTMLHelper($AppUI); foreach ($depts as $row) { echo '<tr>'; $htmlHelper->stageRowData($row); //TODO: how do we tweak this to get the parent/child relationship to display? foreach ($fieldList as $index => $column) { echo $htmlHelper->createCell($fieldList[$index], $row[$fieldList[$index]], $customLookups); } echo '</tr>'; } } else { echo '<tr><td colspan="' . count($fieldNames) . '">' . $AppUI->_('No data available') . '</td></tr>'; } ?> </table>
$titleBlock->addCrumb('?m=system&u=roles', 'user roles'); $titleBlock->show(); $fieldNames = array('UserID', 'User', 'Display Name', 'Module', 'Item', 'Item Name', 'Action', 'Allow', 'ACL_ID'); $htmlHelper = new w2p_Output_HTMLHelper($AppUI); ?> <table class="tbl list"> <tr> <?php foreach ($fieldNames as $index => $name) { ?> <th><?php echo $AppUI->_($fieldNames[$index]); ?> </th> <?php } ?> </tr> <?php foreach ($permissions as $row) { $item = ''; if ($row['item_id']) { $field = getPermissionField($row); $item = getPermissionItem($row, $field); } if (!($row['item_id'] && !$row['acl_id'])) { $table .= '<tr>' . $htmlHelper->createCell('user_id', $row['user_id']) . $htmlHelper->createCell('na', $row['user_name']) . '<td>' . $users[$row['user_id']] . '</td>' . $htmlHelper->createCell('module', $row['module']) . '<td style="text-align:right;">' . ($row['item_id'] ? $row['item_id'] : '') . '</td>' . '<td>' . ($item ? $item : 'ALL') . '</td>' . $htmlHelper->createCell('action', $row['action']) . '<td ' . (!$row['access'] ? 'style="text-align:right;background-color:red"' : 'style="text-align:right;background-color:green"') . '>' . $row['access'] . '</td>' . '<td ' . ($row['acl_id'] ? '' : 'style="background-color:gray"') . '>' . ($row['acl_id'] ? $row['acl_id'] : 'soft-denial') . '</td>' . '</tr>'; } } $table .= '</table>'; echo $table;