Exemple #1
0
function _createSamba4SharesSubmodule($isProvisioned)
{
    $submodule = new SubModule("shares");
    $submodule->setDescription(_T("Shares", "samba4"));
    $submodule->setImg('modules/samba4/graph/navbar/share');
    $submodule->setDefaultPage("samba4/shares/index");
    $submodule->setVisibility($isProvisioned);
    $submodule->setPriority(20);
    $listSharesPage = new Page("index", _T("List shares", "samba4"));
    $listSharesPage->setImg("modules/samba4/graph/img/shares/icn_global_active.gif", "modules/samba4/graph/img/shares/icn_global.gif");
    $listSharesPage->setOptions(array("visible" => $isProvisioned));
    $submodule->addPage($listSharesPage);
    $addSharePage = new Page("add", _T("Add a share", "samba4"));
    $addSharePage->setImg("modules/samba4/graph/img/shares/icn_addShare_active.gif", "modules/samba4/graph/img/shares/icn_addShare.gif");
    $addSharePage->setOptions(array("visible" => $isProvisioned));
    $submodule->addPage($addSharePage);
    $backupPage = new Page("backup", _T("Backup a share", "samba4"));
    $backupPage->setOptions(array("noHeader" => True, "visible" => False));
    $submodule->addPage($backupPage);
    $deleteShare = new Page("delete", _T("Remove a share", "samba4"));
    $deleteShare->setOptions(array("noHeader" => True, "visible" => False));
    $submodule->addPage($deleteShare);
    $shareDetailsPage = new Page("edit", _T("Edit share", "samba4"));
    $shareDetailsPage->setOptions(array("visible" => False));
    $submodule->addPage($shareDetailsPage);
    return $submodule;
}
Exemple #2
0
/**
 * module declaration
 */
$mod = new Module("proxy");
$mod->setVersion("2.5.1");
$mod->setRevision('$Rev$');
$mod->setDescription(_T("Web proxy"), "proxy");
$mod->setAPIVersion('1:1:0');
/**
 * user submod definition
 */
