예제 #1
0
파일: layout.php 프로젝트: DINKIN/rokket
 public static function svg($icon)
 {
     ob_start();
     include dir::layout('icons/' . $icon . '.svg', rp::get('layout'));
     $return = ob_get_contents();
     ob_end_clean();
     return $return;
 }
예제 #2
0
파일: index.php 프로젝트: kyroskoh/rokket
    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'));
}
예제 #3
0
파일: settings.php 프로젝트: DINKIN/rokket
<?php

if ($action == 'deleteCache') {
    cache::clear();
    echo message::success(lang::get('delete_cache_success'));
}
if ($action == 'generateCSS') {
    $less = new lessc();
    $error = false;
    $newCSS = '';
    try {
        $newCSS = $less->compileFile(dir::layout('less/style.less', rp::get('layout')));
        $fp = fopen(dir::layout('css/style.css', rp::get('layout')), "wb");
        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'));