예제 #1
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);
 }
예제 #2
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);
 }
예제 #3
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);
 }
예제 #4
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);
 }
예제 #5
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);
 }
예제 #6
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);
 }
예제 #7
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);
 }
예제 #8
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);
     }
 }
예제 #9
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);
 }
예제 #10
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);
 }
예제 #11
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);
 }
예제 #12
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);
 }
예제 #13
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);
 }
예제 #14
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);
 }
예제 #15
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);
 }
예제 #16
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);
 }
예제 #17
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);
 }
예제 #18
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);
 }
예제 #19
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();
 }
예제 #20
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);
 }
예제 #21
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);
 }
예제 #22
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);
 }
예제 #23
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);
 }
예제 #24
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);
 }
예제 #25
0
 function display($tpl = null)
 {
     $announce = $this->get('Data');
     $isNew = $announce->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("ANNOUNCEMENT") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_announce');
     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->lists = $lists;
     $this->announce = $announce;
     parent::display($tpl);
 }
예제 #26
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("ADMINISTRATION"), 'fss_admin');
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $this->log = "";
     $task = JRequest::getVar('task');
     $updater = new FSSUpdater();
     if ($task == "saveapi") {
         return $this->SaveAPI();
     }
     if ($task == "cancellist") {
         $mainframe = JFactory::getApplication();
         $link = FSSRoute::_('index.php?option=com_fss&view=fsss', false);
         $mainframe->redirect($link);
         return;
     }
     if ($task == "update") {
         $this->log = $updater->Process();
         parent::display();
         return;
     }
     if ($task == "backup") {
         $this->log = $updater->BackupData('fss');
     }
     if ($task == "restore") {
         // process any new file uploaded
         $file = JRequest::getVar('filedata', '', 'FILES', 'array');
         if (array_key_exists('error', $file) && $file['error'] == 0) {
             $data = file_get_contents($file['tmp_name']);
             $data = unserialize($data);
             global $log;
             $log = "";
             $log = $updater->RestoreData($data);
             $this->log = $log;
             parent::display();
             return;
         }
     }
     parent::display($tpl);
 }
예제 #27
0
 function display($tpl = null)
 {
     $ticketpri = $this->get('Data');
     $isNew = $ticketpri->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("TICKET_PRIORITY") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fss_ticketpris');
     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->ticketpri = $ticketpri;
     parent::display($tpl);
 }
예제 #28
0
 function display($tpl = null)
 {
     $tpl = JRequest::getVar('tpl', $tpl);
     JToolBarHelper::title(JText::_('List Users'), 'fss_groups');
     JToolBarHelper::editList();
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $lists = $this->get('Lists');
     $document = JFactory::getDocument();
     $filter = array();
     $filter[] = JHTML::_('select.option', '', JText::_('JOOMLA_GROUP'), 'id', 'name');
     $query = 'SELECT id, title as name FROM #__usergroups ORDER BY title';
     $db = JFactory::getDBO();
     $db->setQuery($query);
     $filter = array_merge($filter, $db->loadObjectList());
     $lists['gid'] = JHTML::_('select.genericlist', $filter, 'gid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'name', $lists['gid']);
     $this->lists = $lists;
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     parent::display($tpl);
 }
예제 #29
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_("Help Text Manager"), 'fss_helptexts');
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $lists = $this->get('Lists');
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $query = 'SELECT `group` as id, `group` as title FROM #__fss_help_text GROUP BY `group` ORDER BY `group`';
     $db = JFactory::getDBO();
     $categories[] = JHTML::_('select.option', '', JText::_("SELECT_CATEGORY"), 'id', 'title');
     $db->setQuery($query);
     $categories = array_merge($categories, $db->loadObjectList());
     $lists['groups'] = JHTML::_('select.genericlist', $categories, 'group', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $lists['group']);
     $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);
 }
예제 #30
0
 function display($tpl = null)
 {
     $groupid = JRequest::getVar('groupid');
     $db = JFactory::getDBO();
     $qry = "SELECT * FROM #__fss_ticket_group WHERE id = '" . FSSJ3Helper::getEscaped($db, $groupid) . "'";
     $db->setQuery($qry);
     $group = $db->loadObject();
     $this->group = $group;
     $task = JRequest::getVar('task');
     if ($task == "setperm") {
         return $this->SetPerm();
     }
     if ($task == "toggleallemail") {
         return $this->ToggleAllEMail();
     }
     if ($task == "toggleadmin") {
         return $this->ToggleIsAdmin();
     }
     JToolBarHelper::title(JText::_("TICKET_GROUP_MEMBERS") . " - " . $group->groupname, 'fss_groups');
     //$bar= JToolBar::getInstance( 'toolbar' );
     //$bar->appendButton( 'Popup', 'new', "OLD", 'index.php?option=com_fss&view=listusers&tmpl=component&groupid='. $groupid, 630, 440 );
     JToolBarHelper::custom('popup', 'new', 'new', 'ADD_USERS', false);
     JToolBarHelper::deleteList();
     JToolBarHelper::cancel('cancellist', 'Close');
     FSSAdminHelper::DoSubToolbar();
     $this->lists = $this->get('Lists');
     $query = 'SELECT * FROM #__fss_ticket_group ORDER BY groupname';
     $db->setQuery($query);
     $filter = $db->loadObjectList();
     $this->lists['groupid'] = JHTML::_('select.genericlist', $filter, 'groupid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'groupname', $this->lists['groupid']);
     $this->groupid = $groupid;
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $document = JFactory::getDocument();
     $document->addStyleSheet(JURI::root() . 'components/com_fss/assets/css/popup.css');
     $document->addScript(JURI::root() . 'components/com_fss/assets/js/popup.js');
     parent::display($tpl);
 }