示例#1
0
文件: display.php 项目: neoclust/mmc
function __my_header($label, $sidemenu, $item, $group)
{
    $p = new PageGenerator($label);
    if (!empty($item)) {
        $sidemenu->forceActiveItem($item->action);
    } else {
        if ($group->type == 0) {
            /* Highlight the "All groups" menu item on the left if the group is
               not displayed on the menu bar */
            $sidemenu->forceActiveItem('list');
        } else {
            $sidemenu->forceActiveItem('list_profiles');
        }
    }
    $p->setSideMenu($sidemenu);
    $p->display();
    return $p;
}
示例#2
0
文件: statut.php 项目: neoclust/mmc
?>
</h2>

<div class="fixheight"></div>

<?
$arrayTMP = getStatutProxy();

foreach($arrayTMP as $key => $value) {
    $info[]=$key;
    if ($value) $extraInfo[]=_T("enabled");
    else $extraInfo[]=_T("disabled");
}

$p = new PageGenerator();
$p->setSideMenu($sidemenu);
$p->displaySideMenu();

$n = new ListInfos($info,_T("Services"));
$n->setName(_T("Proxy status"));
$n->addExtraInfo($extraInfo,_T("Status"));
$n->display(0);

?>

<form method="post" action="main.php?module=proxy&amp;submod=blacklist&amp;action=restart">
<input name="goto" type="hidden" value="<?php 
echo $root;
?>
main.php" />
<input name="brestart" type="submit" class="btnPrimary" value="<?php 
示例#3
0
        $sharesEnabled[] = "disabledRow";
        $shareDescription = "(" . _T("Hidden", "samba4") . ") ";
    }
    $shareDescription = isset($share[$shareComponent["description"]]) ? $shareDescription . $share[$shareComponent["description"]] : "";
    $sharesDescription[] = $shareDescription;
    $sharesGuestAccess[] = isset($share[$shareComponent["guest_access"]]) ? $share[$shareComponent["guest_access"]] : "";
    if (isset($protectedShares) and !in_array($share[$shareComponent["name"]], $protectedShares)) {
        $editActions[] = new ActionItem(_T("Edit", "samba4"), "edit", "edit", "share");
        $delActions[] = new ActionPopupItem(_T("Delete", "samba4"), "delete", "delete", "share");
    } else {
        $editActions[] = new EmptyActionItem();
        $delActions[] = new EmptyActionItem();
    }
}
$page = new PageGenerator(_T("Current list of shares", "samba4"));
$page->setSideMenu($sidemenu);
$page->display();
$list = new ListInfos($sharesName, _T("Share", "samba4"));
$list->setCssClass("shareName");
$list->setCssClasses($sharesEnabled);
$list->addExtraInfo($sharesPath, _T("Path", "samba4"));
$list->addExtraInfo($sharesDescription, _T("Description", "samba4"));
$list->addActionItemArray($editActions);
$list->addActionItemArray($delActions);
$list->addActionItem(new ActionPopupItem(_T("Archive", "samba4"), "backup", "backup", "share"));
$list->disableFirstColumnActionLink();
$list->display();
/* Private functions */
function _shareIsEnabled($share)
{
    return isset($share[2]) and $share[2];