Example #1
0
 function display($tpl = NULL)
 {
     if (!FSS_Permission::CanModerate()) {
         return FSS_Admin_Helper::NoPerm();
     }
     $this->comments = new FSS_Comments(null, null);
     if ($this->comments->Process()) {
         return;
     }
     parent::display();
 }
Example #2
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();
 }
Example #3
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();
 }
Example #4
0
 function init()
 {
     $user = JFactory::getUser();
     $this->userid = $user->get('id');
     $this->model = $this->getModel("admin_support");
     if (!FSS_Permission::auth("fss.handler", "com_fss.support_admin")) {
         return FSS_Admin_Helper::NoPerm();
     }
     $this->def_open = FSS_Ticket_Helper::GetStatusID('def_open');
     $this->ticket_view = FSS_Input::getCmd('tickets', $this->def_open);
     $this->count = SupportTickets::getTicketCount();
     FSS_Helper::StylesAndJS(array('calendar', 'base64'));
     if (Task_Helper::HandleTasks($this)) {
         return false;
     }
     return true;
 }
Example #5
0
 function Create()
 {
     if (!FSS_Permission::auth("core.create", $this->getAsset())) {
         return FSS_Admin_Helper::NoPerm();
     }
     $db = JFactory::getDBO();
     $item = array();
     $item['id'] = 0;
     $user = JFactory::getUser();
     $userid = $user->get('id');
     foreach ($this->edit as $edit) {
         $field = $this->GetField($edit);
         $item[$field->field] = $field->default;
         if ($field->more) {
             $item[$field->more] = "";
         }
         if ($field->type == "related") {
             $field->rel_ids = array();
             $field->rel_id_list = "";
             if (!$this->added_related_js) {
                 $this->AddRelatedJS();
             }
         } elseif ($field->type == "products") {
             $this->GetProducts();
             $field->products = array();
             $prodcheck = "";
             foreach ($this->products as $product) {
                 $prodcheck .= '<label class="checkbox">';
                 $prodcheck .= "<input type='checkbox' name='{$field->field}_prod_" . $product->id . "' />" . $product->title;
                 $prodcheck .= '</label>';
                 //$prodcheck .= "<input type='checkbox' name='{$field->field}_prod_" . $product->id . "' />" . $product->title . "<br>";
             }
             $field->products_check = $prodcheck;
             $field->products_yesno = JHTML::_('select.booleanlist', $field->field, array('class' => "inputbox", 'size' => "1", 'onclick' => "DoAllProdChange('{$field->field}');"), $item[$field->field]);
         }
     }
     $this->item = $item;
     if (FSS_Permission::auth("core.edit.state", $this->getAsset())) {
         $this->item['published'] = 0;
         $this->item['author'] = $userid;
     }
     if (FSS_Permission::auth("core.edit", $this->getAsset())) {
         $this->authorselect = $this->AuthorSelect($this->item);
     }
     if (FSS_Input::getString("title")) {
         $this->item['title'] = FSS_Input::getString("title");
     }
     if (FSS_Input::getString("body")) {
         $this->item['body'] = FSS_Input::getHTML('body', '');
     }
     if (FSS_Input::getString("question")) {
         $this->item['question'] = FSS_Input::getString("question");
     }
     if (FSS_Input::getString("answer")) {
         $this->item['answer'] = FSS_Input::getHTML('answer', '');
     }
     $this->Output("form");
     return;
 }
Example #6
0
 function Report($report_name)
 {
     if (!FSS_Permission::auth("fss.reports.report." . $report_name, "com_fss.reports") && !FSS_Permission::auth("fss.reports.all", "com_fss.reports")) {
         return FSS_Admin_Helper::NoPerm();
     }
     $lang = JFactory::getLanguage();
     $lang->load("report_shared", JPATH_COMPONENT);
     $lang->load("report_" . $report_name . ".sys", JPATH_COMPONENT);
     $lang->load("report_" . $report_name, JPATH_COMPONENT);
     $report = $this->LoadXML($report_name);
     if (!$report) {
         echo "Unable to open report xml<br>";
         return;
     }
     $this->graph = 0;
     if (isset($report->graph)) {
         $this->graph = 1;
     }
     $report->getData();
     $report->translateData();
     //print_p($report);
     $this->OutputData($report);
 }
Example #7
0
 function CreateGroup()
 {
     if (!FSS_Permission::auth("fss.groups", "com_fss.groups")) {
         return FSS_Admin_Helper::NoPerm();
     }
     $this->creating = true;
     $this->group = new stdclass();
     $this->group->id = 0;
     $this->group->groupname = null;
     $this->group->description = null;
     $this->group->allsee = 0;
     $this->group->allemail = 0;
     $this->group->allprods = 1;
     $this->group->ccexclude = 0;
     $this->buildGroupEditForm();
     parent::display('group');
 }
Example #8
0
}
?>

<?php 
if (FSS_Permission::PermOthersContent()) {
    ?>

	<?php 
    echo FSS_Helper::PageSubTitle2("ALL_ARTICLES");
    ?>
	<ul>
	<?php 
    foreach ($this->artcounts as $type) {
        ?>
		<?php 
        if (FSS_Permission::auth("core.edit", FSS_Admin_Helper::id_to_asset($type['id']))) {
            ?>
			<li>
				<?php 
            echo $type['desc'];
            ?>
: <b><?php 
            echo $type['counts']['total'];
            ?>
</b> &nbsp;&nbsp;
				(<b><?php 
            echo $type['counts']['pub'];
            ?>
</b> <?php 
            echo JText::_('PUBLISHED');
            ?>