<?php

namespace Mnv\Admin\Controllers;

if (!defined('MNV_CMS')) {
    die('Hacking attempt!');
}

use Mnv\Core\AdminMnv;

/**
 * Class IniVarsAdmin
 * @package Mnv\Admin\Controllers
 */
class IniVarsAdmin extends AdminMnv
{
    protected $template;
    protected $name;
    protected $activeItem;

    public function fetch()
    {

        $this->smarty->assign('activeItem', 'inivars');
        $this->smarty->assign('title','Значение PHP переменных');

        $this->smarty->assign('inivars', ini_get_all());

        if ($this->permissions('inivars')) {
            return $this->smarty->fetch('views/server/inivars.tpl');
        }

        $this->smarty->assign('title', 'Access Denied');
        return $this->smarty->fetch('AccessIsDenied.tpl');

    }
}
