Inheritance: extends RewriteDriver
Exemple #1
0
$footerError = iADMIN && checkrights("ERRO") && count($_errorHandler) > 0 && !defined('no_debugger') ? "<button title='" . $locale['err_102'] . "' id='turbo_debugger' class='btn btn-sm btn-default m-r-10'><i class='fa fa-bug fa-lg'></i></button><strong>\n\t    " . str_replace(array("[ERROR_LOG_URL]", "[/ERROR_LOG_URL]"), array("<a href='" . ADMIN . "errors.php" . $aidlink . "'>", "</a>"), $locale['err_101']) . "\n\t    </strong><span class='badge'>" . count($_errorHandler) . "</span>\n\n\t\t" . fusion_console() . "" : '';
if (!isset($fusion_jquery_tags)) {
    $fusion_jquery_tags = '';
}
// Load layout
require_once __DIR__ . (defined('ADMIN_PANEL') ? '/admin_layout.php' : '/layout.php');
// Catch the output
$output = ob_get_contents();
//ob_start() called in maincore
if (ob_get_length() !== FALSE) {
    ob_end_clean();
}
// Do the final output manipulation
$output = handle_output($output);
// Search in output and replace normal links with SEF links
if (!isset($_GET['aid']) && fusion_get_settings("site_seo") == 1) {
    \PHPFusion\Rewrite\Permalinks::getInstance()->handle_url_routing($output);
    if (isset($router) && $router->getFilePath() !== "error.php") {
        $output = \PHPFusion\Rewrite\Permalinks::getInstance()->getOutput($output);
    }
}
if (isset($permalink)) {
    unset($permalink);
}
// Output the final complete page content
echo $output;
$defender->remove_token();
if (ob_get_length() > 0) {
    // length is a number
    ob_end_flush();
}
Exemple #2
0
/* $user_level = fusion_get_userdata("user_level");
if (fusion_get_settings("maintenance") == "1" && fusion_get_settings("maintenance_level") < $user_level) {
    if (fusion_get_settings("site_seo")) {
        redirect(FUSION_ROOT.BASEDIR."maintenance.php");
    } else {
        redirect(BASEDIR."maintenance.php");
    }
}*/
// Code provided by Karrak
$user_level = fusion_get_userdata("user_level");
if (fusion_get_settings("maintenance") == "1") {
    if (fusion_get_settings("maintenance_level") < $user_level or empty($user_level)) {
        if (fusion_get_settings("site_seo")) {
            redirect(FUSION_ROOT . BASEDIR . "maintenance.php");
        } else {
            redirect(BASEDIR . "maintenance.php");
        }
    }
}
if (fusion_get_settings("site_seo") == 1) {
    $permalink = \PHPFusion\Rewrite\Permalinks::getInstance();
}
require_once INCLUDES . "breadcrumbs.php";
require_once INCLUDES . "header_includes.php";
require_once THEME . "theme.php";
require_once THEMES . "templates/render_functions.php";
if (iMEMBER) {
    dbquery("UPDATE " . DB_USERS . " SET user_lastvisit=UNIX_TIMESTAMP(NOW()), user_ip='" . USER_IP . "', user_ip_type='" . USER_IP_TYPE . "' WHERE user_id='" . fusion_get_userdata("user_id") . "'");
}
ob_start();
require_once THEMES . "templates/panels.php";
Exemple #3
0
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
if (!fusion_get_settings("maintenance")) {
    redirect("index.php");
}
if (fusion_get_settings("site_seo") == 1 && !defined("IN_PERMALINK")) {
    \PHPFusion\Rewrite\Permalinks::getInstance()->handle_url_routing("");
}
$info = array();
if (!iMEMBER) {
    switch (fusion_get_settings("login_method")) {
        case "2":
            $placeholder = $locale['global_101c'];
            break;
        case "1":
            $placeholder = $locale['global_101b'];
            break;
        default:
            $placeholder = $locale['global_101a'];
    }
    $user_name = isset($_POST['user_name']) ? form_sanitizer($_POST['user_name'], "", "user_name") : "";
    $user_password = isset($_POST['user_pass']) ? form_sanitizer($_POST['user_pass'], "", "user_pass") : "";