} } /** * Install new a modules. * If you has put a new module files to modules directory, * you can find that module in the left-side menu. * Choose "install" in the module dropdown menu to start install process. * * During the installation process a some files and settings will be import * to the Atom. * For more information see FpsModuleInstaller class. */ if (!empty($_GET['install'])) { $instMod = (string) $_GET['install']; if (!empty($instMod) && preg_match('#^[a-z]+$#i', $instMod)) { $ModulesInstaller = new FpsModuleInstaller(); try { $ModulesInstaller->installModule($instMod); $_SESSION['message'] = sprintf(__('Module "%s" has been installed'), $instMod); } catch (Exception $e) { $_SESSION['errors'] = sprintf(__('Module "%s" has been not installed (Reason: %s)'), $instMod, $e->getMessage()); } redirect('/admin/'); } } function getAdmFrontMenuParams() { $out = array(); $modules = glob(ROOT . '/modules/*', GLOB_ONLYDIR); if (count($modules)) { foreach ($modules as $key => $modPath) {
?> </div> </div> <div id="side-menu" class="side-menu"> <div class="search"> <form> <div class="input"><input type="text" name="search" placeholder="Search..." /></div> <input class="submit-butt" type="submit" name="send" value="" /> </form> </div> <ul> <?php $modsInstal = new FpsModuleInstaller(); $nsmods = $modsInstal->checkNewModules(); if (count($nsmods)) { foreach ($nsmods as $mk => $mv) { ?> <li> <div class="icon new-module"></div> <div class="sub-opener" onClick="subMenu('sub<?php echo $mk; ?> ')"></div> <a href="#"><?php echo $mk; ?>