Example #1
0
admin_js('media/assets/jquery/jquery-1.11.1.min.js');
admin_js('media/assets/bootstrap/js/bootstrap.min.js');
admin_js(ADMIN_FOLDER . '/themes/default/assets/admin-lte/js/jquery-ui-1.10.3.min.js');
admin_js(ADMIN_FOLDER . '/themes/default/assets/admin-lte/js/AdminLTE/app.js');
admin_js(ADMIN_FOLDER . '/themes/default/assets/admin-lte/js/plugins/iCheck/icheck.min.js');
admin_js('media/assets/bootstrap-table/js/bootstrap-table.js');
global $_admin_menu;
global $_admin_toolbar_button;
$_admin_menu = array();
$_admin_toolbar_button = array();
global $_admin_plugin_content;
$_admin_plugin_content = '';
global $locale;
$locale = !empty($_GET['lang']) ? $_GET['lang'] : DEFAULT_LOCALE;
$_SESSION['lang'] = $locale;
load_admin_plugins(DEFAULT_PLUGIN_PATH);
load_active_plugins();
load_theme_language('admin_theme', '', 'default');
load_includes_language();
$theme = get_option('active_theme');
load_theme_language($theme . '-theme', '', $theme);
$charset = get_configuration('charset_html');
global $admin_page;
$admin_page = isset($_GET['admin-page']) ? $_GET['admin-page'] : 'dashboard';
if ($admin_page == 'dashboard') {
    $_GET['admin-page'] = $admin_page;
}
global $sub_page;
$sub_page = isset($_GET['sub_page']) ? $_GET['sub_page'] : '';
$m2 = isset($_admin_menu[$admin_page]) ? $_admin_menu[$admin_page] : array();
if (!empty($m2)) {
Example #2
0
    }
}
if (!empty($rs)) {
    // Check visible page
    if (!check_visible_page($rs['page_visible'])) {
        header('Location: ' . public_base_url() . get_page_url_by_id(get_configuration('error_page')));
        exit;
    }
    // Background
    $background_data = json_decode($rs['page_theme_options'], true);
    $background_option = !empty($background_data['background']) && (!empty($background_data['data']['color']) || !empty($background_data['data']['image'])) ? $background_data['background'] : '';
    $wrapper_background = !empty($background_data['wrapper_background']) ? $background_data['wrapper_background'] : '';
    // Set info head (Title, Keyword, Description)
    $head_info = array('title' => get_configuration('site_name') . ' - ' . (!empty($rs['page_meta_title']) ? $rs['page_meta_title'] : ''), 'keywords' => !empty($rs['page_meta_keywords']) ? $rs['page_meta_keywords'] : get_configuration('site_meta_keywords'), 'description' => !empty($rs['page_meta_description']) ? $rs['page_meta_description'] : get_configuration('site_meta_description'), 'charset' => empty($charset) ? "utf-8" : $charset);
    set_head_info($head_info);
    load_admin_plugins(DEFAULT_PLUGIN_PATH, 'public_init');
    load_active_plugins('public_init');
    if (is_ajax()) {
        $tags = Pf::shortcode()->get_tags();
        foreach ($tags as $ns => $tag) {
            if (!empty($_GET[$ns . '_code'])) {
                die(call_user_func($tag[$_GET[$ns . '_code']], $_REQUEST, null, $_GET[$ns . '_code']));
            }
        }
    }
    // get layout
    $layout = array();
    $layouts = get_option('layouts');
    foreach ($layouts as $v) {
        if ($v['id'] == $rs['page_layout']) {
            $layout = $v;