Beispiel #1
0
 function _buildQuery()
 {
     $db = JFactory::getDBO();
     $query = ' SELECT k.id, k.title, k.body, k.ordering, k.published, c.title as cattitle, f.filecount, k.rating, k.ratingdetail, k.allprods, k.created, k.modified, k.views, k.access, k.language FROM #__fss_kb_art as k LEFT JOIN #__fss_kb_cat as c ';
     $query .= ' ON k.kb_cat_id = c.id ';
     $query .= ' LEFT JOIN (SELECT count(*) as filecount, kb_art_id FROM #__fss_kb_attach GROUP BY kb_art_id) as f ON k.id = f.kb_art_id ';
     $where = array();
     if ($this->lists['search']) {
         $where[] = '(LOWER( k.title ) LIKE ' . $db->Quote('%' . FSSJ3Helper::getEscaped($db, $this->lists['search'], true) . '%', false) . ')';
     }
     if ($this->lists['order'] == 'k.ordering') {
         $order = ' ORDER BY k.ordering ' . $this->lists['order_Dir'];
     } else {
         $order = ' ORDER BY ' . $this->lists['order'] . ' ' . $this->lists['order_Dir'] . ', k.ordering';
     }
     if ($this->lists['kb_cat_id'] > 0) {
         $where[] = 'kb_cat_id = ' . $this->lists['kb_cat_id'];
     }
     if ($this->lists['prod_id'] > 0) {
         $where[] = "allprods = 1 OR k.id IN (SELECT kb_art_id FROM #__fss_kb_art_prod WHERE prod_id = '{$this->lists['prod_id']}')";
     }
     if ($this->lists['ispublished'] > -1) {
         $where[] = 'k.published = ' . $this->lists['ispublished'];
     }
     FSSAdminHelper::LA_GetFilterState();
     if (FSSAdminHelper::$filter_lang) {
         $where[] = "k.language = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_lang) . "'";
     }
     if (FSSAdminHelper::$filter_access) {
         $where[] = "k.access = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_access) . "'";
     }
     $where = count($where) ? ' WHERE ' . implode(' AND ', $where) : '';
     $query .= $where . $order;
     return $query;
 }
Beispiel #2
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("FAQ_MANAGER"), 'fss_faqs');
     JToolBarHelper::custom('autosort', 'autosort', 'autosort', 'Auto Sort', false);
     JToolBarHelper::divider();
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $lists = $this->get('Lists');
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $query = 'SELECT id, title FROM #__fss_faq_cat ORDER BY ordering';
     $db = JFactory::getDBO();
     $categories[] = JHTML::_('select.option', '0', JText::_("SELECT_CATEGORY"), 'id', 'title');
     $db->setQuery($query);
     $categories = array_merge($categories, $db->loadObjectList());
     $lists['cats'] = JHTML::_('select.genericlist', $categories, 'faq_cat_id', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $lists['faq_cat_id']);
     $categories = array();
     $categories[] = JHTML::_('select.option', '-1', JText::_("IS_PUBLISHED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '1', JText::_("PUBLISHED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '0', JText::_("UNPUBLISHED"), 'id', 'title');
     $lists['published'] = JHTML::_('select.genericlist', $categories, 'ispublished', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $lists['ispublished']);
     $this->lists = $lists;
     parent::display($tpl);
 }
Beispiel #3
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("Ticket Attachment Tools"), 'fss_cronlog');
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $task = JRequest::getVar('task');
     if ($task == "removethumb") {
         return $this->RemoveThumbs();
     }
     if ($task == "stats") {
         return $this->Stats();
     }
     if ($task == "missing") {
         return $this->RemoveMissing();
     }
     if ($task == "orphaned") {
         return $this->ShowOrphaned();
     }
     if ($task == "deleteorphaned") {
         return $this->DeleteOrphaned();
     }
     if ($task == "verifydisk") {
         return $this->VerifyDisk();
     }
     if ($task == "cleaninline") {
         return $this->CleanInline();
     }
     parent::display($tpl);
 }
