Exemplo n.º 1
0
 public function getUserInterface($params = null)
 {
     include 'include/CMSPage.php';
     $this->smarty->assign('hasRestriction', $this->hasRestriction());
     $page = new CMSPage($_REQUEST['page']);
     $rev = $page->getActiveRevisions($_SESSION['lang']);
     if ($page->getAccess() != 'public' && $this->hasRestriction()) {
         $auth_container = new User();
         $auth = new Auth($auth_container, null, 'authInlineHTML');
         $auth->start();
         if (!$auth->checkAuth()) {
             return authInlineHTML();
         } else {
             if ($page->getAccess() != 'public' && $_SESSION['authenticated_user']->hasPerm('membersaccess')) {
                 $this->smarty->assign('content_perms', true);
             } else {
                 $this->smarty->assign('content_perms', false);
             }
         }
     } else {
         $this->smarty->assign('content_perms', true);
     }
     $metaData = $rev->getMetaData();
     $this->smarty->assign('content', $rev);
     $this->setMetaDescription($metaData['description']);
     $this->setMetaTitle($metaData['title']);
     $this->setMetaKeywords($metaData['keywords']);
     $this->setPageTitle($rev->getPageTitle());
     return $this->smarty->fetch('db:content.tpl');
 }