public function adminAction()
    {
        $allowed    = Kernel::getConfig('expose_admin', false, 'user_config');
        $saveadmin  = $this->wdb->getUser()->getSession()->get('saveadmin');
        $this->wdb->getUser()->getSession()->remove('saveadmin');
        if (
            (!$allowed || ('true' !== $allowed && '1' !== $allowed)) &&
            (is_null($saveadmin) || $saveadmin != time())
        ) {
            throw new NotFoundException('Forbidden access!');
        }

        $user_config_file   = Kernel::getPath('user_config_filepath', true);
        $user_config        = Kernel::get('user_config');
        $title              = _T('Administration panel');
        $page_infos         = array(
            'name'              => $title,
            'path'              => 'admin',
        );
        $tpl_params         = array(
            'breadcrumbs'       => array($title),
            'title'             => $title,
            'page'              => $page_infos,
            'page_tools'        => 'false'
        );

        $content            = $this->wdb->display(
            '',
            'admin_panel',
            array(
                'page'          => $page_infos,
                'page_tools'    => 'false',
                'page_title'    => 'true',
                'title'         => $title,
                'user_config_file'=> $user_config_file,
                'user_config'   => $user_config,
                'config'        => Kernel::getConfig(),
            )
        );

        return array('default', $content, $tpl_params);
    }
public function adminAction()
    {
        $allowed    = Kernel::getConfig('expose_admin', false, 'user_config');
        $saveadmin  = $this->wdb->getUser()->getSession()->get('saveadmin');
        $this->wdb->getUser()->getSession()->remove('saveadmin');
        if (
            (!$allowed || ('true' !== $allowed && '1' !== $allowed)) &&
            (is_null($saveadmin) || $saveadmin != time())
        ) {
            throw new NotFoundException('Forbidden access!');
        }

        $user_config_file   = Kernel::getPath('user_config_filepath', true);
        $user_config        = Kernel::get('user_config');
        $title              = _T('Administration panel');
        $page_infos         = array(
            'name'              => $title,
            'path'              => 'admin',
        );
        $tpl_params         = array(
            'breadcrumbs'       => array($title),
            'title'             => $title,
            'page'              => $page_infos,
            'page_tools'        => 'false'
        );

        $content            = $this->wdb->display(
            '',
            'admin_panel',
            array(
                'page'          => $page_infos,
                'page_tools'    => 'false',
                'page_title'    => 'true',
                'title'         => $title,
                'user_config_file'=> $user_config_file,
                'user_config'   => $user_config,
                'config'        => Kernel::getConfig(),
            )
        );

        return array('default', $content, $tpl_params);
    }
public function adminAction ( ) { $ allowed = Kernel :: getConfig ( 'expose_admin' , false , 'user_config' ) ; $ saveadmin = $ this -> wdb -> getUser ( ) -> getSession ( ) -> get ( 'saveadmin' ) ; $ this -> wdb -> getUser ( ) -> getSession ( ) -> remove ( 'saveadmin' ) ; if ( ( ! $ allowed || ( 'true' !== $ allowed && '1' !== $ allowed ) ) && ( is_null ( $ saveadmin ) || $ saveadmin != time ( ) ) ) { throw new NotFoundException ( 'Forbidden access!' ) ; } $ user_config_file = Kernel :: getPath ( 'user_config_filepath' , true ) ; $ user_config = Kernel :: get ( 'user_config' ) ; $ title = _T ( 'Administration panel' ) ; $ page_infos = array ( 'name' => $ title , 'path' => 'admin' , ) ; $ tpl_params = array ( 'breadcrumbs' => array ( $ title ) , 'title' => $ title , 'page' => $ page_infos , 'page_tools' => 'false' ) ; $ content = $ this -> wdb -> display ( '' , 'admin_panel' , array ( 'page' => $ page_infos , 'page_tools' => 'false' , 'page_title' => 'true' , 'title' => $ title , 'user_config_file' => $ user_config_file , 'user_config' => $ user_config , 'config' => Kernel :: getConfig ( ) , ) ) ; return array ( 'default' , $ content , $ tpl_params ) ; }
Admin panel action
@return array
@throws \WebDocBook\Exception\NotFoundException
Admin panel action