function get_modules_list() { $db = XoopsDatabaseFactory::getDatabaseConnection(); $sql = 'SELECT * FROM ' . $db->prefix('modules') . " ORDER BY mid, weight"; $result = $db->query($sql); $installed_mods = array(); while ($row = $db->fetchArray($result)) { $mod = new XoopsModule(); $mod->assignVars($row); $module_icon = $mod->getInfo('icon48') != '' ? XOOPS_URL . '/modules/' . $mod->getVar('dirname') . '/' . $mod->getInfo('icon48') : ''; $module_logo = XOOPS_URL . '/modules/' . $mod->getVar('dirname') . '/' . $mod->getInfo('image'); if ($mod->hasconfig()) { $config_link = $mod->getInfo('rmnative') ? XOOPS_URL . '/modules/rmcommon/settings.php?action=configure&mod=' . $mod->mid() : XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mod->mid(); } $this_module = array('name' => $mod->getVar('name'), 'dirname' => $mod->getVar('dirname'), 'real_name' => $mod->getInfo('name'), 'version' => is_array($mod->getInfo('rmversion')) ? RMModules::format_module_version($mod->getInfo('rmversion')) : $mod->getVar('version') / 100, 'icon' => $module_icon, 'logo' => $module_logo, 'admin' => $mod->getVar('hasadmin') ? XOOPS_URL . '/modules/' . $mod->getVar('dirname') . '/' . $mod->getInfo('adminindex') : '', 'main' => RMUris::anchor($mod->getVar('dirname')), 'updated' => RMTimeFormatter::get()->format($mod->getVar('last_update'), __('%d% %T% %Y%', 'rmcommon')), 'config' => isset($config_link) ? $config_link : '', 'description' => $mod->getInfo('description')); $installed_mods[] = (object) $this_module; } return $installed_mods; }
</div> <!--// Categories --> <div class="cu-content-footer"> <div class="row"> <div class="col-lg-12 text-right"> <button type="button" class="btn btn-default" onclick="<?php if ($is_popup) { ?> $('#cu-settings-form').modal('hide');<?php } else { ?> window.location.href='<?php echo RMUris::anchor($module->getVar('dirname')); ?> ';<?php } ?> "><?php _e('Cancel', 'rmcommon'); ?> </button> <button type="submit" class="btn btn-primary"><?php _e('Save Changes', 'rmcommon'); ?> </button> </div> </div> </div>
<h4 class="menu-heading modules-menu-head"> <a href="#menu-modules"><?php _e('Modules', 'rmcommon'); ?> </a> </h4> <?php if (!empty($activeModules)) { ?> <ul id="menu-modules"> <?php foreach ($activeModules as $module) { ?> <li> <a href="<?php echo RMUris::anchor($module->directory); ?> "<?php if (!empty($module->menu)) { ?> data-submenu="yes"<?php } ?> > <?php echo $xoFunc->menuIcon($module->icon, $module->directory); ?> <?php echo $module->name; ?> <?php