Classes

File phpboost/environment/AdminNodisplayGraphicalEnvironment.class.php

File phpboost/environment/AdminNodisplayGraphicalEnvironment.class.php

 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 
<?php
/**
 * @package     PHPBoost
 * @subpackage  Environment
 * @copyright   &copy; 2005-2019 PHPBoost
 * @license     https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL-3.0
 * @author      Benoit SAUTEL <ben.popeye@phpboost.com>
 * @version     PHPBoost 5.2 - last update: 2017 06 28
 * @since       PHPBoost 3.0 - 2009 10 15
 * @contributor Julien BRISWALTER <j1.seth@phpboost.com>
*/

class AdminNodisplayGraphicalEnvironment extends AbstractGraphicalEnvironment
{
    /**
     * {@inheritdoc}
     */
    function display($content)
    {
        self::no_session_location();

        $this->process_site_maintenance();
        $this->check_admin_auth();

        echo $content;
    }

    private function check_admin_auth()
    {
        if (!AppContext::get_current_user()->is_admin())
        {
            exit;
        }
    }
}
?>