Beispiel #1
0
 function display($tpl = null)
 {
     $layout = FSS_Input::getCmd('layout');
     if ($layout == "support") {
         return JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_support', false));
     }
     if ($layout == "content") {
         return JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_content', false));
     }
     if ($layout == "moderate") {
         return JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_moderate', false));
     }
     if ($layout == "shortcut") {
         return JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_shortcut', false));
     }
     $can_view = false;
     $view = array();
     if (FSS_Permission::PermAnyContent()) {
         $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_content', false);
         $can_view = true;
     }
     if (FSS_Permission::AdminGroups()) {
         $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_groups', false);
         $can_view = true;
     }
     if (FSS_Permission::auth("fss.reports", "com_fss.reports")) {
         $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_report', false);
         $can_view = true;
     }
     if (FSS_Permission::auth("fss.handler", "com_fss.support_admin")) {
         $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_support', false);
         $can_view = true;
     }
     if (FSS_Permission::CanModerate()) {
         $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_moderate', false);
         $can_view = true;
     }
     if (!$can_view) {
         return FSS_Admin_Helper::NoPerm();
     }
     // if only 1 section visible, then view that section only
     if (count($view) == 1) {
         $mainframe = JFactory::getApplication();
         $link = reset($view);
         $mainframe->redirect($link);
     }
     $this->comments = new FSS_Comments(null, null);
     $this->artcounts = FSS_ContentEdit::getArticleCounts();
     parent::display();
 }
Beispiel #2
0
 function display($tpl = null)
 {
     $this->layout = FSS_Input::getCmd('layout', FSS_Input::getCmd('_layout', ''));
     $this->view = FSS_Input::getCmd('view', FSS_Input::getCmd('_view', ''));
     if (!FSS_Permission::PermAnyContent()) {
         return FSS_Admin_Helper::NoPerm();
     }
     $this->type = FSS_Input::getCmd('type', '');
     if ($this->type != "") {
         return $this->displayType();
     }
     $this->artcounts = FSS_ContentEdit::getArticleCounts();
     parent::display();
 }
Beispiel #3
0
 static function getArticleCounts()
 {
     if (empty(self::$artcounts)) {
         self::$artcounts = array();
         $types = array();
         $types[] = "announce";
         $types[] = "faqs";
         $types[] = "kb";
         $types[] = "glossary";
         foreach ($types as $type) {
             require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'content' . DS . $type . '.php';
             $class = "FSS_ContentEdit_{$type}";
             $content = new $class();
             self::$artcounts[$type] = array();
             self::$artcounts[$type]['desc'] = $content->descs;
             self::$artcounts[$type]['id'] = $content->id;
             self::$artcounts[$type]['counts'] = $content->getCounts();
         }
     }
     return self::$artcounts;
 }