function display($tpl = null) { $this->type = FSS_Input::getCmd('type'); $this->editor = FSS_Input::getCmd('editor'); $this->Init($this->type); parent::display(); }
function display($tpl = null) { $type = FSS_Input::getCmd('type'); if ($type) { return parent::display($type); } parent::display(); }
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(); }
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(); }
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(); }
public function register() { $this->setLayout("register"); // Get the view data. $this->data = $this->get('Data'); $this->form = $this->get('Form'); $this->state = $this->get('State'); $this->params = $this->state->get('params'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Check for layout override $active = JFactory::getApplication()->getMenu()->getActive(); if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx')); return parent::display(); }
function showWord() { $db = JFactory::getDBO(); $word_id = FSS_Input::getString('word'); if (is_numeric($word_id)) { $qry = "SELECT * FROM #__fss_glossary WHERE id = '" . $db->escape($word_id) . "'"; } else { $word = FSS_Input::getString('word'); $word = urldecode($word); $qry = "SELECT * FROM #__fss_glossary WHERE word = '" . $word . "'"; } $db->setQuery($qry); $this->glossary = $db->loadObject(); if (FSS_Input::getCmd('tmpl') == 'component') { parent::display('modal'); } else { parent::display(); } }
function PickCCUser() { $db = JFactory::getDBO(); // build query // get list of possible user ids $user = JFactory::getUser(); $userid = $user->get('id'); $qry = "SELECT g.id, g.ccexclude FROM #__fss_ticket_group_members AS gm LEFT JOIN #__fss_ticket_group AS g ON gm.group_id = g.id WHERE user_id = " . FSSJ3Helper::getEscaped($db, $userid); $db->setQuery($qry); $gids = array(); $rows = $db->loadObjectList(); foreach ($rows as $row) { if ($row->ccexclude == 0) { $gids[$row->id] = $row->id; } } if (count($gids) == 0) { return; } $qry = "SELECT user_id FROM #__fss_ticket_group_members WHERE group_id IN (" . implode(", ", $gids) . ")"; $db->setquery($qry); $user_ids = $db->loadObjectList('user_id'); $uids = array(); foreach ($user_ids as $uid => &$group) { $uids[$uid] = $uid; } unset($uids[$userid]); $ticketid = FSS_Input::getInt('ticketid'); $this->GetTicket(); $this->getCCInfo(); if (array_key_exists("cc", $this->ticket)) { foreach ($this->ticket['cc'] as $ccuser) { $userid = $ccuser['id']; unset($uids[$userid]); } } $qry = "SELECT * FROM #__users "; $where = array(); $limitstart = FSS_Input::getInt('limitstart'); $mainframe = JFactory::getApplication(); $limit = $mainframe->getUserStateFromRequest('users.limit', 'limit', 10, 'int'); $search = FSS_Input::getString('search'); if ($search != "") { $where[] = "(username LIKE '%" . FSSJ3Helper::getEscaped($db, $search) . "%' OR name LIKE '%" . FSSJ3Helper::getEscaped($db, $search) . "%' OR email LIKE '%" . FSSJ3Helper::getEscaped($db, $search) . "%')"; } if (count($uids) > 0) { $where[] = "id IN (" . implode(", ", $uids) . ")"; } else { $where[] = "id = 0"; } if (count($where) > 0) { $qry .= " WHERE " . implode(" AND ", $where); } // Sort ordering $qry .= " ORDER BY name "; // get max items $db->setQuery($qry); $db->query(); $maxitems = $db->getNumRows(); //echo $qry . "<br>"; // select picked items $db->setQuery($qry, $limitstart, $limit); $this->users = $db->loadObjectList(); // build pagination $this->pagination = new JPaginationEx($maxitems, $limitstart, $limit); $this->search = $search; parent::display("users"); }
function OutputData(&$report) { $this->report = $report; if (FSS_Input::getCmd('output') == "csv") { $this->outputCSV(); } if (FSS_Input::getCmd("output") == "print") { return parent::display("print"); } parent::display("report"); }
function searchArticles() { $mainframe = JFactory::getApplication(); $aparams = FSS_Settings::GetViewSettingsObj('kb'); $search = FSS_Input::getString('kbsearch', ''); $prodid = FSS_Input::getInt('prodid'); $catid = FSS_Input::getInt('catid'); $this->assign('cat_art_pages', $aparams->get('cat_art_pages', 0)); $search = FSS_Input::getString('kbsearch'); $this->assign('view_mode', $aparams->get('cat_cat_arts')); $document = JFactory::getDocument(); $document->setTitle(JText::_("KNOWLEDGE_BASE") . ' - ' . JText::_("SEARCH_RESULTS")); $pagination = $this->get('ArtPaginationSearch'); $this->pagination = $pagination; $this->assign('limit', $this->get("ArtLimit")); $this->product = $this->get("Product"); $this->cat = $this->get("Cat"); $this->results = $this->get("ArtsWhat"); $this->search = $search; $pathway = $mainframe->getPathway(); if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'kb'))) { $pathway->addItem(JText::_('KNOWLEDGE_BASE'), FSSRoute::_('index.php?option=com_fss&view=kb')); } $pathway->addItem(JText::_("SEARCH_RESULTS")); FSS_Helper::AllowCache(); parent::display("kbsearch"); }
function display($tpl = null) { $mainframe = JFactory::getApplication(); $aparams = $mainframe->getPageParameters('com_fss'); $this->template = $aparams->get('template'); if ($this->template == "") { $this->template = "grid"; } $this->show_desc = $aparams->get('show_desc'); $this->mainwidth = $aparams->get('mainwidth'); $this->maincolums = $aparams->get('maincolums'); if ($this->maincolums == 0 || $this->maincolums == "") { $this->maincolums = 3; } $this->hideicons = $aparams->get('hideicons'); $this->imagewidth = $aparams->get('imagewidth'); if ($this->imagewidth == 0 || $this->imagewidth == "") { $this->imagewidth = 128; } $this->imageheight = $aparams->get('imageheight'); if ($this->imageheight == 0 || $this->imageheight == "") { $this->imageheight = 128; } $this->border = $aparams->get('border'); $this->info_top = $aparams->get('info_top'); $this->info_well = $aparams->get('info_well'); if ($this->info_top === null) { $this->info_top = 1; } if ($this->info_well === null) { $this->info_well = 1; } $db = JFactory::getDBO(); $query = 'SELECT * FROM #__menu'; $db->setQuery($query); $this->joomlamenus = $db->loadAssocList('id'); // work out permissions, and if to show admin or not $showadmin = false; $showgroups = false; if (FSS_Permission::AnyAdmin()) { $showadmin = true; } if (FSS_Permission::AdminGroups()) { $showgroups = true; } $this->showadmin = $showadmin; if ($showadmin) { $this->getSupportOverView(); } $query = 'SELECT * FROM #__fss_main_menu '; $where = array(); if (!$showadmin) { $where[] = 'itemtype != 9'; } if (!$showgroups) { $where[] = 'itemtype != 10'; } // add language and access to query where $where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')'; $user = JFactory::getUser(); $where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'; $where[] = "published = 1"; if (count($where) > 0) { $query .= " WHERE " . implode(" AND ", $where); } $query .= " ORDER BY ordering"; $db->setQuery($query); $this->menus = $db->loadAssocList('id'); FSS_Translate_Helper::Tr($this->menus); $this->ValidateMenuLinks(); parent::display(); }
function _display($tpl = NULL) { parent::display($tpl); }
function display($tpl = null) { if (!FSS_Permission::auth("fss.view", "com_fss.announce")) { return FSS_Helper::NoPerm(); } $mainframe = JFactory::getApplication(); $aparams = $mainframe->getPageParameters('com_fss'); $announceid = FSS_Input::getInt('announceid'); require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'content' . DS . 'announce.php'; $this->content = new FSS_ContentEdit_Announce(); $this->content->Init(); $model = $this->getModel(); $model->content = $this->content; if ($announceid) { $tmpl = FSS_Input::getCmd('tmpl'); $this->tmpl = $tmpl; $this->setLayout("announce"); $this->announce = $this->get("Announce"); if (!$this->announce) { $mainframe->redirect(FSSRoute::_("index.php?option=com_fss&view=announce", false)); } $pathway = $mainframe->getPathway(); if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'announce'))) { $pathway->addItem(JText::_("ANNOUNCEMENTS"), FSSRoute::_('&limitstart=announceid=')); } // FIX LINK $pathway->addItem($this->announce['title']); $this->comments = new FSS_Comments('announce', $announceid); $this->comments->PerPage(FSS_Settings::Get('announce_comments_per_page')); if ($this->comments->Process()) { return; } if (FSS_Settings::get('announce_use_content_plugins')) { // apply plugins to article body $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $art = new stdClass(); $art->text = $this->announce['body']; $art->noglossary = 1; $this->params = $mainframe->getParams('com_fss'); $results = $dispatcher->trigger('onContentPrepare', array('com_fss.announce', &$art, &$this->params, 0)); $this->announce['body'] = $art->text; if ($this->announce['fulltext']) { $art->text = $this->announce['fulltext']; $art->noglossary = 1; $results = $dispatcher->trigger('onContentPrepare', array('com_fss.announce.fulltext', &$art, &$this->params, 0)); $this->announce['fulltext'] = $art->text; } } $this->parser = new FSSParser(); $type = FSS_Settings::Get('announcesingle_use_custom') ? 2 : 3; $this->parser->Load("announcesingle", $type); parent::display($tpl); return; } $pathway = $mainframe->getPathway(); if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'announce'))) { $pathway->addItem(JText::_("ANNOUNCEMENTS")); } $this->announces = $this->get('Announces'); $this->pagination = $this->get('Pagination'); if (FSS_Settings::get('announce_use_content_plugins_list')) { // apply plugins to article body $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $art = new stdClass(); foreach ($this->announces as &$item) { $art->text = $item['body']; $art->noglossary = 1; $this->params = $mainframe->getParams('com_fss'); $results = $dispatcher->trigger('onContentPrepare', array('com_fss.announce', &$art, &$this->params, 0)); $item['body'] = $art->text; } } $this->comments = new FSS_Comments('announce', null, $this->announces); $this->parser = new FSSParser(); $type = FSS_Settings::Get('announce_use_custom') ? 2 : 3; $this->parser->Load("announce", $type); if (FSS_Input::getCmd('feed') == "rss") { //header("Content-Type: text/xml"); header("Content-Type: application/xml; charset=UTF-8"); parent::display("rss"); exit; } else { parent::display($tpl); } }
function displayAllProducts() { $this->products = $this->get('Products'); if (!is_array($this->products)) { $this->products = array(); } FSS_Translate_Helper::Tr($this->products); $this->showresult = 1; $mainframe = JFactory::getApplication(); $pathway = $mainframe->getPathway(); if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'test'))) { $pathway->addItem(JText::_('TESTIMONIALS'), FSSRoute::_('index.php?option=com_fss&view=test')); } if (FSS_Settings::get('test_allow_no_product')) { $noproduct = array(); $noproduct['id'] = 0; $noproduct['title'] = JText::_('GENERAL_TESTIMONIALS'); $noproduct['description'] = ''; $noproduct['image'] = '/components/com_fss/assets/images/generaltests.png'; $this->products = array_merge(array($noproduct), $this->products); } if ($this->test_show_prod_mode != "list") { $idlist = array(); if (count($this->products) > 0) { foreach ($this->products as &$prod) { $prod['comments'] = array(); $idlist[] = $prod['id']; } } // not in normal list mode, get comments for each product $this->comments->itemid = $idlist; $this->comments->GetComments(); foreach ($this->comments->_data as &$data) { if ($data['itemid'] > 0) { $this->products[$data['itemid']]['comments'][] = $data; } } } parent::display(); }
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'); }
function listTags() { $mainframe = JFactory::getApplication(); $aparams = FSS_Settings::GetViewSettingsObj('faqs'); $pathway = $mainframe->getPathway(); $pathway->addItem(JText::_("TAGS")); $db = JFactory::getDBO(); $qry = "SELECT tag FROM #__fss_faq_tags "; $qry .= ' WHERE language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')'; $qry .= "GROUP BY tag ORDER BY tag"; $db->setQuery($qry); $this->tags = $db->loadObjectList(); parent::display("tags"); }
function noPermission($pagetitle = "INVALID_TICKET", $message = "YOU_ARE_TYING_TO_EITHER_ACCESS_AN_INVALID_TICKET_OR_DO_NOT_HAVE_PERMISSION_TO_VIEW_THIS_TICKET") { //echo dumpStack(); $this->no_permission_title = $pagetitle; $this->no_permission_message = $message; $this->setLayout("nopermission"); //print_r($this->ticket); parent::display(); }