本文整理汇总了PHP中CTabBox::setInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP CTabBox::setInfo方法的具体用法?PHP CTabBox::setInfo怎么用?PHP CTabBox::setInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTabBox
的用法示例。
在下文中一共展示了CTabBox::setInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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
示例2: pfilter
$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;
?>
&orderby='+f.id);
}