Beispiel #4
0
 function _buildQuery()
 {
     $db = JFactory::getDBO();
     $query = ' SELECT f.id as id, question, answer, f.ordering as ordering, f.published as published, c.title as title, f.featured, f.access, f.language FROM #__fss_faq_faq as f LEFT JOIN #__fss_faq_cat as c ';
     $query .= ' ON f.faq_cat_id = c.id ';
     $where = array();
     if ($this->lists['search']) {
         $where[] = '(LOWER( question ) LIKE ' . $db->Quote('%' . FSSJ3Helper::getEscaped($db, $this->lists['search'], true) . '%', false) . ')';
     }
     if ($this->lists['order'] == 'f.ordering') {
         $order = ' ORDER BY f.ordering ' . $this->lists['order_Dir'];
     } else {
         $order = ' ORDER BY ' . $this->lists['order'] . ' ' . $this->lists['order_Dir'] . ', f.ordering';
     }
     if ($this->lists['faq_cat_id'] > 0) {
         $where[] = 'faq_cat_id = ' . $this->lists['faq_cat_id'];
     }
     if ($this->lists['ispublished'] > -1) {
         $where[] = 'f.published = ' . $this->lists['ispublished'];
     }
     FSSAdminHelper::LA_GetFilterState();
     if (FSSAdminHelper::$filter_lang) {
         $where[] = "f.language = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_lang) . "'";
     }
     if (FSSAdminHelper::$filter_access) {
         $where[] = "f.access = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_access) . "'";
     }
     $where = count($where) ? ' WHERE ' . implode(' AND ', $where) : '';
     $query .= $where . $order;
     //echo $query . "<br>";
     return $query;
 }
