public static function loadAllConfig() { $addons = []; foreach (self::getAll() as $name) { $addons[$name] = self::getConfig($name); } rp::add('addons', $addons); return true; }
echo message::success($success); } layout::addNav(lang::get('dashboard'), 'dashboard', 'home', ['refresh'], true); layout::addNav(lang::get('settings'), 'settings', 'settings', [], false); layout::addNav(lang::get('server'), 'server', 'list', ['add'], true); layout::addNav(lang::get('addons'), 'addons', 'alt', [], true); layout::addNav(lang::get('user'), 'user', 'users', ['add'], true); foreach (addonConfig::includeAllConfig() as $file) { include $file; } if (userLogin::isLogged()) { $path = 'pages/' . $page . '.php'; $path = extension::get('PAGE_PATH', $path); if (file_exists($path)) { include $path; } else { echo message::danger(lang::get('page_not_found'), false); } } $content = ob_get_contents(); ob_end_clean(); rp::add('content', $content); if (ajax::is()) { echo ajax::getReturn(); die; } if (userLogin::isLogged()) { include dir::layout('index.php', rp::get('layout')); } else { include dir::layout('login.php', rp::get('layout')); }
fwrite($fp, $newCSS); fclose($fp); } catch (exception $e) { echo message::danger($e->getMessage()); $error = true; } if (!$error) { echo message::success(lang::get('generate_css_success')); } } if (isset($_POST['send'])) { rp::add('lang', type::post('lang', 'string'), true); rp::add('logs', type::post('logs', 'int'), true); rp::add('ip', type::post('ip', 'string'), true); rp::add('email', type::post('email', 'string'), true); rp::add('emailNot', type::post('emailNot', 'int'), true); rp::save(); echo message::success(lang::get('settings_edited')); } ?> <div class="row"> <form action="" method="post"> <div class="col-md-7"> <div class="panel"> <div class="top"> <h3><?php echo lang::get('general');
if (isset($_POST['check'])) { $DB = rp::get('DB'); sql::connect($DB['host'], $DB['user'], $DB['password'], $DB['database']); unset($DB); $sql = new sql(); $salt = userLogin::generateSalt(); $sql->setTable('user'); $sql->addPost('firstname', type::post('firstname')); $sql->addPost('name', type::post('name')); $sql->addPost('username', type::post('username')); $sql->addPost('email', type::post('email')); $sql->addPost('password', userLogin::hash(type::post('password'), $salt)); $sql->addPost('salt', $salt); $sql->addPost('admin', 1); $sql->save(); rp::add('setup', false, true); rp::save(); header('Location: ?page=finish'); exit; } ?> <div class="input row"> <label class="col-sm-4"><?php echo lang::get('firstname'); ?> </label> <div class="col-sm-8"> <input type="text" name="firstname" value="<?php echo type::post('firstname'); ?>
</h1> <?php if (isset($_POST['check'])) { $ip = type::post('ip'); $user = type::post('user'); $password = type::post('password'); ob_start(); $ssh = new ssh($ip, $user, $password); $error = ob_get_contents(); ob_end_clean(); if ($error) { echo $error; } else { $SSH = ['ip' => $ip, 'user' => $user, 'password' => $password]; rp::add('SSH', $SSH, true); rp::save(); header('Location: ?page=user'); exit; } } ?> <div class="input row"> <label class="col-sm-4"><?php echo lang::get('ip'); ?> </label> <div class="col-sm-8"> <input type="text" name="ip" value="<?php echo type::post('ip');
<?php if (isset($_POST['check'])) { $host = type::post('host'); $user = type::post('user'); $password = type::post('password'); $database = type::post('database'); $prefix = type::post('prefix'); ob_start(); $sqlCheck = sql::connect($host, $user, $password, $database); $error = ob_get_contents(); ob_end_clean(); if ($sqlCheck) { echo message::danger(lang::get('db_not_correct') . ' - <small>' . lang::get('show_errors') . '</small>', false); } else { $DB = ['host' => $host, 'user' => $user, 'password' => $password, 'database' => $database, 'prefix' => $prefix]; rp::add('DB', $DB, true); rp::save(); $DB = rp::get('DB'); sql::connect($DB['host'], $DB['user'], $DB['password'], $DB['database']); unset($DB); $sql = new sql(); $sql->query('DROP TABLE IF EXISTS `' . sql::table('addons') . '`'); $sql->query('CREATE TABLE `' . sql::table("addons") . '` ( `id` int(11) unsigned NOT NULL, `name` varchar(255) NOT NULL, `active` int(1) NOT NULL, `install` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); $sql = new sql(); $sql->query('DROP TABLE IF EXISTS `' . sql::table('server') . '`'); $sql->query('CREATE TABLE `' . sql::table("server") . '` (