$submod = new SubModule("blacklist");
$submod->setDescription(_T("Proxy", "proxy"));
$submod->setImg('modules/proxy/graph/navbar/proxy');
$submod->setDefaultPage("proxy/blacklist/statut");
$submod->setPriority(300);
$page = new Page("index", _T("Blacklist", "proxy"));
$submod->addPage($page);
$page = new Page("delete", _T("Remove a domain in the blacklist", "proxy"));
$page->setOptions(array("noHeader" => True, "visible" => False));
$submod->addPage($page);
$page = new Page("add", _T("Add a domain in the blacklist", "proxy"));
$submod->addPage($page);
$page = new Page("restart", _T("Restart proxy web service", "proxy"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("statut", _T("Proxy status page", "proxy"));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
Exemple #3
0
 * (at your option) any later version.
 *
 * MMC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * report module declaration
 */
$MMCApp =& MMCApp::getInstance();
$mod = new Module("report");
$mod->setVersion("3.1.83");
$mod->setRevision('');
$mod->setDescription(_T("Reporting", "report"));
$mod->setAPIVersion("0:0:0");
$mod->setPriority(990);
$submod = new SubModule("report", _T("Report", "report"));
$submod->setDefaultPage("report/report/index");
$submod->setImg('modules/report/graph/navbar/report');
$submod->setPriority(990);
$page = new Page("index", _T("Report creation", "report"));
$submod->addPage($page);
$page = new Page("get_file", _T("Download a file from report module (report or PNG)", "report"));
$page->setOptions(array("visible" => False, "noHeader" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp->addModule($mod);
Exemple #4
0
$page = new Page("ajaxFilter");
$page->setFile("modules/base/groups/ajaxFilter.php", array("AJAX" => True, "visible" => False));
$submod->addPage($page);
$page = new Page("members", _("Group members"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("edit", _("Edit a group"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$mod->addSubmod($submod);
/* Computer management module */
if (hasComputerManagerWorking()) {
    $submod = new SubModule("computers", _("Computers"));
    $submod->setImg('modules/base/graph/navbar/computer');
    $submod->setDefaultPage("base/computers/index");
    $submod->setPriority(3);
    $page = new Page("index", _("Computer list"));
    $submod->addPage($page);
    $page = new Page("add", _("Add computer"));
    if (!canAddComputer()) {
        $page->setOptions(array("visible" => False));
    }
    $submod->addPage($page);
    $page = new Page("edit", _("Edit computer"));
    $page->setOptions(array("visible" => False));
    $submod->addPage($page);
    $page = new Page("delete", _("Delete a computer"));
    $page->setFile("modules/base/computers/delete.php", array("noHeader" => True, "visible" => False));
    $submod->addPage($page);
    $page = new Page("ajaxComputersList", _("Ajax part of computers list"));
    $page->setFile("modules/base/computers/ajaxComputersList.php");
Exemple #5
0
    $submod->addPage($page);
    $page = new Page("ajaxMailDomainFilter");
    $page->setFile("modules/mail/domains/ajaxMailDomainFilter.php", array("AJAX" => True, "visible" => False));
    $submod->addPage($page);
    $mod->addSubmod($submod);
    $mod->addACL($attrs["maildrop"], _T("Forward to", "mail"));
} else {
    $mod->addACL($attrs["maildrop"], _T("Mail drop", "mail"));
}
if (hasVAliasesSupport()) {
    $submod = new SubModule("aliases");
    $submod->setDescription(_T("Mail", "mail"));
    $submod->setImg('modules/mail/graph/img/mail');
    $submod->setDefaultPage("mail/aliases/index");
    $submod->setVisibility($showAliasesModule);
    $submod->setPriority(10);
    $page = new Page("index", _T("Virtual aliases", "mail"));
    $submod->addPage($page);
    $page = new Page("add", _T("Add a virtual alias", "mail"));
    $submod->addPage($page);
    $page = new Page("edit", _T("Edit a virtual alias", "mail"));
    $page->setOptions(array("visible" => False));
    $submod->addPage($page);
    $page = new Page("delete", _T("Delete a virtual alias", "mail"));
    $page->setFile("modules/mail/aliases/delete.php", array("noHeader" => True, "visible" => False));
    $submod->addPage($page);
    $page = new Page("ajaxAliasesFilter");
    $page->setFile("modules/mail/aliases/ajaxAliasesFilter.php", array("AJAX" => True, "visible" => False));
    $submod->addPage($page);
    $mod->addSubmod($submod);
}
Exemple #6
0
 * module declaration
 */
$mod = new Module("samba");
$mod->setVersion("2.4.92");
$mod->setRevision('$Rev$');
$mod->setDescription(_T("SAMBA management"), "samba");
$mod->setAPIVersion("5:3:4");
$mod->setPriority(20);
/**
 * shares submod definition
 */
$submod = new SubModule("shares");
$submod->setDescription(_T("Shares", "samba"));
$submod->setImg('modules/samba/graph/navbar/share');
$submod->setDefaultPage("samba/shares/index");
$submod->setPriority(20);
$page = new Page("index", _T("List shares", "samba"));
$submod->addPage($page);
$page = new Page("add", _T("Add a share", "samba"));
$submod->addPage($page);
$page = new Page("backup", _T("Backup a share", "samba"));
$page->setOptions(array("noHeader" => True, "visible" => False));
$submod->addPage($page);
$page = new Page("delete", _T("Remove a share", "samba"));
$page->setOptions(array("noHeader" => True, "visible" => False));
$submod->addPage($page);
$page = new Page("details", _T("Share details", "samba"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$mod->addSubmod($submod);
/**
Exemple #7
0
 * shorewall module declaration
 */
include 'modules/shorewall/includes/shorewall-xmlrpc.inc.php';
$zones_types = getZonesTypes();
$lan_zones = getShorewallZones($zones_types['internal']);
$wan_zones = getShorewallZones($zones_types['external']);
$mod = new Module("shorewall");
$mod->setVersion("2.4.3");
$mod->setRevision('');
$mod->setDescription(_T("Firewall management", "shorewall"));
$mod->setAPIVersion("0:0:0");
$mod->setPriority(60);
$submod = new SubModule("shorewall", _T("Firewall", "shorewall"));
$submod->setDefaultPage("shorewall/shorewall/internal_fw");
$submod->setImg('modules/shorewall/graph/navbar/shorewall');
$submod->setPriority(60);
/* Add the page to the module */
$page = new Page("internal_fw", _T("Internal &rarr; Server", "shorewall"));
$submod->addPage($page);
if (!$lan_zones) {
    $page->setOptions(array("visible" => False));
}
$page = new Page("ajax_internal_fw");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("delete_internal_fw_rule");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("external_fw", _T("External &rarr; Server", "shorewall"));
$submod->addPage($page);
if (!$wan_zones) {