Beispiel #5
0
 function display($tpl = null)
 {
     $task = JRequest::getVar('task');
     if ($task == "removecomment") {
         return $this->DoPublishComment(2);
     }
     if ($task == "approvecomment") {
         return $this->DoPublishComment(1);
     }
     JToolBarHelper::title(JText::_("MODERATION"), 'fss_moderate');
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     FSSAdminHelper::DoSubToolbar();
     $this->lists = $this->get('Lists');
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     /*$query = 'SELECT id, title FROM #__fss_prod ORDER BY title';
     
     		$db	= JFactory::getDBO();
     		$categories[] = JHTML::_('select.option', '0', JText::_("SELECT_PRODUCT"), 'id', 'title');
     		$db->setQuery($query);
     		$categories = array_merge($categories, $db->loadObjectList());
     
     		$this->lists['prods'] = JHTML::_('select.genericlist',  $categories, 'prod_id', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $this->lists['prod_id']);*/
     $this->ident_to_name = array();
     // ##NOT_TEST_START##
     $this->ident_to_name[1] = "kb";
     $this->ident_to_name[4] = "announce";
     // ##NOT_TEST_END##
     $this->ident_to_name[5] = "test";
     $this->comment_objs = array();
     $comment_itemids = array();
     $this->ident = JRequest::getVar('ident', '');
     $sections = array();
     $sections[] = JHTML::_('select.option', '0', "-- " . JText::_("ALL_SECTIONS") . " --", 'id', 'title');
     foreach ($this->ident_to_name as $ident => $name) {
         $this->comment_objs[$ident] = new FSS_Comments($name);
         $sections[] = JHTML::_('select.option', $ident, $this->comment_objs[$ident]->handler->descriptions, 'id', 'title');
     }
     $this->lists['sections'] = JHTML::_('select.genericlist', $sections, 'ident', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $this->ident);
     $categories = array();
     $categories[] = JHTML::_('select.option', '-1', "-- " . JText::_("MOD_STATUS") . " --", 'id', 'title');
     $categories[] = JHTML::_('select.option', '0', JText::_("AWAITING_MODERATION"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '1', JText::_("ACCEPTED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '2', JText::_("DECLINED"), 'id', 'title');
     $this->lists['published'] = JHTML::_('select.genericlist', $categories, 'ispublished', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $this->lists['ispublished']);
     foreach ($this->data as &$data) {
         $ident = $data->ident;
         $comment_itemids[$ident][$data->itemid] = $data->itemid;
     }
     $db = JFactory::getDBO();
     foreach ($this->comment_objs as $ident => &$obj) {
         if (array_key_exists($ident, $comment_itemids)) {
             $idlist = $comment_itemids[$ident];
             $obj->handler->GetItemData($idlist);
         }
     }
     parent::display($tpl);
 }
Beispiel #6
0
 function _buildQuery()
 {
     $db = JFactory::getDBO();
     $query = ' SELECT c.id, c.title, c.ordering, c.published, c.description, c.image, c.parcatid, pc.title as parcattitle, c.access, c.language FROM #__fss_kb_cat as c ';
     $query .= " LEFT JOIN #__fss_kb_cat as pc on c.parcatid = pc.id ";
     $where = array();
     if ($this->lists['search']) {
         $where[] = '(LOWER( c.title ) LIKE ' . $db->Quote('%' . FSSJ3Helper::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[] = 'c.published = ' . $this->lists['ispublished'];
     }
     FSSAdminHelper::LA_GetFilterState();
     if (FSSAdminHelper::$filter_lang) {
         $where[] = "c.language = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_lang) . "'";
     }
     if (FSSAdminHelper::$filter_access) {
         $where[] = "c.access = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_access) . "'";
     }
     $where = count($where) ? ' WHERE ' . implode(' AND ', $where) : '';
     $query .= $where . $order;
     return $query;
 }
Beispiel #7
0
 function display($tpl = null)
 {
     $test = JRequest::getVar('test');
     if ($test > 0) {
         return $this->TestAccount($test);
     }
     JToolBarHelper::title(JText::_('TICKET_EMAIL_ACCOUNT_MANAGER'), 'fss_emailaccounts');
     JToolBarHelper::custom('log', 'html', 'html', 'View Log', false);
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $task = JRequest::GetVar('task');
     if ($task == "log") {
         return $this->ViewLog();
     }
     $lists = $this->get('Lists');
     $document = JFactory::getDocument();
     //JHTML::_( 'behavior.mootools' );
     //$document->addStyleSheet( JURI::base() . 'components/com_fss/assets/slimbox/slimbox.css' );
     //$document->addScript( JURI::base() .'components/com_fss/assets/slimbox/slimbox.js');
     $pubslihed = array();
     $pubslihed[] = JHTML::_('select.option', '-1', JText::_('Is_Published'), 'id', 'title');
     $pubslihed[] = JHTML::_('select.option', '1', JText::_('Published'), 'id', 'title');
     $pubslihed[] = JHTML::_('select.option', '0', JText::_('Unpublished'), 'id', 'title');
     $lists['published'] = JHTML::_('select.genericlist', $pubslihed, 'ispublished', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $lists['ispublished']);
     $this->lists = $lists;
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $this->imap_ok = function_exists("imap_open");
     $this->ini_location = $this->GetINILocation();
     parent::display($tpl);
 }
Beispiel #8
0
 function display($tpl = null)
 {
     $prod = $this->get('Data');
     $isNew = $prod->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("PRODUCT") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_prods');
     JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false);
     JToolBarHelper::spacer();
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::save2new();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSSAdminHelper::DoSubToolbar();
     $this->prod = $prod;
     $path = JPATH_SITE . DS . 'images' . DS . 'fss' . DS . 'products';
     if (!file_exists($path)) {
         mkdir($path, 0777, true);
     }
     $files = JFolder::files($path, '(.png$|.jpg$|.jpeg$|.gif$)');
     $sections[] = JHTML::_('select.option', '', JText::_("NO_IMAGE"), 'id', 'title');
     foreach ($files as $file) {
         $sections[] = JHTML::_('select.option', $file, $file, 'id', 'title');
     }
     $lists['images'] = JHTML::_('select.genericlist', $sections, 'image', 'class="inputbox" size="1" ', 'id', 'title', $prod->image);
     $this->lists = $lists;
     parent::display($tpl);
 }
Beispiel #9
0
 function _buildQuery()
 {
     $db = JFactory::getDBO();
     $query = ' SELECT a.*, u.name, u.username FROM #__fss_announce as a ';
     $query .= ' LEFT JOIN #__users as u ON a.author = u.id ';
     $where = array();
     if ($this->lists['search']) {
         $where[] = '(LOWER( title ) LIKE ' . $db->Quote('%' . FSSJ3Helper::getEscaped($db, $this->lists['search'], true) . '%', false) . ')';
     }
     $order = "";
     if ($this->lists['order']) {
         $order = ' ORDER BY ' . $this->lists['order'] . ' ' . $this->lists['order_Dir'];
     }
     if ($this->lists['ispublished'] > -1) {
         $where[] = 'published = ' . $this->lists['ispublished'];
     }
     FSSAdminHelper::LA_GetFilterState();
     if (FSSAdminHelper::$filter_lang) {
         $where[] = "language = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_lang) . "'";
     }
     if (FSSAdminHelper::$filter_access) {
         $where[] = "access = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_access) . "'";
     }
     $where = count($where) ? ' WHERE ' . implode(' AND ', $where) : '';
     $query .= $where . $order;
     return $query;
 }
Beispiel #10
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("PRODUCTS"), 'fss_prods');
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     JToolBarHelper::divider();
     if (FSS_Helper::TableExists("#__virtuemart_products_en_gb") || FSS_Helper::TableExists("#__vm_product")) {
         JToolBarHelper::custom('import_vm', 'copy', 'copy', 'IMPORT_FROM_VIRTUEMART', false);
     }
     if (FSS_Helper::TableExists("#__hikashop_product")) {
         JToolBarHelper::custom('import_hs', 'copy', 'copy', 'Import From Hika Shop', false);
     }
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $this->lists = $this->get('Lists');
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $categories = array();
     $categories[] = JHTML::_('select.option', '-1', JText::_("IS_PUBLISHED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '1', JText::_("PUBLISHED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '0', JText::_("UNPUBLISHED"), 'id', 'title');
     $this->lists['published'] = JHTML::_('select.genericlist', $categories, 'ispublished', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $this->lists['ispublished']);
     $what = JRequest::getVar('what');
     if ($what == "togglefield") {
         return $this->toggleField();
     }
     parent::display($tpl);
 }
Beispiel #11
0
 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, c.category, c.subcat FROM #__fss_prod as c ';
     $where = array();
     if ($this->lists['search']) {
         $where[] = '(LOWER( title ) LIKE ' . $db->Quote('%' . FSSJ3Helper::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'];
     }
     FSSAdminHelper::LA_GetFilterState();
     /*if (FSSAdminHelper::$filter_lang)	
     		$where[] = "language = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_lang) . "'";*/
     if (FSSAdminHelper::$filter_access) {
         $where[] = "access = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_access) . "'";
     }
     $where = count($where) ? ' WHERE ' . implode(' AND ', $where) : '';
     $query .= $where . $order;
     return $query;
 }
Beispiel #12
0
 function display($tpl = null)
 {
     $task = JRequest::getVar('task');
     if ($task == "save" || $task == "apply") {
         return $this->save($task);
     }
     if ($task == "cancel") {
         return $this->cancel();
     }
     FSS_Helper::IncludeModal();
     FSS_CSSParse::OutputCSS('components/com_fss/assets/css/bootstrap/bootstrap_fssonly.less');
     $model = $this->getModel();
     $this->item = $this->get('Item');
     $this->section = $this->get('Section');
     $this->formid = $this->get('FormID');
     if ($this->section == "com_fss.support_admin" && JRequest::getVar('nojs') != 1) {
         $document = JFactory::getDocument();
         $document->addScript(JURI::root() . 'administrator/components/com_fss/assets/js/perm.group.support_admin.js');
     }
     $this->getTexts();
     $this->form = $model->getForm($this->formid);
     JToolBarHelper::title(JText::_("Permissions") . ': <small><small>[ ' . $this->title . ' ]</small></small>', 'fss_prods');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::cancel();
     JToolBarHelper::custom("nojs", "", "", "Old Version", false);
     FSSAdminHelper::DoSubToolbar(true);
     parent::display($tpl);
 }
Beispiel #13
0
 function _buildQuery()
 {
     $db = JFactory::getDBO();
     $query = ' SELECT * FROM #__fss_faq_cat ';
     $where = array();
     if ($this->lists['search']) {
         $where[] = '(LOWER( title ) LIKE ' . $db->Quote('%' . FSSJ3Helper::getEscaped($db, $this->lists['search'], true) . '%', false) . ')';
     }
     if ($this->lists['order'] == 'ordering') {
         $order = ' ORDER BY ordering ' . $this->lists['order_Dir'];
     } else {
         $order = ' ORDER BY ' . $this->lists['order'] . ' ' . $this->lists['order_Dir'] . ', ordering';
     }
     if ($this->lists['ispublished'] > -1) {
         $where[] = 'published = ' . $this->lists['ispublished'];
     }
     FSSAdminHelper::LA_GetFilterState();
     if (FSSAdminHelper::$filter_lang) {
         $where[] = "language = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_lang) . "'";
     }
     if (FSSAdminHelper::$filter_access) {
         $where[] = "access = '" . FSSJ3Helper::getEscaped($db, FSSAdminHelper::$filter_access) . "'";
     }
     $where = count($where) ? ' WHERE ' . implode(' AND ', $where) : '';
     $query .= $where . $order;
     return $query;
 }
Beispiel #14
0
 function display($tpl = null)
 {
     JHTML::_('behavior.modal');
     $document = JFactory::getDocument();
     $document->addScriptDeclaration("\nvar fss_settings_url = '" . JRoute::_('index.php?option=com_fss&view=settings', false) . "';\n");
     $document->addScript(JURI::root() . 'administrator/components/com_fss/assets/js/settings.js');
     $what = JRequest::getString('what', '');
     $this->tab = JRequest::getVar('tab');
     if (JRequest::getVar('task') == "cancellist") {
         $mainframe = JFactory::getApplication();
         $link = FSSRoute::_('index.php?option=com_fss&view=fsss', false);
         $mainframe->redirect($link);
         return;
     }
     $settings = FSS_Settings::GetAllViewSettings();
     // CHANGE
     $db = JFactory::getDBO();
     if ($what == "save") {
         $data = JRequest::get('POST', JREQUEST_ALLOWRAW);
         foreach ($data as $setting => $value) {
             if (array_key_exists($setting, $settings)) {
                 $settings[$setting] = $value;
             }
         }
         foreach ($settings as $setting => $value) {
             if (!array_key_exists($setting, $data)) {
                 $settings[$setting] = 0;
                 $value = 0;
             }
             $qry = "REPLACE INTO #__fss_settings_view (setting, value) VALUES ('";
             $qry .= FSSJ3Helper::getEscaped($db, $setting) . "','";
             $qry .= FSSJ3Helper::getEscaped($db, $value) . "')";
             $db->setQuery($qry);
             $db->Query();
         }
         $link = 'index.php?option=com_fss&view=settingsview#' . $this->tab;
         if (JRequest::getVar('task') == "save") {
             $link = 'index.php?option=com_fss';
         }
         $mainframe = JFactory::getApplication();
         $mainframe->redirect($link, JText::_("View_Settings_Saved"));
         exit;
     } else {
         $document = JFactory::getDocument();
         $document->addStyleSheet(JURI::root() . 'administrator/components/com_fss/assets/css/js_color_picker_v2.css');
         $document->addScript(JURI::root() . 'administrator/components/com_fss/assets/js/color_functions.js');
         $document->addScript(JURI::root() . 'administrator/components/com_fss/assets/js/js_color_picker_v2.js');
         $this->settings = $settings;
         JToolBarHelper::title(JText::_("FREESTYLE_SUPPORT_PORTAL") . ' - ' . JText::_("VIEW_SETTINGS"), 'fss_viewsettings');
         JToolBarHelper::apply();
         JToolBarHelper::save();
         JToolBarHelper::cancel('cancellist');
         FSSAdminHelper::DoSubToolbar();
         parent::display($tpl);
     }
 }
Beispiel #15
0
 function display($tpl = null)
 {
     $mainmenu = $this->get('Data');
     $isNew = $mainmenu->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("MENU_ITEM") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_menu');
     JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false);
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSSAdminHelper::DoSubToolbar();
     $this->mainmenu = $mainmenu;
     $path = JPATH_SITE . DS . 'images' . DS . 'fss' . DS . 'menu';
     if (!file_exists($path)) {
         mkdir($path, 0777, true);
     }
     $files = JFolder::files($path, '(.png$|.jpg$|.jpeg$|.gif$)');
     $sections[] = JHTML::_('select.option', '', JText::_("NO_IMAGE"), 'id', 'title');
     foreach ($files as $file) {
         $sections[] = JHTML::_('select.option', $file, $file, 'id', 'title');
     }
     $lists['images'] = JHTML::_('select.genericlist', $sections, 'icon', 'class="inputbox" size="1" ', 'id', 'title', $mainmenu->icon);
     if ($mainmenu->itemtype != 7) {
         $menus = FSS_GetMenus($mainmenu->itemtype);
         $menuitems = array();
         foreach ($menus as $menu) {
             $menuitems[] = JHTML::_('select.option', $menu->id . "|" . $menu->link, $menu->title . " (Itemid = " . $menu->id . ")", 'id', 'title');
         }
         if (count($menuitems) > 1) {
             $lists['menuitems'] = JHTML::_('select.genericlist', $menuitems, 'menuitem', 'class="inputbox" size="1" onchange="changeMenuItem();"', 'id', 'title', $mainmenu->itemid . "|" . $mainmenu->link);
         } else {
             if (count($menuitems) == 1) {
                 $lists['menuitems'] = JHTML::_('select.genericlist', $menuitems, 'menuitem', 'class="inputbox" size="1" onchange="changeMenuItem();" style="display:none;"', 'id', 'title', $mainmenu->itemid . "|" . $mainmenu->link);
                 $lists['menuitems'] = "<div><b>" . JText::_('SINGLE_MENU_ITEM') . "</b> - " . $menuitems[0]->title . "</div>";
             } else {
                 $lists['menuitems'] = "<div><b>" . JText::_('NO_MENU_ITEMS_FOUND') . "</b></div>";
             }
         }
     }
     $types = array();
     $types[] = JHTML::_('select.option', '7', JText::_('IT_LINK'), 'id', 'title');
     for ($i = 1; $i < 11; $i++) {
         if ($i == 7) {
             continue;
         }
         $types[] = JHTML::_('select.option', $i, $this->ItemType($i), 'id', 'title');
     }
     $lists['types'] = JHTML::_('select.genericlist', $types, 'itemtype', 'class="inputbox" size="1" ', 'id', 'title', $mainmenu->itemtype);
     $this->lists = $lists;
     parent::display($tpl);
 }
Beispiel #16
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("EMAIL_TEMPLATE_MANAGER"), 'fss_emails');
     //JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     //JToolBarHelper::addNew();
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $this->data = $this->get('Data');
     parent::display($tpl);
 }
