Ejemplo 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;
Ejemplo n.º 2
0
require ABSPATH . '/lib/mvc/pf-shortcode-class.php';
require ABSPATH . '/lib/mvc/pf-widget-class.php';
require ABSPATH . '/lib/mvc/pf-model-class.php';
require ABSPATH . '/lib/mvc/pf-view-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!");
}
/**
 * Configuration
 */
$setting = Pf::setting();
define('DEFAULT_LOCALE', $setting->get_element_value('general', 'site_language'));
define('HTML_LANGUAGE', $setting->get_element_value('general', 'html_language'));
define('NUM_PER_PAGE', $setting->get_element_value('general', 'items_per_page'));
date_default_timezone_set(get_configuration('time_zone'));
if ($setting->get_element_value('general', 'enable_log') == 1) {
    new Pf_Error_Handler();
}
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';
if (is_null(Pf::auth()->get_session("user-id")) && Pf::auth()->check_cookie("id")) {
    set_session(Pf::auth()->get_cookie("id"));
}
Ejemplo 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']));