Example #1
0
 function __construct()
 {
     if (!in_array(Funcs::$uri[2], $this->getFuncs(__CLASS__))) {
         $tree = Tree::getTreeByUrl('wide');
         Funcs::setMeta($tree);
         $tree['list'] = Faq::getList($tree['id']);
         View::render('cards/index', $tree);
     } elseif (!$_SESSION['iuser']) {
         View::render('site/redirect', array('text' => 'Доступ запрещен', 'href' => '/services/cards/'));
     }
 }
Example #2
0
 function __construct()
 {
     if (!in_array(Funcs::$uri[1], get_class_methods(__CLASS__))) {
         $tree = Tree::getTreeByUrl('wide');
         Funcs::setMeta($tree);
         $tree['list'] = Faq::getList($tree['id']);
         if ($_POST) {
             $error = Faq::ask($tree['id']);
             if ($error) {
                 View::render('faq/list', $tree);
             } else {
                 $this->redirect('/help/faq/');
             }
         } else {
             View::render('faq/list', $tree);
         }
     }
 }