Beispiel #17
0
 function display($tpl = null)
 {
     if (JRequest::getString('task') == "prods") {
         return $this->displayProds();
     }
     $ticketdept = $this->get('Data');
     $isNew = $ticketdept->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("TICKET_DEPARTMENT") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_ticketdepts');
     JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false);
     JToolBarHelper::spacer();
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::save2new();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSSAdminHelper::DoSubToolbar();
     $db = JFactory::getDBO();
     $lists['allprod'] = JHTML::_('select.booleanlist', 'allprods', array('class' => "inputbox", 'size' => "1", 'onclick' => "DoAllProdChange();"), intval($ticketdept->allprods));
     $query = "SELECT * FROM #__fss_prod ORDER BY title";
     $db->setQuery($query);
     $products = $db->loadObjectList();
     $query = "SELECT * FROM #__fss_ticket_dept_prod WHERE ticket_dept_id = " . FSSJ3Helper::getEscaped($db, $ticketdept->id);
     $db->setQuery($query);
     $selprod = $db->loadAssocList('prod_id');
     $this->assign('allprods', $ticketdept->allprods);
     $prodcheck = "";
     foreach ($products as $product) {
         $checked = false;
         if (array_key_exists($product->id, $selprod)) {
             $prodcheck .= "<input type='checkbox' name='prod_" . $product->id . "' checked />" . $product->title . "<br>";
         } else {
             $prodcheck .= "<input type='checkbox' name='prod_" . $product->id . "' />" . $product->title . "<br>";
         }
     }
     $lists['products'] = $prodcheck;
     $path = JPATH_SITE . DS . 'images' . DS . 'fss' . DS . 'departments';
     if (!file_exists($path)) {
         mkdir($path, 0777, true);
     }
     $files = JFolder::files($path, '(.png$|.jpg$|.jpeg$|.gif$)');
     $sections[] = JHTML::_('select.option', '', JText::_("NO_IMAGE"), 'id', 'title');
     foreach ($files as $file) {
         $sections[] = JHTML::_('select.option', $file, $file, 'id', 'title');
     }
     $lists['images'] = JHTML::_('select.genericlist', $sections, 'image', 'class="inputbox" size="1" ', 'id', 'title', $ticketdept->image);
     $this->lists = $lists;
     $this->ticketdept = $ticketdept;
     parent::display($tpl);
 }
