Esempio n. 1
0
<!DOCTYPE html>
<html lang="<?php 
echo HTML_LANGUAGE;
?>
">
    <head>
        <meta charset="<?php 
echo !empty($charset) ? $charset : "utf-8";
?>
">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <title><?php 
echo htmlspecialchars(Pf::setting()->get_element_value('general', 'site_name'));
?>
</title>

        <!-- CSS -->
        <?php 
global $_admin_css;
foreach ($_admin_css as $css) {
    $relative_path = RELATIVE_PATH;
    if ($css[1] != '') {
        $relative_path = strpos($css[1], '/plugins/default/') !== false ? RELATIVE_DEFAULT_PLUGIN_PATH : RELATIVE_PLUGIN_PATH;
    }
    echo '<link href="' . $relative_path . '/' . preg_replace('/\\\\/', '/', $css[0]) . '" rel="stylesheet">' . " \n\t";
}
?>
        <!-- Javascript -->
        <?php 
global $_admin_js;
Esempio n. 2
0
        }
        $reflector = new ReflectionClass($p_obj);
        $plugin_path = dirname($reflector->getFileName());
        $controller_file = implode('-', $controller_array) . '-controller.php';
        $controller_class = '';
        foreach ($controller_array as $v) {
            $controller_class .= ucfirst($v) . '_';
        }
        $controller_class .= 'Controller';
        if (is_file($plugin_path . '/admin/controllers/' . $controller_file)) {
            require $plugin_path . '/admin/controllers/' . $controller_file;
            $controller_obj = new $controller_class();
            $action = !empty($_GET[$controller_obj->action]) ? $_GET[$controller_obj->action] : 'index';
            $_call_back = array($controller_obj, $action);
            if (method_exists($controller_obj, $action) && is_callable($_call_back, true)) {
                call_user_func($_call_back);
            }
        }
        $_admin_plugin_content = ob_get_contents();
        ob_end_clean();
    } else {
        // Error: Plugin load fails
    }
}
if (is_ajax()) {
    die($_admin_plugin_content);
}
require ABSPATH . '/' . ADMIN_FOLDER . '/themes/default/template.php';
if (true === DEBUG) {
    Pf::database()->show_debug_console();
}
Esempio n. 3
0
require ABSPATH . '/lib/option.php';
require ABSPATH . '/lib/functions.php';
require ABSPATH . '/lib/paginator-class.php';
require ABSPATH . '/lib/helper/form-helper.php';
require ABSPATH . '/lib/File_Gettext/File/Gettext.php';
require ABSPATH . '/lib/helper/l10n-helper.php';
require ABSPATH . '/lib/plugin-class.php';
/**
 * Blocking Blacklist
 */
$blacklist = get_option('ip_blacklist');
$arr = explode("\n", $blacklist);
if (in_array(get_client_ip(), $arr)) {
    exit("Thank you for visiting our website but your IP has been banned!");
}
$sitename = Pf::setting()->get_element_value('general', 'site_name');
if (is_login() == TRUE) {
    if (isset($_GET['action']) && $_GET['action'] == 'logout') {
        $auth = new Auth();
        $auth->destroy_session();
        if ($auth->check_cookie('id')) {
            $auth->destroy_cookie('id');
        }
        header('location: ?page=login');
    } else {
        header('location: index.php');
    }
} else {
    if (!isset($_GET['page'])) {
        if (!empty($_GET['ref'])) {
            header('location: ?page=login&ref=' . urlencode($_GET['ref']));