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; }
function SaveAPI() { $username = JRequest::getVar('username'); $apikey = JRequest::getVar('apikey'); $db =& JFactory::getDBO(); $qry = "REPLACE INTO #__fst_settings (setting, value) VALUES ('fsj_username','" . FSTJ3Helper::getEscaped($db, $username) . "')"; $db->setQuery($qry); $db->Query(); $qry = "REPLACE INTO #__fst_settings (setting, value) VALUES ('fsj_apikey','" . FSTJ3Helper::getEscaped($db, $apikey) . "')"; $db->setQuery($qry); $db->Query(); // update url links if (FSTAdminHelper::Is16()) { $updater = new FSTUpdater(); $updater->SortAPIKey($username, $apikey); } $mainframe = JFactory::getApplication(); $link = FSTRoute::x('index.php?option=com_fst&view=backup', false); $mainframe->redirect($link); }
$this->Item("MODERATION", "index.php?option=com_fst&view=tests", "moderate", "MODERATION"); ?> </fieldset> <!-- ##NOT_FAQS_END## --> <!-- ##NOT_FAQS_START## --> <!-- --> <!-- ##NOT_FAQS_END## --> </td> <td width="45%" valign="top"> <?php if (FSTAdminHelper::Is16()) { JHTML::addIncludePath(array(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_fst' . DS . 'html')); ?> <?php echo JHTML::_('fsjtabs.start'); $title = "Version"; echo JHTML::_('fsjtabs.panel', $title, 'cpanel-panel-' . $title, true); $ver_inst = FSTAdminHelper::GetInstalledVersion(); $ver_files = FSTAdminHelper::GetVersion(); if (FSTAdminHelper::IsFAQs()) { ?> <h3>If you like Freestyle FAQs please vote or review us at the <a href='http://extensions.joomla.org/extensions/directory-a-documentation/faq/11910' target="_blank">Joomla extensions directory</a></h3> <?php } elseif (FSTAdminHelper::IsTests()) {
static function LA_Form($item, $nolangs = false) { if (FSTAdminHelper::Is16()) { ?> <tr> <td width="135" align="right" class="key"> <label for="title"> <?php echo JText::_("JFIELD_ACCESS_LABEL"); ?> : </label> </td> <td> <?php echo FSTAdminHelper::GetAccessForm($item->access); ?> </td> </tr> <?php if (!$nolangs) { ?> <tr> <td width="135" align="right" class="key"> <label for="title"> <?php echo JText::_("JFIELD_LANGUAGE_LABEL"); ?> : </label> </td> <td> <?php echo FSTAdminHelper::GetLanguagesForm($item->language); ?> </td> </tr> <?php } } }