Beispiel #18
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("TICKET_STATUS"), 'fss_ticketstatuss');
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $this->lists = $this->get('Lists');
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     parent::display($tpl);
 }
Beispiel #19
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("Plugins"), 'fss_moderate');
     FSSAdminHelper::DoSubToolbar();
     $task = JRequest::getVar('task');
     if ($task == "enable") {
         return $this->enable(1);
     }
     if ($task == "disable") {
         return $this->enable(0);
     }
     $this->plugins = $this->LoadPlugins();
     parent::display($tpl);
 }
Beispiel #20
0
 function display($tpl = null)
 {
     FSS_CSSParse::OutputCSS('components/com_fss/assets/css/bootstrap/bootstrap_fssonly.less');
     if (JRequest::getVar('hide_template_warning')) {
         $db = JFactory::getDBO();
         $sql = "REPLACE INTO #__fss_settings (setting, value) VALUES ('bootstrap_template', '" . $db->escape(FSS_Helper::GetTemplate()) . "')";
         $db->setQuery($sql);
         $db->Query();
         JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_fss&view=fsss', false));
     }
     JToolBarHelper::title(JText::_('FREESTYLE_SUPPORT_PORTAL'), 'fss.png');
     FSSAdminHelper::DoSubToolbar();
     parent::display($tpl);
 }
