Esempio n. 1
0
 * You should have received a copy of the GNU General Public License
 * along with MMC.  If not, see <http://www.gnu.org/licenses/>.
 */
/* require_once("modules/ppolicy/includes/ppolicy-xmlrpc.php"); */
/* require_once("modules/ppolicy/includes/ppolicy.inc.php"); */
/**
 * ppolicy module declaration
 */
/* require_once("modules/admin/includes/admin.inc.php"); */
require_once "modules/admin/includes/commons.inc.php";
$mod = new Module("admin");
$mod->setVersion("3.1.1");
$mod->setRevision('$Rev$');
$mod->setDescription(_T("Configuration", "admin"));
$mod->setAPIVersion("4.1.3");
$mod->setPriority(600);
/* Add the page to the module */
$submod = new SubModule("configure");
$submod->setVisibility(True);
$submod->setDescription(_T("Administration"));
$submod->setDefaultPage("admin/configure/index");
$submod->setImg('img/navbar/load');
$mod->addSubmod($submod);
/* Add the (yet empty) module to the app */
$MMCApp = MMCApp::getInstance();
$MMCApp->addModule($mod);
unset($MMCApp);
/* Load all configuration page found in the "pages" directory, they will
 be added to the main submodule
*/
loadAllConfigurationPages();
Esempio n. 2
0
$submod->addPage($page);*/
$page = new Page("edit", _T("Edit a computer", "samba"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("delete", _T("Delete a computer", "samba"));
$page->setOptions(array("noHeader" => True, "visible" => False));
$submod->addPage($page);
$mod->addSubmod($submod);
/**
 * Config submod
 */
$submod = new SubModule("config");
$submod->setDefaultPage("samba/config/index");
$submod->setImg('modules/samba/graph/navbar/pref');
$submod->setDescription(_T("Configuration"), "samba");
$submod->setVisibility(False);
$submod->setAlias('shares');
$page = new Page("index", _T("SAMBA configuration", "samba"));
$submod->addPage($page);
$page = new Page("restart", _T("restart SAMBA service", "samba"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("reload", _T("Reload SAMBA service", "samba"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$mod->addSubmod($submod);
/**
 * Declare ACL
 */
$mod->addACL("isSamba", _T("Add/delete SAMBA's attributes", "samba"));
$mod->addACL("isSmbDesactive", _T("Enable/Disable account", "samba"));
Esempio n. 3
0
    $page->setFile("modules/mail/domains/ajaxDomainFilter.php", array("AJAX" => True, "visible" => False));
    $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);
Esempio n. 4
0
function _createSamba4ConfigSubmodule($isProvisioned)
{
    $submodule = new SubModule("config");
    $submodule->setDefaultPage("samba4/config/index");
    $submodule->setImg('modules/samba4/graph/navbar/pref');
    $submodule->setDescription(_T("Configuration"), "samba4");
    $submodule->setVisibility(False);
    $submodule->setAlias('shares');
    $page = new Page("index", _T("SAMBA4 configuration", "samba4"));
    $page->setImg("modules/samba4/graph/img/config/icn_global_active.gif", "modules/samba4/graph/img/config/icn_global.gif");
    $submodule->addPage($page);
    $page = new Page("restart", _T("restart SAMBA service", "samba4"));
    $page->setOptions(array("visible" => False));
    $submodule->addPage($page);
    $page = new Page("reload", _T("Reload SAMBA service", "samba4"));
    $page->setOptions(array("visible" => False));
    $submodule->addPage($page);
    return $submodule;
}