예제 #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();
 }
예제 #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();
 }
예제 #3
0
'>
				<img src='<?php 
    echo JURI::root(true);
    ?>
/components/com_fss/assets/images/support/moderate_16.png'>
				<?php 
    echo JText::_("SA_MODERATE");
    ?>
			</a>
		</li>
	<?php 
}
?>

	<?php 
if (FSS_Permission::PermAnyContent()) {
    ?>
		<li class="<?php 
    if ($this->view == "admin_content") {
        echo "active";
    }
    ?>
">
			<a href='<?php 
    echo FSSRoute::_('index.php?option=com_fss&view=admin_content');
    ?>
'>
				<img src='<?php 
    echo JURI::root(true);
    ?>
/components/com_fss/assets/images/support/content_16.png'>
예제 #4
0
 static function OnlyGroups()
 {
     if (!FSS_Permission::PermAnyContent() && !FSS_Permission::auth("fss.handler", "com_fss.support_admin") && !FSS_Permission::auth("fss.reports", "com_fss.reports") && !FSS_Permission::CanModerate()) {
         return true;
     }
     return false;
 }