Beispiel #21
0
 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     JHtml::_('behavior.framework');
     JHTML::_('behavior.tooltip');
     $task = JRequest::getVar('task');
     if ($task == "test") {
         return $this->doTest();
     }
     JToolBarHelper::title(JText::_("EMail Trim Test"), 'fss_trimtest');
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     parent::display($tpl);
 }
Beispiel #22
0
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $item = $this->get('Data');
     $text = JText::_("EDIT");
     JToolBarHelper::title(JText::_("Help Text") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_helptexts');
     JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false);
     JToolBarHelper::spacer();
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::cancel('cancel', 'Close');
     FSSAdminHelper::DoSubToolbar();
     $this->item = $item;
     parent::display($tpl);
 }
Beispiel #23
0
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $faq = $this->get('Data');
     $isNew = $faq->id < 1;
     $text = JText::_("EDIT");
     JToolBarHelper::title(JText::_("EMAIL_TEMPLATE") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_emails');
     JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false);
     JToolBarHelper::spacer();
     JToolBarHelper::save();
     JToolBarHelper::cancel('cancel', 'Close');
     FSSAdminHelper::DoSubToolbar();
     $this->email = $faq;
     parent::display($tpl);
 }
Beispiel #24
0
 function display($tpl = null)
 {
     FSS_CSSParse::OutputCSS('components/com_fss/assets/css/bootstrap/bootstrap_fssonly.less');
     JToolBarHelper::title(JText::_("Permissions"), 'fss_users');
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     //JToolBarHelper::addNew("OK");
     $bar = JToolbar::getInstance('toolbar');
     $bar->appendButton('Standard', 'new', "FSS_Add_User", "add", false);
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $this->lists = $this->get('Lists');
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     parent::display($tpl);
 }
