$titleBlock->addCell('<form name="searchform" action="?m=departments&search_string=' . $search_string . '" method="post" accept-charset="utf-8"> <table> <tr> <td> <strong>' . $AppUI->_('Search') . '</strong> <input class="text" type="text" name="search_string" value="' . $search_string . '" /><br /> <a href="index.php?m=departments&search_string=-1">' . $AppUI->_('Reset search') . '</a> </td> <td valign="top"> <strong>' . $AppUI->_('Owner filter') . '</strong> ' . $owner_combo . ' </td> </tr> </table> </form>'); $titleBlock->show(); if (isset($_GET['tab'])) { $AppUI->setState('DeptIdxTab', w2PgetParam($_GET, 'tab', null)); } $deptsTypeTab = defVal($AppUI->getState('DeptIdxTab'), 0); $deptsType = $deptsTypeTab; // load the department types $deptTypes = w2PgetSysVal('DepartmentType'); $tabBox = new CTabBox('?m=departments', W2P_BASE_DIR . '/modules/departments/', $deptsTypeTab); if ($tabBox->isTabbed()) { array_unshift($deptTypes, $AppUI->_('All Departments', UI_OUTPUT_RAW)); } // tabbed information boxes foreach ($deptTypes as $deptType) { $tabBox->add('vw_depts', $deptType); } $tabBox->show();
// Now onto the display of the user. ?> <table class="std view"> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Role ID'); ?> :</td> <td class="hilite" width="100%"><?php echo $role["value"]; ?> </td> </tr> <tr> <td align="right" nowrap="nowrap"><?php echo $AppUI->_('Description'); ?> :</td> <td class="hilite" width="100%"><?php echo $AppUI->_($role["name"]); ?> </td> </tr> </table> <?php echo $AppUI->getTheme()->styleRenderBoxBottom(); $tabBox = new CTabBox('?m=system&u=roles&a=viewrole&role_id=' . $role_id, W2P_BASE_DIR . '/modules/system/roles/', $tab); $tabBox->add('vw_role_perms', 'Permissions'); $tabBox->show(); } // End of check for valid role
$titleBlock = new CTitleBlock('Files', 'folder5.png', $m, $m . '.' . $a); $titleBlock->addCell($AppUI->_('Filter') . ':'); $titleBlock->addCell(arraySelect($projects, 'project_id', 'onchange="javascript:document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=files" method="post">', '</form>'); /* * override the file module's $canEdit variable passed from the main index.php * in order to check on file folder permissions */ $canAuthor_folders = getPermission('file_folders', 'add'); if ($canAuthor) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '" />', '', '<form action="?m=files&a=addedit&folder=' . $folder . '" method="post">', '</form>'); } if ($canAuthor_folders) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new folder') . '" />', '', '<form action="?m=files&a=addedit_folder" method="post">', '</form>'); } $titleBlock->show(); $file_types = dPgetSysVal('FileType'); $fts = $file_types; if ($tab != -1) { array_unshift($file_types, 'All Files'); } $tabBox = new CTabBox('?m=files', DP_BASE_DIR . '/modules/files/', $tab); $tabbed = $tabBox->isTabbed(); $i = 0; foreach ($file_types as $file_type) { $tabBox->add('index_table', $file_type); ++$i; } if ($canAccess_folders) { $tabBox->add('folders_table', 'Folder Explorer'); } $tabBox->show();
<td> <?php } ?> </table> </td> </table> <?php $tabBox = new CTabBox("?m=projects&a=view&project_id={$project_id}", "", $tab); $query_string = "?m=projects&a=view&project_id={$project_id}"; // tabbed information boxes // Note that we now control these based upon module requirements. $canViewTask = $perms->checkModule('tasks', 'view'); if ($canViewTask) { $tabBox->add(dPgetConfig('root_dir') . "/modules/tasks/tasks", 'Tasks'); $tabBox->add(dPgetConfig('root_dir') . "/modules/tasks/tasks", 'Tasks (Inactive)'); } if ($perms->checkModule('forums', 'view')) { $tabBox->add(dPgetConfig('root_dir') . "/modules/projects/vw_forums", 'Forums'); } //if ($perms->checkModule('files', 'view')) // $tabBox->add( dPgetConfig('root_dir')."/modules/projects/vw_files", 'Files' ); if ($canViewTask) { $tabBox->add(dPgetConfig('root_dir') . "/modules/tasks/viewgantt", 'Gantt Chart'); $tabBox->add(dPgetConfig('root_dir') . "/modules/projects/vw_logs", 'Task Logs'); } $tabBox->loadExtras($m); $f = 'all'; $min_view = true; $tabBox->show();
/* * Unassigned = 0 * Open = 1 * Closed = 2 * On hold = 3 * Delete = 4 * Testing = 5 */ $sql = "SELECT COUNT(DISTINCT(item_id))\n FROM \n \thelpdesk_items\n WHERE \n \titem_assigned_to=" . $AppUI->user_id . "\n \tAND (item_status != 2)"; $nummine = db_loadResult($sql); $sql = "SELECT COUNT(DISTINCT(item_id))\n FROM \n \thelpdesk_items\n \tLEFT JOIN helpdesk_item_status on helpdesk_items.item_id = helpdesk_item_status.status_item_id\n WHERE \n \tstatus_code = 0\n AND item_status <> 2\n AND (TO_DAYS(NOW()) - TO_DAYS(status_date) = 0)\n \tAND {$item_perms}"; $numopened = db_loadResult($sql); $sql = "SELECT COUNT(DISTINCT(item_id))\n FROM \n \thelpdesk_items\n \tLEFT JOIN helpdesk_item_status on helpdesk_items.item_id = helpdesk_item_status.status_item_id\n WHERE \n \titem_status=2\n \tAND status_code=11\n \tAND (TO_DAYS(NOW()) - TO_DAYS(status_date) = 0)\n AND {$item_perms}"; $numclosed = db_loadResult($sql); ?> <table cellspacing="0" cellpadding="2" border="0" width="100%"> <tr> <td width="80%" valign="top"> <?php // Tabbed information boxes $tabBox = new CTabBox("?m=helpdesk", "{$dPconfig['root_dir']}/modules/helpdesk/", $tab); $tabBox->add('vw_idx_stats', $AppUI->_('Help Desk Items') . " ({$numtotal})"); $tabBox->add('vw_idx_my', $AppUI->_('My Open') . " ({$nummine})"); $tabBox->add('vw_idx_new', $AppUI->_('Opened Today') . " ({$numopened})"); $tabBox->add('vw_idx_closed', $AppUI->_('Closed Today') . " ({$numclosed})"); $tabBox->add('vw_idx_watched', "Watched Tickets"); $tabBox->show(); ?> </td> </tr> </table>
<?php /* $Id$ $URL$ */ if (!defined('W2P_BASE_DIR')) { die('You should not access this file directly.'); } $AppUI->savePlace(); $obj = new CResource(); $perms =& $AppUI->acl(); $canEdit = canEdit('resources'); $titleBlock = new w2p_Theme_TitleBlock('Resources', 'resources.png', $m, $m . '.' . $a); if ($canEdit) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new resource') . '">', '', '<form action="?m=resources&a=addedit" method="post" accept-charset="utf-8">', '</form>'); } $titleBlock->show(); if (isset($_GET['tab'])) { $AppUI->setState('ResourcesIdxTab', w2PgetParam($_GET, 'tab', null)); } $resourceTab = $AppUI->getState('ResourcesIdxTab', 0); $tabBox = new CTabBox('?m=resources', W2P_BASE_DIR . '/modules/resources/', $resourceTab); $tabbed = $tabBox->isTabbed(); foreach ($obj->loadTypes() as $type) { if ($type['resource_type_id'] == 0 && !$tabbed) { continue; } $tabBox->add('vw_resources', $type['resource_type_name']); } $tabBox->show();
<td> <a href="<?php echo '?m=calendar&a=day_view&date=' . $next_day->format(FMT_TIMESTAMP_DATE); ?> "><img src="<?php echo w2PfindImage('next.gif'); ?> " width="16" height="16" alt="next" border="0"></a> </td> </tr> </table> <?php // tabbed information boxes $tabBox = new CTabBox('?m=calendar&a=day_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), W2P_BASE_DIR . '/modules/calendar/', $tab); $tabBox->add('vw_day_events', 'Events'); $tabBox->add('vw_day_tasks', 'Tasks'); $tabBox->show(); ?> </td> <?php if ($w2Pconfig['cal_day_view_show_minical']) { ?> <td valign="top" width="175"> <?php $minical = new CMonthCalendar($this_day); $minical->setStyles('minititle', 'minical'); $minical->showArrows = false; $minical->showWeek = false; $minical->clickMonth = true; $minical->setLinkFunctions('clickDay');
<td bgcolor="#ffffff"><?php echo @$dept['dept_address1'] . ($dept['dept_address2'] ? '<br />' . $dept['dept_address2'] : '') . '<br />' . $dept['dept_city'] . ' ' . $dept['dept_state'] . ' ' . $dept['dept_zip']; ?> </td> </tr> </table> </td> <td width="50%"> <strong><?php echo $AppUI->_('Description'); ?> </strong> <table cellspacing="1" cellpadding="2" border="0" width="100%"> <tr> <td bgcolor="#ffffff" width="100%"><?php echo str_replace(chr(10), "<br />", $dept['dept_desc']); ?> </td> </tr> </table> </td> </tr> </table> <?php // tabbed information boxes $tabBox = new CTabBox('?m=departments&a=' . $a . '&dept_id=' . $dept_id, '', $tab); $tabBox->add(DP_BASE_DIR . '/modules/departments/vw_contacts', 'Contacts'); // include auto-tabs with 'view' explicitly instead of $a, because this view is also included in the main index site $tabBox->loadExtras($m, 'view'); $tabBox->show(); }
<?php if (!defined('W2P_BASE_DIR')) { die('You should not access this file directly.'); } $tab = $AppUI->processIntState('ResourceTypeTab', $_GET, 'tab', 0); $obj = new CResource(); $perms =& $AppUI->acl(); $canEdit = canEdit('resources'); $titleBlock = new w2p_Theme_TitleBlock('Resources', 'icon.png', $m); if ($canEdit) { $titleBlock->addButton('new resource', '?m=resources&a=addedit'); } $titleBlock->show(); $resource_types = w2PgetSysVal('ResourceTypes'); $tabBox = new CTabBox('?m=resources', W2P_BASE_DIR . '/modules/resources/', $tab); if ($tabBox->isTabbed()) { array_unshift($resource_types, $AppUI->_('All Resources', UI_OUTPUT_RAW)); } foreach ($resource_types as $resource_type) { $tabBox->add('vw_resources', $resource_type); } $tabBox->show();
</td> </tr> </table> </td> </tr> </table> <?php $query_string = '?m=tasks&a=view&task_id=' . $task_id; $tabBox = new CTabBox('?m=tasks&a=view&task_id=' . $task_id, '', $tab); $tabBox_show = 0; if ($obj->task_dynamic != 1 && 0 == $obj->task_represents_project) { // tabbed information boxes $tabBox_show = 1; if (canView('task_log')) { $tabBox->add(W2P_BASE_DIR . '/modules/tasks/vw_logs', 'Task Logs'); } if ($task_log_id == 0) { if (canAdd('task_log')) { $tabBox->add(W2P_BASE_DIR . '/modules/tasks/vw_log_update', 'Log'); } } elseif (canEdit('task_log')) { $tabBox->add(W2P_BASE_DIR . '/modules/tasks/vw_log_update', 'Edit Log'); } elseif (canAdd('task_log')) { $tabBox_show = 1; $tabBox->add(W2P_BASE_DIR . '/modules/tasks/vw_log_update', 'Log'); } } if (count($obj->getChildren()) > 0) { // Has children // settings for tasks
* Now, we will figure out which vw_idx file are available * for each project type using the $fixed_project_type_file array */ $project_type_file = array(); foreach ($project_types as $project_type) { $project_type = trim($project_type); if (isset($fixed_project_type_file[$project_type])) { $project_file_type[$project_type] = $fixed_project_type_file[$project_type]; } else { // if there is no fixed vw_idx file, we will use vw_idx_proposed $project_file_type[$project_type] = "vw_idx_proposed"; } } // tabbed information boxes foreach ($project_types as $project_type) { $tabBox->add($project_file_type[$project_type], $project_type, true); } $min_view = true; $tabBox->add("viewgantt", "Gantt"); $tabBox->show(); //writes out a single <option> element for display of departments function showchilddept(&$a, $level = 1) { global $buffer, $department; $s = '<option value="' . $a["dept_id"] . '"' . (isset($department) && $department == $a["dept_id"] ? 'selected="selected"' : '') . '>'; for ($y = 0; $y < $level; $y++) { if ($y + 1 == $level) { $s .= ''; } else { $s .= ' '; }
</td> </tr> </table> </td> </tr> </table> <?php $query_string = "?m=tasks&a=view&task_id={$task_id}"; $tabBox = new CTabBox("?m=tasks&a=view&task_id={$task_id}", "", $tab); $tabBox_show = 0; if ($obj->task_dynamic != 1) { // tabbed information boxes if ($perms->checkModuleItem('task_log', 'view', $task_id)) { $tabBox_show = 1; $tabBox->add("{$dPconfig['root_dir']}/modules/tasks/vw_logs", 'Task Logs'); // fixed bug that dP automatically jumped to access denied if user does not // have read-write permissions on task_id and this tab is opened by default (session_vars) // only if user has r-w perms on this task, new or edit log is beign showed /*if ($perms->checkModuleItem('task_log', 'add', $task_id)) $tabBox->add( "{$dPconfig['root_dir']}/modules/tasks/vw_log_update", 'New Log' );*/ if ($perms->checkModuleItem('task_log', 'edit', $task_id)) { if ($task_log_id == 0) { if ($perms->checkModuleItem('task_log', 'add', $task_id)) { $tabBox->add("{$dPconfig['root_dir']}/modules/tasks/vw_log_update", 'New Log'); } } else { if ($perms->checkModuleItem('task_log', 'edit', $task_id)) { $tabBox->add("{$dPconfig['root_dir']}/modules/tasks/vw_log_update", 'Edit Log'); } }
$AppUI->setState('CompIdxOrderDir', $orderdir); } $orderby = $AppUI->getState('CompIdxOrderBy') ? $AppUI->getState('CompIdxOrderBy') : 'company_name'; $orderdir = $AppUI->getState('CompIdxOrderDir') ? $AppUI->getState('CompIdxOrderDir') : 'asc'; $owner_filter_id = $AppUI->processIntState('owner_filter_id', $_POST, 'owner_filter_id', 0); $search_string = w2PgetParam($_POST, 'search_string', ''); $search_string = w2PformSafe($search_string, true); $company = new CCompany(); $canCreate = $company->canCreate(); $perms =& $AppUI->acl(); $baseArray = array(0 => $AppUI->_('All', UI_OUTPUT_RAW)); $allowedArray = $perms->getPermittedUsers('companies'); $owner_list = is_array($allowedArray) ? $baseArray + $allowedArray : $baseArray; // setup the title block $titleBlock = new w2p_Theme_TitleBlock('Companies', 'icon.png', $m); $titleBlock->addSearchCell($search_string); $titleBlock->addFilterCell('Owner', 'owner_filter_id', $owner_list, $owner_filter_id); if ($canCreate) { $titleBlock->addButton('new company', '?m=companies&a=addedit'); } $titleBlock->show(); // load the company types $companyTypes = w2PgetSysVal('CompanyType'); $tabBox = new CTabBox('?m=companies', W2P_BASE_DIR . '/modules/companies/', $tab); if ($tabBox->isTabbed()) { array_unshift($companyTypes, $AppUI->_('All Companies', UI_OUTPUT_RAW)); } foreach ($companyTypes as $type_name) { $tabBox->add('vw_companies', $type_name); } $tabBox->show();
} } $priorities = array('1' => 'high', '0' => 'normal', '-1' => 'low'); $durnTypes = w2PgetSysVal('TaskDurationType'); if ('todo' == $a) { $titleBlock = new w2p_Theme_TitleBlock('My Tasks To Do', 'applet-48.png', $m, $m . '.' . $a); $titleBlock->addCrumb('?m=tasks', 'tasks list'); $titleBlock->show(); } // If we are called from anywhere but directly, we would end up with // double rows of tabs that would not work correctly, and since we // are called from the day view of calendar, we need to prevent this if ($m == 'tasks' && $a == 'todo') { ?> <table cellspacing="0" cellpadding="2" border="0" width="100%" class="std"> <tr> <td width="80%" valign="top"> <?php // Tabbed information boxes $tabBox = new CTabBox('?m=tasks&a=todo', '', $tab); $tabBox->add(W2P_BASE_DIR . '/modules/tasks/todo_tasks_sub', 'My Tasks'); $tabBox->add(W2P_BASE_DIR . '/modules/tasks/todo_gantt_sub', 'My Gantt'); $tabBox->show(); ?> </td> </tr> </table> <?php } else { include W2P_BASE_DIR . '/modules/tasks/todo_tasks_sub.php'; }
$target = htmlspecialchars($dept['dept_batching_type']); foreach ($new as $n) { $as = explode('|', $n); if ($as[0] === $target) { $found = $as[1]; } } ?> <td align="right"><?php echo $AppUI->_('Batch Type'); ?> :</td> <td bgcolor="#ffffff" width="80%"><?php echo $found; ?> </td> </tr> </table> </td> </tr> </table> <?php // tabbed information boxes $moddir = DP_BASE_DIR . '/modules/departments/'; $tabBox = new CTabBox('?m=' . $m . '&a=' . $a . '&dept_id=' . $dept_id, '', $tab); $tabBox->add($moddir . 'vw_contacts', 'Contacts'); // include auto-tabs with 'view' explicitly instead of $a, because this view is also included in the main index site $tabBox->loadExtras($m, 'view'); $tabBox->show(); } }
if (count($allowedProjects)) { $q->addWhere('( ( ' . implode(' AND ', $allowedProjects) . ') OR file_project = 0 )'); } if (count($allowedTasks)) { $q->addWhere('( ( ' . implode(' AND ', $allowedTasks) . ') OR file_task = 0 )'); } if ($catsql) { $q->addWhere($catsql); } if ($company_id) { $q->addWhere("project_company = {$company_id}"); } if ($project_id) { $q->addWhere("file_project = {$project_id}"); } if ($task_id) { $q->addWhere("file_task = {$task_id}"); } $key = array_search($file_type, $fts); if ($i > 0 || !$tabbed) { $q->addWhere('file_category = ' . $key); } if ($project_id > 0) { $q->addWhere('file_project = ' . $project_id); } $tabBox->add('index_table', $file_type . ' (' . $q->loadResult() . ')'); ++$i; } $tabBox->add('folders_table', 'Folder Explorer'); $tabBox->show(); //}
$titleBlock->show(); } // If we are called from anywhere but directly, we would end up with // double rows of tabs that would not work correctly, and since we // are called from the day view of calendar, we need to prevent this if ($m == 'tasks' && $a == 'todo') { ?> <table cellspacing="0" cellpadding="2" border="0" width="100%"> <tr> <td width="80%" valign="top"> <?php // Tabbed information boxes $tabBox = new CTabBox('?m=tasks&a=todo', DP_BASE_DIR . '/modules/', $tab); $tabBox->add('tasks/todo_tasks_sub', 'My Tasks'); $tabBox->add('tasks/todo_gantt_sub', 'My Gantt'); // Wouldn't it be better to user $tabBox->loadExtras('tasks', 'todo'); and then // add tasks_tab.todo.my_open_requests.php in helpdesk? if ($AppUI->isActiveModule('helpdesk')) { $tabBox->add('helpdesk/vw_idx_my', 'My Open Requests'); } $tabBox->show(); ?> </td> </tr> </table> <?php } else { include DP_BASE_DIR . '/modules/tasks/todo_tasks_sub.php'; }
:</strong></td> </tr> <tr> <td class="hilite" width="100%" colspan="2"> <?php echo str_replace(chr(10), '<br />', $user['user_signature']); ?> </td> </tr> </table> </td> </tr> </table> <?php // force tabbed information boxes $min_view = true; $oldViewPref = $AppUI->getPref('TABVIEW'); $AppUI->setPref('TABVIEW', 1); $tabBox = new CTabBox('?m=admin&a=viewuser&user_id=' . $user_id, '', $tab); $tabBox->loadExtras('admin', 'viewuser'); $tabBox->add(DP_BASE_DIR . '/modules/admin/vw_usr_log', 'User Log'); $tabBox->add(DP_BASE_DIR . '/modules/admin/vw_usr_perms', 'Permissions'); $tabBox->add(DP_BASE_DIR . '/modules/admin/vw_usr_roles', 'Roles'); if ($canEdit) { $tabBox->add(DP_BASE_DIR . '/modules/admin/vw_usr_transfer', 'Transfer'); } $tabBox->show(); $AppUI->setPref('TABVIEW', $oldViewPref); }
</tr> </table> <script language="javascript"> <?php // security improvement: // some javascript functions may not appear on client side in case of user not having write permissions // else users would be able to arbitrarily run 'bad' functions if ($canDelete) { ?> function delIt() { if (confirm( "<?php echo $AppUI->_('doDelete', UI_OUTPUT_JS); ?> " )) { document.frmDelete.submit(); } } <?php } ?> </script> <?php // tabbed information boxes $moddir = $dPconfig['root_dir'] . '/modules/companies/'; $tabBox = new CTabBox("?m=companies&a=view&company_id={$company_id}", "", $tab); //ina $tabBox->add($moddir . 'vw_depts', 'Departments'); // $tabBox->add($moddir . 'vw_contacts', 'Contacts'); // $tabBox->show();
$all_projects = 0; foreach ($statuses as $k => $v) { $project_status_tabs[$v['project_status']] = $AppUI->_($project_types[$v['project_status']]) . ' (' . $v['count'] . ')'; //count all projects $all_projects += $v['count']; } //set file used per project status title $fixed_status = array('In Progress' => 'vw_idx_active', 'Complete' => 'vw_idx_complete', 'Archived' => 'vw_idx_archived'); /** * Now, we will figure out which vw_idx file are available * for each project status using the $fixed_status array */ $project_status_file = array(); foreach ($project_types as $status_id => $status_title) { //if there is no fixed vw_idx file, we will use vw_idx_proposed $project_status_file[$status_id] = isset($fixed_status[$status_title]) ? $fixed_status[$status_title] : 'vw_idx_proposed'; } if (!array_key_exists($tab, $project_types) && $tab >= 0 && $tab < 500) { $tab = $std_tab; } // tabbed information boxes $tabBox = new CTabBox('?m=projects', DP_BASE_DIR . '/modules/projects/', $tab); foreach ($project_types as $psk => $project_status) { if (isset($project_types[$psk])) { $tabBox->add($project_status_file[$psk], $project_status_tabs[$psk] ? $project_status_tabs[$psk] : $AppUI->_($project_status), true, $psk); } } $tabBox->add('vw_idx_proposed', $AppUI->_('All') . ' (' . $all_projects . ')', true, 500); $min_view = true; $tabBox->add('viewgantt', 'Gantt'); $tabBox->show();
// else users would be able to arbitrarily run 'bad' functions if ($canDelete) { ?> function delMe( x, y ) { if (confirm( "<?php echo $AppUI->_('doDelete', UI_OUTPUT_JS) . ' ' . $AppUI->_('User', UI_OUTPUT_JS); ?> " + y + "?" )) { document.frmDelete.user_id.value = x; document.frmDelete.submit(); } } <?php } ?> </script> <?php $tabBox = new CTabBox('?m=users', W2P_BASE_DIR . '/modules/users/', $tab); $tabBox->add('vw_active_usr', 'Active Users'); $tabBox->add('vw_inactive_usr', 'Inactive Users'); $tabBox->add('vw_usr_log', 'User Log'); $tabBox->add('vw_usr_sessions', 'Active Sessions'); $tabBox->show(); ?> <form name="frmDelete" action="./index.php?m=users" method="post" accept-charset="utf-8"> <input type="hidden" name="dosql" value="do_user_aed" /> <input type="hidden" name="del" value="1" /> <input type="hidden" name="user_id" value="0" /> </form>
} } } $handler = $tab == 0 && $psfilter != P_ALL ? 'class="filter" onclick="changeFilter(' . P_ALL . ')"' : 'class="status"'; $info = '<div id="idOtherTypes" style="position: absolute; display: none; visibility: hidden">' . ($tab == 0 ? '<table id="idOtherList" class="list" width="90px">' . '<tr><td class="last"><b>Other status</b></td></tr>' . $other_list . '</table>' : '') . '</div>' . '<table class="tabstatus" border="0" cellpadding="0" cellspacing="2" width="100%">' . '<tr>' . '<td ' . $handler . '>Total:</td>' . '<td class="value">' . count($projects) . '</td>' . $statistic . '<td align="right" width="100%"> </td>' . '<td class="filter" onclick="showOthers(this)" nowrap="nowrap">' . $indicator . 'Others:</td><td>' . $others . '</td>' . '<td> </td>' . '</tr>' . '</table>'; function pfilter($p) { global $perms, $psfilter; if (!$perms->checkModuleItem('projects', 'view', $p['project_id'])) { return false; } return $psfilter == P_ALL || $p["project_status"] == $psfilter; } $tabBox = new CTabBox('?m=projects', $tab); //$tabBox->add($viewers[$psfilter], $pstatus[$psfilter] . ' Projects'); $tabBox->add('vw_idx_active', $pstatus[$psfilter] . ' Projects'); $min_view = true; $tabBox->add('viewgantt', 'Gantt'); $tabBox->setInfo($info); $tabBox->show(); ?> <script> function changeFilter(v) { go('index.php?m=projects&tab=0&psfilter=' + v); } function setMode(f) { go('index.php?m=projects&psfilter=<?php echo $psfilter; ?>
if (dPgetParam($_GET, 'tab', -1) != -1) { $AppUI->setState('FileIdxTab', dPgetParam($_GET, 'tab')); } $tab = $AppUI->getState('FileIdxTab', 0); $active = intval(!$AppUI->getState('FileIdxTab')); require_once $AppUI->getModuleClass('projects'); // get the list of visible companies $extra = array('from' => 'files', 'where' => 'project_id = file_project'); $project = new CProject(); $projects = $project->getAllowedRecords($AppUI->user_id, 'project_id,project_name', 'project_name', null, $extra); $allowedProjects = array_keys($projects); $projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_RAW)), $projects); // setup the title block $titleBlock = new CTitleBlock('Files', 'folder5.png', $m, "{$m}.{$a}"); $titleBlock->addCell($AppUI->_('Filter') . ':'); $titleBlock->addCell(arraySelect($projects, 'project_id', 'onChange="document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=files" method="post">', '</form>'); if ($canEdit) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit" method="post">', '</form>'); } $titleBlock->show(); $file_types = dPgetSysVal("FileType"); if ($tab != -1) { array_unshift($file_types, "All Files"); } $tabBox = new CTabBox("?m=files", "{$dPconfig['root_dir']}/modules/files/", $tab); $i = 0; foreach ($file_types as $file_type) { $tabBox->add("index_table", $file_type); ++$i; } $tabBox->show();
} $tab = $AppUI->getState('LinkIdxTab') !== NULL ? $AppUI->getState('LinkIdxTab') : 0; $active = intval(!$AppUI->getState('LinkIdxTab')); require_once $AppUI->getModuleClass('projects'); // get the list of visible companies $extra = array('from' => 'links', 'where' => 'project_id = link_project'); $project = new CProject(); $projects = $project->getAllowedRecords($AppUI->user_id, 'project_id,project_name', 'project_name', null, $extra); $projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_JS)), $projects); // setup the title block $titleBlock = new CTitleBlock('Links', 'folder5.png', $m, "{$m}.{$a}"); $titleBlock->addCell($AppUI->_('Search') . ':'); $titleBlock->addCell('<input type="text" class="text" SIZE="10" name="search" onChange="document.searchfilter.submit();" value=' . "'{$search}'" . 'title="' . $AppUI->_('Search in name and description fields', UI_OUTPUT_JS) . '"/>', '', '<form action="?m=links" method="post" id="searchfilter">', '</form>'); $titleBlock->addCell($AppUI->_('Filter') . ':'); $titleBlock->addCell(arraySelect($projects, 'project_id', 'onChange="document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=links" method="post">', '</form>'); if ($canEdit) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new link') . '">', '', '<form action="?m=links&a=addedit" method="post">', '</form>'); } $titleBlock->show(); $link_types = dPgetSysVal("LinkType"); if ($tab != -1) { array_unshift($link_types, "All Links"); } array_map(array($AppUI, '_'), $link_types); $tabBox = new CTabBox("?m=links", DP_BASE_DIR . '/modules/links/', $tab); $i = 0; foreach ($link_types as $link_type) { $tabBox->add("index_table", $link_type); ++$i; } $tabBox->show();
<?php } ?> </table> </td> </table> <?php $tabBox = new CTabBox("?m=projects&a=view&project_id={$project_id}", "", $tab); $query_string = "?m=projects&a=view&project_id={$project_id}"; // tabbed information boxes // Note that we now control these based upon module requirements. $canViewTask = $perms->checkModule('tasks', 'view'); $canViewTaskLog = $perms->checkModule('task_log', 'view'); if ($canViewTask) { $tabBox->add(DP_BASE_DIR . '/modules/tasks/tasks', 'Tasks'); $tabBox->add(DP_BASE_DIR . '/modules/tasks/tasks', 'Tasks (Inactive)'); } if ($perms->checkModule('forums', 'view')) { $tabBox->add(DP_BASE_DIR . '/modules/projects/vw_forums', 'Forums'); } //if ($perms->checkModule('files', 'view')) // $tabBox->add( DP_BASE_DIR.'/modules/projects/vw_files', 'Files' ); if ($canViewTask) { $tabBox->add(DP_BASE_DIR . '/modules/tasks/viewgantt', 'Gantt Chart'); if ($canViewTaskLog) { $tabBox->add(DP_BASE_DIR . '/modules/projects/vw_logs', 'Task Logs'); } } $tabBox->loadExtras($m); $f = 'all';
echo $AppUI->_('taskCancel', UI_OUTPUT_JS); ?> ')){location.href = '?<?php echo $AppUI->getPlace(); ?> ';}" /> </td> <td> <input class="button" type="button" name="btnFuseAction" value="<?php echo $AppUI->_('save'); ?> " onclick="submitIt(document.editFrm);" /> </td> </tr> </table> </td> </tr> </table> </td> </tr> </form> </table> <?php $tab = $AppUI->processIntState('TaskAeTabIdx', $_GET, 'tab', 0); $tabBox = new CTabBox('?m=tasks&a=addedit&task_id=' . $task_id, '', $tab, ''); $tabBox->add(W2P_BASE_DIR . '/modules/tasks/ae_desc', 'Details'); $tabBox->add(W2P_BASE_DIR . '/modules/tasks/ae_dates', 'Dates'); $tabBox->add(W2P_BASE_DIR . '/modules/tasks/ae_depend', 'Dependencies'); $tabBox->add(W2P_BASE_DIR . '/modules/tasks/ae_resource', 'Human Resources'); $tabBox->show('', true);
} $tab = $AppUI->getState('LinkIdxTab') !== NULL ? $AppUI->getState('LinkIdxTab') : 0; $active = intval(!$AppUI->getState('LinkIdxTab')); require_once $AppUI->getModuleClass('projects'); // get the list of visible companies $extra = array('from' => 'links', 'where' => 'project_id = link_project'); $project = new CProject(); $projects = $project->getAllowedRecords($AppUI->user_id, 'project_id,project_name', 'project_name', null, $extra); $projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_JS)), $projects); // setup the title block $titleBlock = new CTitleBlock('Links', 'folder5.png', $m, "{$m}.{$a}"); $titleBlock->addCell($AppUI->_('Search') . ':'); $titleBlock->addCell('<input type="text" class="text" size="10" name="search" onchange="javascript:document.searchfilter.submit();" value=' . "'{$search}'" . 'title="' . $AppUI->_('Search in name and description fields', UI_OUTPUT_JS) . '"/>', '', '<form action="?m=links" method="post" id="searchfilter">', '</form>'); $titleBlock->addCell($AppUI->_('Filter') . ':'); $titleBlock->addCell(arraySelect($projects, 'project_id', 'onchange="javascript:document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=links" method="post">', '</form>'); if ($canEdit) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new link') . '" />', '', '<form action="?m=links&a=addedit" method="post">', '</form>'); } $titleBlock->show(); $link_types = dPgetSysVal('LinkType'); if ($tab != -1) { array_unshift($link_types, 'All Links'); } array_map(array($AppUI, '_'), $link_types); $tabBox = new CTabBox('?m=links', DP_BASE_DIR . '/modules/links/', $tab); $i = 0; foreach ($link_types as $link_type) { $tabBox->add('index_table', $link_type); ++$i; } $tabBox->show();
// setup the title block $titleBlock = new w2p_Theme_TitleBlock('Projects', 'icon.png', $m); //$titleBlock->addSearchCell($search_string); $titleBlock->addFilterCell('Type', 'project_type', $project_types, $project_type); $titleBlock->addFilterCell('Company', 'project_company', $allowedCompanies, $company_id); $titleBlock->addFilterCell('Owner', 'project_owner', $user_list, $owner); if ($canCreate) { $titleBlock->addButton('new project', '?m=projects&a=addedit'); } $titleBlock->addCell('<span title="' . $AppUI->_('Projects') . '::' . $AppUI->_('Print projects list') . '.">' . '<a href="javascript: void(0);" onclick ="window.open(\'index.php?m=projects&a=printprojects&dialog=1&suppressHeaders=1&company_id=' . $company_id . '&project_type=' . $project_type . '&project_owner=' . $owner . '\', \'printprojects\',\'width=1200, height=600, menubar=1, scrollbars=1\')"> <img src="' . w2PfindImage('printer.png') . '" /> </a></span>'); $titleBlock->show(); $project_statuses = array(); $project_statuses = w2PgetSysVal('ProjectStatus'); $project_statuses[-2] = 'All Projects'; $project_statuses[-1] = 'All Active'; $project_statuses[] = 'Archived'; ksort($project_statuses); $counts = $project->getProjectsByStatus($company_id); $counts[-2] = count($project->loadAll(null, $company_id > 0 ? 'project_company = ' . $company_id : '')); $counts[-1] = count($project->loadAll(null, 'project_active = 1' . ($company_id > 0 ? ' AND project_company = ' . $company_id : ''))); $counts[count($project_statuses) - 3] = $counts[-2] - $counts[-1]; $tabBox = new CTabBox('?m=projects', W2P_BASE_DIR . '/modules/projects/', $tab); foreach ($project_statuses as $key => $project_status) { $tabname = $project_status . '(' . (int) $counts[$key] . ')'; $tabBox->add('vw_idx_projects', mb_trim($tabname), true); } $min_view = true; $tabBox->add('viewgantt', 'Gantt'); $tabBox->show();
<td width="50%" valign="top" height="100%"> <table cellspacing="0" cellpadding="2" border="0" width="100%" class="list" height="100%"> <tr class="info"><td colspan="2"><?php echo $AppUI->_('Description'); ?> </td></tr> <tr class="second"> <td style="height: 100%"><?php echo str_replace(chr(10), '<br/>', $obj->company_description); ?> </td> </tr> </table> <?php require_once "./classes/CustomFields.class.php"; $custom_fields = new CustomFields($m, $a, $obj->company_id, "view"); $custom_fields->printHTML(); ?> </td> </tr> </table> <?php // tabbed information boxes $tabBox = new CTabBox("?m=companies&a=view&company_id={$company_id}", $tab); $tabBox->add('vw_active', 'Active Projects'); $tabBox->add('vw_archived', 'Archived Projects'); $tabBox->add('vw_depts', 'Departments'); $tabBox->add('vw_users', 'Users'); $tabBox->add('vw_contacts', 'Contacts'); $tabBox->loadExtras($m); $tabBox->show();
// override the $canEdit variable passed from the main index.php in order to check folder permissions /** get permitted folders **/ $cfObj = new CFile_Folder(); $allowed_folders_ary = $cfObj->getAllowedRecords($AppUI->user_id); $denied_folders_ary = $cfObj->getDeniedRecords($AppUI->user_id); $limited = count($allowed_folders_ary) < $cfObj->countFolders() ? true : false; if (!$limited) { $canEdit = true; } elseif ($limited and array_key_exists($folder, $allowed_folders_ary)) { $canEdit = true; } else { $canEdit = false; } if ($canEdit) { $titleBlock->addButton('new folder', '?m=files&a=addedit_folder'); $titleBlock->addButton('new file', '?m=files&a=addedit&folder=' . $folder); } $titleBlock->show(); $file_types = w2PgetSysVal('FileType'); if ($tab != -1) { array_unshift($file_types, 'All Files'); } $tabBox = new CTabBox('?m=files', W2P_BASE_DIR . '/modules/files/', $tab); $i = -1; foreach ($file_types as $file_type) { $fileList = CFile::getFileList($AppUI, $company_id, $project_id, $task_id, $i); $tabBox->add('index_table', $file_type . ' (' . count($fileList) . ')'); ++$i; } $tabBox->add('folders_table', 'Folder Explorer'); $tabBox->show();