Exemplo n.º 1
0
     $xoops->theme()->addStylesheet('modules/system/css/admin.css');
     // Define scripts
     $xoops->theme()->addScript('media/jquery/plugins/jquery.jeditable.js');
     $xoops->theme()->addScript('modules/system/js/admin.js');
     $xoops->theme()->addScript('modules/system/js/module.js');
     // Define Breadcrumb and tips
     $admin_page = new \Xoops\Module\Admin();
     $admin_page->addBreadcrumbLink(SystemLocale::CONTROL_PANEL, \XoopsBaseConfig::get('url') . '/admin.php', true);
     $admin_page->addBreadcrumbLink(SystemLocale::MODULES_ADMINISTRATION, $system->adminVersion('modulesadmin', 'adminpath'));
     $admin_page->addBreadcrumbLink(XoopsLocale::MAIN);
     $admin_page->addTips(SystemLocale::MODULES_TIPS);
     $admin_page->renderBreadcrumb();
     $admin_page->renderTips();
     $system_module = new SystemModule();
     $list = $system_module->getModuleList();
     $install = $system_module->getInstalledModules();
     $view = $system->cleanVars($_COOKIE, 'xoopsModsView', 'large', 'string');
     if ($view == 'large') {
         $xoops->tpl()->assign('view_large', '');
         $xoops->tpl()->assign('view_line', 'hide');
     } else {
         $xoops->tpl()->assign('view_large', 'hide');
         $xoops->tpl()->assign('view_line', '');
     }
     $xoops->tpl()->assign('xoops', $xoops);
     $xoops->tpl()->assign('modules_list', $list);
     $xoops->tpl()->assign('modules_available', $install);
     // Call Footer
     $xoops->footer();
     break;
 case 'rename':
Exemplo n.º 2
0
        $content = "<div class='x2-note confirmMsg'>" . NO_INSTALLED_MODULES . "</div>";
    }
    //Reset module lists in cache folder
    $xoops->cache()->delete('system/modules');
    $xoops->setActiveModules();
} else {
    if (!$xoops->getConfig('locale')) {
        $xoops->setConfig('locale', $_COOKIE['xo_install_lang']);
    }
    $xoops->loadLocale('system');
    include_once XOOPS_ROOT_PATH . "/modules/system/class/module.php";
    include_once XOOPS_ROOT_PATH . "/modules/system/class/system.php";
    $system = System::getInstance();
    // Get installed modules
    $system_module = new SystemModule();
    $dirlist = $system_module->getInstalledModules();
    $toinstal = 0;
    $javascript = "";
    $content = "<ul class='log'><li style='background: none;'>";
    $content .= "<table class='module'>\n";
    /* @var $module XoopsModule */
    foreach ($dirlist as $module) {
        clearstatcache();
        $value = 0;
        $style = "";
        if (in_array($module->getInfo('dirname'), $wizard->configs['modules'])) {
            $value = 1;
            $style = " style='background-color:#E6EFC2;'";
        }
        $form = new Xoops\Form\ThemeForm('', 'modules', 'index.php', 'post');
        $moduleYN = new Xoops\Form\RadioYesNo('', 'modules[' . $module->getInfo('dirname') . ']', $value, XoopsLocale::YES, XoopsLocale::NO);