Beispiel #25
0
 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     JHtml::_('behavior.framework');
     JHTML::_('behavior.tooltip');
     $task = JRequest::getVar('task');
     JToolBarHelper::title(JText::_("EMail_Log"), 'fss_cronlog');
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     if ($task == "cancellist") {
         return $this->BackToEmails();
     }
     if ($task == "clear") {
         return $this->ClearCronLog();
     }
     $this->DisplayList();
 }
Beispiel #26
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("ANNOUNCEMENTS"), 'fss_announce');
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $this->lists = $this->get('Lists');
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $categories = array();
     $categories[] = JHTML::_('select.option', '-1', JText::_("IS_PUBLISHED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '1', JText::_("PUBLISHED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '0', JText::_("UNPUBLISHED"), 'id', 'title');
     $this->lists['published'] = JHTML::_('select.genericlist', $categories, 'ispublished', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $this->lists['ispublished']);
     parent::display($tpl);
 }
Beispiel #27
0
 function display($tpl = null)
 {
     $ticketgroup = $this->get('Data');
     $isNew = $ticketgroup->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("TICKET_GROUP") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_groups');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::save2new();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSSAdminHelper::DoSubToolbar();
     $db = JFactory::getDBO();
     $idents = array();
     $idents[] = JHTML::_('select.option', '0', JText::_("VIEW_NONE"), 'id', 'title');
     $idents[] = JHTML::_('select.option', '1', JText::_("VIEW"), 'id', 'title');
     $idents[] = JHTML::_('select.option', '2', JText::_("VIEW_REPLY"), 'id', 'title');
     $idents[] = JHTML::_('select.option', '3', JText::_("VIEW_REPLY_CLOSE"), 'id', 'title');
     $this->allsee = JHTML::_('select.genericlist', $idents, 'allsee', ' class="inputbox" size="1"', 'id', 'title', $ticketgroup->allsee);
     $this->ticketgroup = $ticketgroup;
     $this->allprod = JHTML::_('select.booleanlist', 'allprods', array('class' => "inputbox", 'size' => "1", 'onclick' => "DoAllProdChange();"), intval($ticketgroup->allprods));
     $query = "SELECT * FROM #__fss_prod ORDER BY title";
     $db->setQuery($query);
     $products = $db->loadObjectList();
     $query = "SELECT * FROM #__fss_ticket_group_prod WHERE group_id = " . FSSJ3Helper::getEscaped($db, $ticketgroup->id);
     $db->setQuery($query);
     $selprod = $db->loadAssocList('prod_id');
     $this->assign('allprods', $ticketgroup->allprods);
     $prodcheck = "";
     foreach ($products as $product) {
         $checked = false;
         if (array_key_exists($product->id, $selprod)) {
             $prodcheck .= "<input type='checkbox' name='prod_" . $product->id . "' checked />" . $product->title . "<br>";
         } else {
             $prodcheck .= "<input type='checkbox' name='prod_" . $product->id . "' />" . $product->title . "<br>";
         }
     }
     $this->products = $prodcheck;
     parent::display($tpl);
 }
