本文整理汇总了PHP中CTabBox类的典型用法代码示例。如果您正苦于以下问题:PHP CTabBox类的具体用法?PHP CTabBox怎么用?PHP CTabBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CTabBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CustomFields
}
}
require_once $AppUI->getSystemClass('CustomFields');
$custom_fields = new CustomFields($m, $a, $obj->task_id, "view");
$custom_fields->printHTML();
?>
</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');
示例2: CTabBox
// 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
示例3: CTitleBlock
$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();
示例4: CTabBox
}
echo "</table>";
?>
</td>
</tr>
<tr>
<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');
示例5: COUNT
/*
* 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>
示例6: w2p_textarea
?>
</strong>
<table cellspacing="0" cellpadding="2" border="0" width="100%">
<tr>
<td class="hilite">
<?php
echo w2p_textarea($company->company_description);
?>
</td>
</tr>
</table>
<?php
$custom_fields = new w2p_Core_CustomFields($m, $a, $company->company_id, 'view');
$custom_fields->printHTML();
?>
</td>
</tr>
</table>
<?php
// tabbed information boxes
$moddir = W2P_BASE_DIR . '/modules/companies/';
$tabBox = new CTabBox('?m=companies&a=view&company_id=' . $company_id, '', $tab);
$tabBox->add($moddir . 'vw_active', 'Active Projects');
$tabBox->add($moddir . 'vw_archived', 'Archived Projects');
if ($AppUI->isActiveModule('departments') && canView('departments')) {
$tabBox->add($moddir . 'vw_depts', 'Departments');
}
$tabBox->add($moddir . 'vw_users', 'Users');
$tabBox->add($moddir . 'vw_contacts', 'Contacts');
$tabBox->show();
示例7: w2PfindImage
</th>
<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;
示例8: dPgetSysVal
$canEdit = false;
}
if ($canEdit) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit&folder=' . $folder . '" method="post">', '</form>');
$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');
}
//if ($view == 'folders') {
//include('folders_table.php');
//} else {
$tabBox = new CTabBox('?m=files', DP_BASE_DIR . '/modules/files/', $tab);
$tabbed = $tabBox->isTabbed();
$i = 0;
foreach ($file_types as $file_type) {
$q = new DBQuery();
$q->addQuery('count(file_id)');
$q->addTable('files', 'f');
$q->addJoin('projects', 'p', 'p.project_id = file_project');
$q->addJoin('tasks', 't', 't.task_id = file_task');
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) {
示例9: str_replace
:</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);
}
示例10: str_replace
<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();
}
示例11: die
<?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();
示例12: array
if ($p['project_active'] < 1) {
++$archive;
} else {
++$proposed;
}
}
}
}
}
$fixed_project_type_file = array($AppUI->_('In Progress', UI_OUTPUT_RAW) . ' (' . $active . ')' => "vw_idx_active", $AppUI->_('Complete', UI_OUTPUT_RAW) . ' (' . $complete . ')' => "vw_idx_complete", $AppUI->_('Archived', UI_OUTPUT_RAW) . ' (' . $archive . ')' => "vw_idx_archived");
// we need to manually add Archived project type because this status is defined by
// other field (Active) in the project table, not project_status
$project_types[] = $AppUI->_('Archived', UI_OUTPUT_RAW) . ' (' . $archive . ')';
// Only display the All option in tabbed view, in plain mode it would just repeat everything else
// already in the page
$tabBox = new CTabBox("?m=projects&orderby={$orderby}", "{$dPconfig['root_dir']}/modules/projects/", $tab);
if ($tabBox->isTabbed()) {
// This will overwrited the initial tab, so we need to add that separately.
if (isset($project_types[0])) {
$project_types[] = $project_types[0];
}
$project_types[0] = $AppUI->_('All Projects', UI_OUTPUT_RAW) . ' (' . count($projects) . ')';
}
/**
* 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])) {
示例13: w2p_url
?>
:</td>
<td class="hilite"><?php
echo w2p_url($department->dept_url);
?>
</td>
</tr>
</table>
</td>
<td width="50%">
<strong><?php
echo $AppUI->_('Description');
?>
</strong>
<table cellspacing="1" cellpadding="2" border="0" width="100%">
<tr>
<td class="hilite" width="100%"><?php
echo w2p_textarea($department->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(W2P_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->show();
示例14: CTitleBlock
<?php
$AppUI->savePlace();
$perms =& $AppUI->acl();
$role_id = $_GET['role_id'];
$role = $perms->getRole($role_id);
if (isset($_GET['tab'])) {
$AppUI->setState('RoleVwTab', $_GET['tab']);
}
$tab = $AppUI->getState('RoleVwTab') !== NULL ? $AppUI->getState('RoleVwTab') : 0;
if (!is_array($role)) {
$titleBlock = new CTitleBlock('Invalid Role', 'roles-settings.png');
$titleBlock->addButton('role list', '?m=system&u=roles');
$titleBlcok->show();
} else {
$titleBlock = new CTitleBlock('View Role', 'roles-settings.png');
$titleBlock->addButton('role list', '?m=system&u=roles');
$titleBlock->show();
$tabBox = new CTabBox("?m=system&u=roles&a=viewrole&role_id={$role_id}", $tab);
$tabBox->add('vw_role_perms', 'Permissions');
$tabBox->setInfo('<table border="0" cellpadding="4" cellspacing="0" width="100%" class="internal">' . '<tr>' . '<td align="right" nowrap><b>' . $AppUI->_('Role ID') . ':</b></td>' . '<td width="100%">' . $role['value'] . '</td>' . '<td rowspan="2"><input type="button" value="' . $AppUI->_('Add permission') . '" onclick="doAddPermission()"></td>' . '</tr>' . '<tr>' . '<td align="right"><b>' . $AppUI->_('Description') . ':</b></td>' . '<td width="100%">' . $AppUI->_($role['name']) . '</td>' . '</tr>' . '</table>');
$tabBox->show();
}
// End of check for valid role
示例15: foreach
$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();