function _buildQuery() { $db =& JFactory::getDBO(); $query = ' SELECT c.id, c.title, c.ordering as ordering, c.published, c.description, c.image, c.inkb, c.insupport, c.intest, c.access, c.translation FROM #__fst_prod as c '; $where = array(); if ($this->lists['search']) { $where[] = '(LOWER( title ) LIKE ' . $db->Quote('%' . FSTJ3Helper::getEscaped($db, $this->lists['search'], true) . '%', false) . ')'; } if ($this->lists['order'] == 'c.ordering') { $order = ' ORDER BY c.ordering ' . $this->lists['order_Dir']; } else { $order = ' ORDER BY ' . $this->lists['order'] . ' ' . $this->lists['order_Dir'] . ', c.ordering'; } if ($this->lists['ispublished'] > -1) { $where[] = 'published = ' . $this->lists['ispublished']; } if (FSTAdminHelper::Is16()) { FSTAdminHelper::LA_GetFilterState(); /*if (FSTAdminHelper::$filter_lang) $where[] = "language = '" . FSTJ3Helper::getEscaped($db, FSTAdminHelper::$filter_lang) . "'";*/ if (FSTAdminHelper::$filter_access) { $where[] = "access = '" . FSTJ3Helper::getEscaped($db, FSTAdminHelper::$filter_access) . "'"; } } $where = count($where) ? ' WHERE ' . implode(' AND ', $where) : ''; $query .= $where . $order; return $query; }
static function LA_Filter($nolangs = false) { if (!FSTAdminHelper::Is16()) { return; } if (empty(FSTAdminHelper::$access_levels)) { FSTAdminHelper::LoadAccessLevels(); } if (!$nolangs && empty(FSTAdminHelper::$langs)) { FSTAdminHelper::LoadLanguages(); } if (empty(FSTAdminHelper::$filter_lang)) { FSTAdminHelper::LA_GetFilterState(); } $options = FSTAdminHelper::$access_levels; array_unshift($options, JHtml::_('select.option', 0, JText::_('JOPTION_SELECT_ACCESS'))); echo JHTML::_('select.genericlist', $options, 'fst_filter_access', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', FSTAdminHelper::$filter_access); if (!$nolangs) { $options = FSTAdminHelper::$langs; array_unshift($options, JHtml::_('select.option', '', JText::_('JOPTION_SELECT_LANGUAGE'))); echo JHTML::_('select.genericlist', $options, 'fst_filter_language', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', FSTAdminHelper::$filter_lang); } }