Beispiel #28
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("KNOWLEDGE_BASE_ARTICLES"), 'fss_kb');
     JToolBarHelper::custom('resetviews', 'resetviews', 'resetviews', 'KB_RESET_VIEWS', false);
     JToolBarHelper::custom('resetrating', 'resetrating', 'resetrating', 'KB_RESET_RATING', false);
     JToolBarHelper::custom('autosort', 'autosort', 'autosort', 'Auto Sort', false);
     JToolBarHelper::divider();
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $lists = $this->get('Lists');
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $query = 'SELECT id, title, parcatid, ordering FROM #__fss_kb_cat ORDER BY ordering';
     $db = JFactory::getDBO();
     $categories[] = JHTML::_('select.option', '0', JText::_("SELECT_CATEGORY"), 'id', 'title');
     $db->setQuery($query);
     // nest the data
     $data = $db->loadObjectList();
     require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'nested.php';
     $data = FSS_Nested_Helper::BuildNest($data, "id", "parcatid", "ordering");
     foreach ($data as &$temp) {
         $temp->title = str_repeat("|&mdash;&thinsp;", $temp->level) . $temp->title;
     }
     $categories = array_merge($categories, $data);
     $lists['cats'] = JHTML::_('select.genericlist', $categories, 'kb_cat_id', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $lists['kb_cat_id']);
     $categories = array();
     $categories[] = JHTML::_('select.option', '-1', JText::_("IS_PUBLISHED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '1', JText::_("PUBLISHED"), 'id', 'title');
     $categories[] = JHTML::_('select.option', '0', JText::_("UNPUBLISHED"), 'id', 'title');
     $lists['published'] = JHTML::_('select.genericlist', $categories, 'ispublished', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $lists['ispublished']);
     $query = 'SELECT id, title FROM #__fss_prod ORDER BY ordering';
     $db = JFactory::getDBO();
     $categories = array();
     $categories[] = JHTML::_('select.option', '0', JText::_("SELECT_PRODUCT"), 'id', 'title');
     $db->setQuery($query);
     $categories = array_merge($categories, $db->loadObjectList());
     $lists['prods'] = JHTML::_('select.genericlist', $categories, 'prod_id', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $lists['prod_id']);
     $this->lists = $lists;
     parent::display($tpl);
 }
Beispiel #29
0
 function display($tpl = null)
 {
     $task = JRequest::getVar('task');
     if ($task == "save" || $task == "apply" || $task == "save2new") {
         return $this->save($task);
     }
     if ($task == "cancel") {
         return $this->cancel();
     }
     FSS_CSSParse::OutputCSS('components/com_fss/assets/css/bootstrap/bootstrap_fssonly.less');
     $model = $this->getModel();
     $user = $this->get('Data');
     $isNew = $user->id < 1;
     $model->user = $user;
     $db = JFactory::getDBO();
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("USER") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_users');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::save2new();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSSAdminHelper::DoSubToolbar();
     $username = !empty($user->name) ? $user->name : "";
     $userid = !empty($user->user_id) ? $user->user_id : 0;
     $input = "<input type='hidden' name='user_id' id='user_id' value='" . $userid . "' class='input-mini' />";
     $input .= "<input type='text' name='user_name' id='user_name' value='" . $username . "' class='input-xlarge' disabled='disabled' />";
     $newLink = JRoute::_('index.php?option=com_fss&view=listusers&tmpl=component&tpl=fuser');
     if ($isNew) {
         $input .= "&nbsp;<a href='{$newLink}' class='btn btn-default show_modal_iframe'>Choose User</a>";
     }
     $this->users = $input;
     $this->user = $user;
     $this->sort_load_data();
     $this->form = $model->getForm();
     FSS_Helper::IncludeModal();
     parent::display($tpl);
 }
Beispiel #30
0
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $glossary = $this->get('Data');
     $isNew = $glossary->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("GLOSSARY_ITEM") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_glossary');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::save2new();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSSAdminHelper::DoSubToolbar();
     $this->glossary = $glossary;
     parent::display($tpl);
 }