function Input($current, $params, $context, $id) { if (array_key_exists("custom_" . $id . "_raw", $_POST)) { $current = $_POST["custom_" . $id . "_raw"]; } $params = $this->parseParams($params); FSS_Helper::StylesAndJS(array('calendar')); $display = $current; if ($params->today_default && ($current == "" || $current == 0)) { if ($params->use_time) { $current = date("Y-m-d H:i:s"); } else { $current = date("Y-m-d"); } // need to convert the date into cal format specified if ($params->format) { $display = date($this->DXtoPhpFormat($params->format), strtotime($current)); } else { $display = $current; } } else { if ($current != "") { $display = date($this->DXtoPhpFormat($params->format), strtotime($current)); } } FSS_Translate_Helper::CalenderLocale(); $output = "<input type='text' name='custom_{$id}' id='custom_{$id}' value='{$display}'>"; $output .= "<input type='hidden' name='custom_{$id}_raw' id='custom_{$id}_raw' value='{$current}'>"; $output .= "<script>"; $output .= "\n\t\tjQuery(document).ready(function () {\n\t\t\tmyCalendar = new dhtmlXCalendarObject('custom_{$id}','omega');\n\t\t\tmyCalendar.loadUserLanguage('" . FSS_Translate_Helper::CalenderLocaleCode() . "');\n\t\t\tmyCalendar.attachEvent('onClick',function(date){\n\t\t\t\t\n"; if ($params->use_time) { $output .= " var raw = this.getFormatedDate('%Y-%m-%d %H:%i:%s');\n"; } else { $output .= " var raw = this.getFormatedDate('%Y-%m-%d');\n"; } $output .= "\n\t\t\t\tjQuery('#custom_{$id}_raw').val(raw);\n\t\t\t})\n\t\t\t"; if ($params->no_past) { $output .= "myCalendar.setSensitiveRange('" . date("Y-m-d") . "', null);\n"; } if ($params->format) { $output .= "myCalendar.setDateFormat('{$params->format}');\n"; } if (!$params->use_time) { $output .= "myCalendar.hideTime();\n"; } $output .= "});"; $output .= "</script>"; return $output; }
static function getDataList($sort, $key, $query, $translate = false) { if (!array_key_exists($key, self::$data_lists)) { $db = JFactory::getDBO(); //echo $query."<br>"; $db->setQuery($query); self::$data_lists[$key]['s'] = $db->loadObjectList(); self::$data_lists[$key]['i'] = array(); if ($translate) { FSS_Translate_Helper::Tr(self::$data_lists[$key]['s']); } foreach (self::$data_lists[$key]['s'] as $item) { self::$data_lists[$key]['i'][$item->id] = $item; } } if ($sort) { self::$data_lists[$key]['s']; } return self::$data_lists[$key]['i']; }
echo $tab_style; ?> ><table class='table table-bordered table-ticketborders table-condensed'> <?php $this->listHeader(); ?> <?php foreach ($this->tickets as $ticket) { ?> <?php $ticket->status = FSS_Translate_Helper::TrF('title', $ticket->status, $ticket->str); $ticket->department = FSS_Translate_Helper::TrF('title', $ticket->department, $ticket->dtr); $ticket->priority = FSS_Translate_Helper::TrF('title', $ticket->priority, $ticket->ptl); $ticket->category = FSS_Translate_Helper::TrF('title', $ticket->category, $ticket->ctr); $ticket->product = FSS_Translate_Helper::TrF('title', $ticket->product, $ticket->prtr); ?> <?php if (SupportUsers::getSetting("group_products")) { if ($ticket->prod_id != $grp_prod) { if ($grp_open == 1) { echo "</table></div>"; } $grp_open = 0; echo $this->grouping("prod", $ticket->product, $ticket); $grp_prod = $ticket->prod_id; $grp_dept = -1; $grp_cat = -1; $grp_group = -1; }
static function &ParseTemplate($template, &$ticket, $subject, $body, $ishtml, $foruser = false) { $handler = self::GetHandler($ticket['admin_id'], $template['tmpl']); $custrec = self::GetUser($ticket['user_id']); $subject = trim(str_ireplace("re:", "", $subject)); $vars[] = self::BuildVar('subject', $subject); $body = FSS_Helper::ParseBBCode($body, null, false, false, $foruser); $body = str_replace("<", "XXXLTXXX", $body); $body = str_replace(">", "XXXGTXXX", $body); $vars[] = self::BuildVar('body', $body); $vars[] = self::BuildVar('reference', $ticket['reference']); $vars[] = self::BuildVar('password', $ticket['password']); foreach (self::$extra_vars as $key => $value) { $vars[] = self::BuildVar($key, $value); } if ($ticket['user_id'] == 0) { $vars[] = self::BuildVar('user_name', $ticket['unregname']); $vars[] = self::BuildVar('user_username', JText::_("UNREGISTERED")); $vars[] = self::BuildVar('user_email', $ticket['email']); } else { $vars[] = self::BuildVar('user_name', $custrec['name']); $vars[] = self::BuildVar('user_username', $custrec['username']); $vars[] = self::BuildVar('user_email', $custrec['email']); } $vars[] = self::BuildVar('handler_name', $handler['name']); $vars[] = self::BuildVar('handler_username', $handler['username']); $vars[] = self::BuildVar('handler_email', $handler['email']); $vars[] = self::BuildVar('ticket_id', $ticket['id']); if ($foruser) { $statuss = SupportHelper::getStatuss(false); $status = $statuss[$ticket['ticket_status_id']]; if ($status->combine_with > 0) { $status = $statuss[$status->combine_with]; } FSS_Translate_Helper::TrO($status); $text = $status->title; if ($status->userdisp) { $text = $status->userdisp; } $vars[] = self::BuildVar('status', $text); } else { $vars[] = self::BuildVar('status', self::GetStatus($ticket['ticket_status_id'])); } $vars[] = self::BuildVar('priority', self::GetPriority($ticket['ticket_pri_id'])); $vars[] = self::BuildVar('category', self::GetCategory($ticket['ticket_cat_id'])); $vars[] = self::BuildVar('department', self::GetDepartment($ticket['ticket_dept_id'])); $vars[] = self::BuildVar('department_desc', strip_tags(self::GetDepartment($ticket['ticket_dept_id'], 'description'))); $vars[] = self::BuildVar('department_desc_html', self::GetDepartment($ticket['ticket_dept_id'], 'description')); $vars[] = self::BuildVar('product', self::GetProduct($ticket['prod_id'])); $vars[] = self::BuildVar('product_desc', strip_tags(self::GetProduct($ticket['prod_id'], 'description'))); $vars[] = self::BuildVar('product_desc_html', self::GetProduct($ticket['prod_id'], 'description')); if (strpos($template['body'], "{messagehistory}") > 0) { $messages = self::GetMessageHist($ticket['id']); $text = self::ParseMessageRows($messages, $ishtml, $foruser); $vars[] = self::BuildVar('messagehistory', $text); } $uri = JURI::getInstance(); $baseUrl = FSS_Settings::get('support_email_no_domain') ? "" : $uri->toString(array('scheme', 'host', 'port')); if (in_array(FSS_Settings::get('support_unreg_type'), array(0, 1))) { $vars[] = self::BuildVar('haspassword', 1); } else { $vars[] = self::BuildVar('haspassword', 0); } // choose which user link to generate if ($ticket['user_id'] < 1) { // unregistered user $url = 'index.php?option=com_fss&t=' . $ticket['id'] . "&p=" . $ticket['password']; if (FSS_Settings::get('support_email_link_unreg') > 0) { // add fixed item id if needed $url .= "&Itemid=" . FSS_Settings::get('support_email_link_unreg'); } $vars[] = self::BuildVar('ticket_link', $baseUrl . JRoute::_($url, false)); } else { // registered user $url = 'index.php?option=com_fss&view=ticket&layout=view&ticketid=' . $ticket['id']; if (FSS_Settings::get('support_email_include_autologin')) { $url .= "&login={login_code}"; } if (FSS_Settings::get('support_email_link_reg') > 0) { // add fixed item id if needed $url .= "&Itemid=" . FSS_Settings::get('support_email_link_reg'); } $vars[] = self::BuildVar('ticket_link', $baseUrl . JRoute::_($url, false)); } // ticket admin link $url = 'index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=' . $ticket['id']; if (FSS_Settings::get('support_email_link_admin') > 0) { // add fixed item id if needed $url .= "&Itemid=" . FSS_Settings::get('support_email_link_admin'); } $vars[] = self::BuildVar('admin_link', $baseUrl . JRoute::_($url, false)); // email pending link $url = 'index.php?option=com_fss&view=admin_support&layout=emails'; if (FSS_Settings::get('support_email_link_pending') > 0) { // add fixed item id if needed $url .= "&Itemid=" . FSS_Settings::get('support_email_link_pending'); } $vars[] = self::BuildVar('email_pending_link', $baseUrl . JRoute::_($url, false)); $vars[] = self::BuildVar('websitetitle', FSS_Helper::getSiteName()); // need to add the tickets custom fields to the output here $fields = FSSCF::GetAllCustomFields(true); $values = FSSCF::GetTicketValues($ticket['id'], $ticket); foreach ($fields as $fid => &$field) { $name = "custom_" . $fid; $value = ""; if (array_key_exists($fid, $values)) { $value = (string) $values[$fid]['value']; } $fieldvalues = array(); $fieldvalues[0]['field_id'] = $fid; $fieldvalues[0]['value'] = $value; // only do area output processing if we are in html mode if ($field['type'] != "area" || $ishtml) { $newvalue = FSSCF::FieldOutput($field, $fieldvalues, ''); if ($newvalue) { $value = $newvalue; } } $vars[] = self::BuildVar($name, $value); $vars[] = self::BuildVar("custom_" . $field['alias'], $value); } $email['subject'] = self::ParseText($template['subject'], $vars); $email['body'] = self::ParseText($template['body'], $vars); self::$last_vars = $vars; if ($template['ishtml']) { $email['body'] = FSS_Helper::MaxLineLength($email['body']); } else { $email['body'] = str_replace("<br />", "\n", $email['body']); $email['body'] = html_entity_decode($email['body']); $email['body'] = preg_replace_callback("/(&#[0-9]+;)/", array("FSS_Helper", "email_decode_utf8"), $email['body']); $email['body'] = strip_tags($email['body']); } $email['body'] = str_replace("XXXLTXXX", "<", $email['body']); $email['body'] = str_replace("XXXGTXXX", ">", $email['body']); return $email; }
function &getAppliesTo() { $db = JFactory::getDBO(); $kbartid = FSS_Input::getInt('kbartid'); $query = "SELECT p.* FROM #__fss_kb_art_prod as ap LEFT JOIN #__fss_prod as p ON ap.prod_id = p.id WHERE p.published = 1 AND p.inkb = 1 AND ap.kb_art_id = " . FSSJ3Helper::getEscaped($db, $kbartid); $query .= ' AND p.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')'; $db->setQuery($query); $rows = $db->loadAssocList(); FSS_Translate_Helper::Tr($rows); if ($this->_art['allprods'] > 0) { $allprod = array(); $allprod['title'] = JText::_("ALL_PRODUCTS"); $rows[] = $allprod; } return $rows; }
?> </option> <?php } ?> </select> <?php } else { ?> <span style='color:<?php echo FSS_Helper::escape($this->ticket->pcolor); ?> '> <?php echo FSS_Translate_Helper::TrF('title', $this->ticket->priority, $this->ticket->ptl); ?> </span> <?php } ?> </td> <?php FSS_Table::ColEnd(); } ?> <?php FSS_Table::TableClose(); $grouping = ""; $open = false;
<?php /** * @package Freestyle Joomla * @author Freestyle Joomla * @copyright (C) 2013 Freestyle Joomla * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ defined('_JEXEC') or die; FSS_Translate_Helper::TrSingle($product); ?> <div class='media kb_prod_<?php echo $product['id']; ?> test_prod_accordion'> <?php $link = "#"; if ($this->test_show_prod_mode != "inline" && $this->test_show_prod_mode != "accordian") { $link = FSSRoute::_('index.php?option=com_fss&view=test&prodid=' . $product['id']); } // FIX LINK ?> <?php if ($product['image']) { ?> <div class='pull-left'> <a href="<?php echo $link;
echo $pri['title']; ?> </option> <?php } ?> </select> </form> <?php } else { ?> <span style='color:<?php echo $this->ticket['pcolor']; ?> '><?php echo FSS_Translate_Helper::TrF('title', $this->ticket['pri'], $this->ticket['ptr']); ?> </span> <?php } ?> </td> <?php } ?> <?php $mc->End(); ?> <?php
function loadPDC() { $this->products = SupportHelper::getProducts(); $this->departments = SupportHelper::getDepartments(); $this->categories = SupportHelper::getCategories(); $prods = array(); $prods[] = JHTML::_('select.option', '0', JText::_("SELECT_PRODUCT"), 'id', 'title'); $prods = array_merge($prods, $this->products); $this->products_select = JHTML::_('select.genericlist', $prods, 'prodid', 'class="input-medium" size="1" onchange="document.mainform.submit( );"', 'id', 'title', $this->prodid); $depts = array(); $depts[] = JHTML::_('select.option', '0', JText::_("SELECT_DEPARTMENT"), 'id', 'title'); $depts = array_merge($depts, $this->departments); $this->departments_select = JHTML::_('select.genericlist', $depts, 'deptid', 'class="input-medium" size="1" onchange="document.mainform.submit( );"', 'id', 'title', $this->deptid); $cats = array(); $cats[] = JHTML::_('select.option', '0', JText::_("SELECT_CATEGORY"), 'id', 'title'); $cats = array_merge($cats, $this->categories); $this->categories_select = JHTML::_('select.genericlist', $cats, 'catid', 'class="input-medium" size="1" onchange="document.mainform.submit( );"', 'id', 'title', $this->catid); $modes = array(); $modes[] = JHTML::_('select.option', '0', JText::_("VIEW_TICKETS"), 'id', 'title'); $modes[] = JHTML::_('select.option', '1', JText::_("ASSIGN_TICKETS"), 'id', 'title'); $this->mode_select = JHTML::_('select.genericlist', $modes, 'mode', 'class="input-medium" size="1" onchange="document.mainform.submit( );"', 'id', 'title', $this->mode); $this->statuss = SupportHelper::getStatuss(); FSS_Translate_Helper::Tr($this->statuss); $this->status_select = JHTML::_('select.genericlist', $this->statuss, 'status', 'class="input-medium hide" size="1" onchange="document.mainform.submit( );" id="cur_status"', 'id', 'title', $this->status); $this->status_obj = FSS_Ticket_Helper::GetStatusByID($this->status); FSS_Translate_Helper::TrSingle($this->status_obj); }
function getDepartments() { // if data hasn't already been obtained, load it if (empty($this->_departments)) { $query = $this->_buildDeptQuery(); if (FSS_Settings::get('support_advanced_department') == 1) { $this->_db->setQuery($query, $this->getState('limitstart'), $this->getState('limit_prod')); } else { $this->_db->setQuery($query); } $this->_departments = $this->_db->loadAssocList(); FSS_Translate_Helper::Tr($this->_departments); } return $this->_departments; }
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(); }
static function &GetAllCustomFields($values = true) { $values = true; $db = JFactory::getDBO(); if (empty(FSSCF::$allfields)) { // get a list of all available fields $qry = "SELECT * FROM #__fss_field as f WHERE f.published = 1 AND f.ident = 0 "; $qry .= " ORDER BY f.grouping, f.ordering "; $db->setQuery($qry); $rows = $db->loadAssocList("id"); FSS_Translate_Helper::Tr($rows); $indexes = array(); if (count($rows) > 0) { foreach ($rows as $index => &$row) { $indexes[] = FSSJ3Helper::getEscaped($db, $index); } } if ($values) { $indexlist = implode(",", $indexes); if (count($indexes) == 0) { $indexlist = "0"; } $qry = "SELECT * FROM #__fss_field_values WHERE field_id IN ({$indexlist})"; $db->setQuery($qry); $values = $db->loadAssocList(); if (count($values) > 0) { foreach ($values as &$value) { $field_id = $value['field_id']; $rows[$field_id]['values'][] = $value['value']; if ($value['data']) { $rows[$field_id]['values'][] = 'plugindata=' . $value['data']; } } } } FSSCF::$allfields = $rows; } return FSSCF::$allfields; }
require JModuleHelper::getLayoutPath('mod_fss_catprods', 'faqcat'); } else { if ($listtype == 'kbprod') { $query = "SELECT * FROM #__fss_prod"; $where = array(); $where[] = "published = 1"; $where[] = "inkb = 1"; $user = JFactory::getUser(); $where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'; if (count($where) > 0) { $query .= " WHERE " . implode(" AND ", $where); } $query .= " ORDER BY ordering"; $db->setQuery($query); $rows = $db->loadAssocList(); FSS_Translate_Helper::Tr($rows); require JModuleHelper::getLayoutPath('mod_fss_catprods', 'kbprod'); } else { if ($listtype == 'kbcats') { $prodid = $params->get('prodid'); if ($prodid == -1) { $prodid = FSS_Input::getInt('prodid'); } if ($prodid > 0) { $qry1 = "SELECT a.kb_cat_id FROM #__fss_kb_art as a LEFT JOIN #__fss_kb_art_prod as p ON a.id = p.kb_art_id WHERE p.prod_id = '" . FSSJ3Helper::getEscaped($db, $prodid) . "' AND published = 1 GROUP BY a.kb_cat_id"; $qry2 = "SELECT a.kb_cat_id FROM #__fss_kb_art as a WHERE a.allprods = '1' AND published = 1 GROUP BY a.kb_cat_id"; $query = "({$qry1}) UNION ({$qry2})"; $db->setQuery($query); $rows = $db->loadAssocList('kb_cat_id'); $catids = array(); foreach ($rows as &$rows) {
} if (!array_key_exists($status->id, $counts)) { continue; } if ($counts[$status->id] < 1) { continue; } $output++; ?> <li> <a href="<?php echo FSSRoute::_('index.php?option=com_fss&view=ticket&layout=support&tickets=' . $status->id); ?> "> <?php echo FSS_Translate_Helper::TrF("userdisp", $status->title, $status->translation) . " (" . $counts[$status->id] . ")"; ?> </a> </li> <?php } ?> <?php if ($output == 0) { ?> <li> <?php echo JText::_('YOU_CURRENTLY_HAVE_NO_SUPPORT_TICKETS'); ?> </li> <?php
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(); }
static function forUser(&$parser, $ticket, $custom_fields = null) { $parser->Clear(); if ($ticket) { // overwrite status of ticket when combined $statuss = SupportHelper::getStatuss(false); FSS_Translate_Helper::Tr($statuss); $cur_status = $statuss[$ticket->ticket_status_id]; if ($cur_status->combine_with > 0) { $new_status = $statuss[$cur_status->combine_with]; $ticket->color = $new_status->color; $ticket->status = $new_status->title; if ($new_status->userdisp) { $ticket->status = $new_status->userdisp; } $ticket->ticket_status_id = $new_status->id; } else { if ($cur_status->userdisp) { $ticket->status = $cur_status->userdisp; } } } self::core($parser, $ticket, $custom_fields); if ($ticket) { // TODO TODO TODO : //$title = $ticket->getTitle(); $title = self::parseTitle($ticket->title, $ticket->id); //$title = $ticket->title; $parser->SetVar('link', FSSRoute::_('index.php?option=com_fss&view=ticket&layout=view&ticketid=' . $ticket->id)); $parser->SetVar('subject', "<a href='" . FSSRoute::_('index.php?option=com_fss&view=ticket&layout=view&ticketid=' . $ticket->id) . "'>" . $title . "</a>"); $parser->SetVar('subject_text', $title); $style = ""; //$trhl = " onmouseover='highlightticket({$ticket->id})' onmouseout='unhighlightticket({$ticket->id})' "; $trhl = " "; // no longer highlighting tickets! if (FSS_Settings::get('support_entire_row')) { $style .= "cursor: pointer;"; $trhl .= " onclick='window.location=\"" . FSSRoute::_('index.php?option=com_fss&view=ticket&layout=view&ticketid=' . $ticket->id) . "\"' "; } $trhl .= " style='{$style}' "; $parser->SetVar('trhl', $trhl); $parser->SetVar('class', static::$rowclass . " ticket_{$ticket->id}"); if (static::$rowclass == "odd") { static::$rowclass = "even"; } else { static::$rowclass = "odd"; } } $parser->SetVar("hidehandler", FSS_Settings::get('support_hide_handler') > 0); $parser->SetVar("multiuser", $parser->multiuser); }
<a href='<?php echo strpos($tab->link, 'index.php') === FALSE ? $tab->link : FSSRoute::_($tab->link); ?> '> <?php echo $tab->tabname; ?> </a> </li> <?php } ?> <?php $nottabs = FSS_Ticket_Helper::GetStatuss("own_tab", true); FSS_Translate_Helper::Tr($nottabs); $showother = count($nottabs) > 0; if ($showother || !FSS_Settings::get('support_tabs_allopen') || !FSS_Settings::get('support_tabs_allclosed') || !FSS_Settings::get('support_tabs_all')) { ?> <!-- <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#" onclick="return false;"> <?php echo JText::_('OTHER'); ?> <b class="caret bottom-up"></b> </a> <ul class="dropdown-menu bottom-up pull-left"> <?php foreach ($nottabs as $tab) {
} ?> <?php if (!FSS_Settings::get('support_hide_priority')) { ?> <div class="control-group cg-priority"> <label class="control-label"><?php echo JText::_("PRIORITY"); ?> </label> <div class="controls"> <select class='input-large' id='priid' name='priid'> <?php FSS_Translate_Helper::Tr($this->pris); ?> <?php foreach ($this->pris as $pri) { ?> <option value='<?php echo $pri['id']; ?> ' style='color: <?php echo $pri['color']; ?> ' <?php if ($pri['id'] == $this->ticket['priid']) { echo "selected='selected'";
function GetItemData($itemids = null) { $db = JFactory::getDBO(); $qry = "SELECT {$this->field_id}, {$this->field_title}, translation FROM {$this->table} WHERE intest = 1 AND published = 1"; if ($itemids) { $ids = array(); foreach ($itemids as $id) { $ids[] = FSSJ3Helper::getEscaped($db, $id); } $qry .= " AND {$this->field_id} IN (" . implode(", ", $ids) . ")"; } $qry .= " ORDER BY ordering "; $db->setQuery($qry); $this->itemdata = $db->loadAssocList($this->field_id); FSS_Translate_Helper::Tr($this->itemdata); }
echo FSS_Helper::escape($this->time_start); ?> "> <span class="help-inline"><?php echo JText::_('TIME_END'); ?> : </span> <input name="timetaken_end" id="timetaken_end" type="text" style="width: 130px" value="<?php echo FSS_Helper::escape($this->time_end); ?> "> <a class="btn btn-default" onclick="var dt = new Date();var time = dt.getHours() + ':' + dt.getMinutes();jQuery('#timetaken_start').val(time);jQuery('#timetaken_end').val(time);return false;"><i class="icon-cancel"></i></a> <script> <?php FSS_Translate_Helper::CalenderLocale(); ?> jQuery(document).ready(function () { myCalendarFrom = new dhtmlXCalendarObject('timetaken_start','omega'); myCalendarFrom.setDateFormat('<?php echo FSS_Helper::getCalFormat(); ?> '); myCalendarFrom.loadUserLanguage(fss_calendar_locale); myCalendarTo = new dhtmlXCalendarObject('timetaken_end','omega'); myCalendarTo.setDateFormat('<?php echo FSS_Helper::getCalFormat(); ?> '); myCalendarTo.loadUserLanguage(fss_calendar_locale); });
} ?> <?php if (!FSS_Settings::get('support_next_prod_click')) { ?> <input class='btn btn-primary' type='submit' id='pickdept' value='<?php echo JText::_("NEXT"); ?> '> <?php } ?> </p> <?php FSS_Translate_Helper::Tr($this->depts); ?> <div id='dept_search_res' class="dept_search_res" style="clear:both;"> <?php include JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'ticket' . DS . 'tmpl' . DS . 'open_searchdept.php'; ?> </div> <p> <?php if ($this->prodid > 0) { ?> <?php if (FSS_Input::getInt('admincreate') > 0) { ?>
static function HelpText($ident, $return = false) { if (empty(self::$help_texts)) { $db = JFactory::getDBO(); $qry = "SELECT * FROM #__fss_help_text WHERE published = 1"; $db->setquery($qry); self::$help_texts = $db->loadObjectList("identifier"); FSS_Translate_Helper::Tr(self::$help_texts); } if (!array_key_exists($ident, self::$help_texts)) { return ""; } if ($return) { return self::$help_texts[$ident]->message; } echo self::$help_texts[$ident]->message; }
function getFilters() { $html = array(); $db = JFactory::getDBO(); $document = JFactory::getDocument(); foreach ($this->filter as $filter) { if (isset($filter->type) && $filter->type == "daterange") { FSS_Helper::StylesAndJS(array('calendar')); $to = FSS_Input::getString("{$filter->name}_to", $this->getDateRangeTo($filter)); $from = FSS_Input::getString("{$filter->name}_from", $this->getDateRangeFrom($filter)); $html[] = "<div class='control-group'>"; $html[] = "<label class='control-label' for='{$filter->name}_from'>" . JText::_('FSS_FROM') . "</label>"; $html[] = "<div class='controls'>"; $html[] = "<input type='text' name='{$filter->name}_from' id='{$filter->name}_from' onclick=\"setSens_{$filter->name}('{$filter->name}_to', 'max');\">"; $html[] = "</div>"; $html[] = "</div>"; $html[] = "<div class='control-group'>"; $html[] = "<label class='control-label' for='{$filter->name}_to'>" . JText::_('FSS_TILL') . "</label>"; $html[] = "<div class='controls'>"; $html[] = "<input type='text' name='{$filter->name}_to' id='{$filter->name}_to' onclick=\"setSens_{$filter->name}('{$filter->name}_from', 'min');\">"; $html[] = "</div>"; $html[] = "</div>"; FSS_Translate_Helper::CalenderLocale(); $js = "\n\t\t\t\t\tvar cal_{$filter->name};\n\t\t\t\t\t\n\t\t\t\t\tjQuery(document).ready( function () {\n\t\t\t\t\t cal_{$filter->name} = new dhtmlXCalendarObject(['{$filter->name}_from', '{$filter->name}_to'], 'omega');\n\t\t\t\t\t\tcal_{$filter->name}.setDate('{$from}');\n\t\t\t\t\t\tcal_{$filter->name}.hideTime();\n\t\t\t\t\t\t// init values\n\t\t\t\t\t\tvar t = new Date();\n\t\t\t\t\t\tjQuery('#{$filter->name}_from').val('{$from}');\n\t\t\t\t\t\tjQuery('#{$filter->name}_to').val('{$to}');\n\t\t\t\t\t\t\n\t\t\t\t\t\tcal_{$filter->name}.attachEvent('onClick', function(d) {\n\t\t\t\t\t\t\tdocument.report_params.submit();\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcal_{$filter->name}.loadUserLanguage('" . FSS_Translate_Helper::CalenderLocaleCode() . "');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfunction setSens_{$filter->name}(id, k) {\n\t\t\t\t\t\t// update range\n\t\t\t\t\t\tif (k == 'min') {\n\t\t\t\t\t\t\tcal_{$filter->name}.setSensitiveRange(jQuery('#'+id).val(), null);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcal_{$filter->name}.setSensitiveRange(null, jQuery('#'+id).val());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t"; $document->addScriptDeclaration($js); } elseif (isset($filter->type) && $filter->type == "date") { FSS_Helper::StylesAndJS(array('calendar')); FSS_Translate_Helper::CalenderLocale(); $to = FSS_Input::getString("{$filter->name}", $this->getDateRangeTo($filter)); $html[] = "<div class='control-group'>"; $html[] = "<label class='control-label' for='{$filter->name}'>" . JText::_($filter->title) . "</label>"; $html[] = "<div class='controls'>"; $html[] = "<input type='text' name='{$filter->name}' id='{$filter->name}' >"; $html[] = "</div>"; $html[] = "</div>"; $js = "\n\t\t\t\t\tvar cal_{$filter->name};\n\t\t\t\t\t\n\t\t\t\t\tjQuery(document).ready( function () {\n\t\t\t\t\t cal_{$filter->name} = new dhtmlXCalendarObject(['{$filter->name}'], 'omega');\n\t\t\t\t\t\tcal_{$filter->name}.setDate('{$from}');\n\t\t\t\t\t\tcal_{$filter->name}.hideTime();\n\t\t\t\t\t\t// init values\n\t\t\t\t\t\tvar t = new Date();\n\t\t\t\t\t\tjQuery('#{$filter->name}').val('{$to}');\n\t\t\t\t\t\t\n\t\t\t\t\t\tcal_{$filter->name}.attachEvent('onClick', function(d) {\n\t\t\t\t\t\t\tdocument.report_params.submit();\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcal_{$filter->name}.loadUserLanguage('" . FSS_Translate_Helper::CalenderLocaleCode() . "');\n\n\t\t\t\t\t});\n\t\t\t\t\t"; $document->addScriptDeclaration($js); } else { if ($filter->type == "lookup") { // need to lookup the values from the db $qry = "SELECT {$filter->key} as `key`, {$filter->display} as display"; if (!empty($filter->translate)) { $qry .= ", translation "; } $qry .= " FROM {$filter->table}"; if (isset($filter->published) && $filter->published) { $qry .= " WHERE published = 1 "; } $qry .= " GROUP BY {$filter->order}"; $db->setQuery($qry); $data = $db->loadObjectList(); // translate any lookups for the display field if (!empty($filter->translate)) { FSS_Translate_Helper::Tr($data); $display = $filter->display; foreach ($data as &$item) { if (isset($item->{$display})) { $item->display = $item->{$display}; } } } $values = array(); $values[] = JHTML::_('select.option', '', JText::_($filter->header), 'key', 'display'); $values = array_merge($values, $data); $value = FSS_Input::getString('filter_' . $filter->name, isset($filter->default) ? $filter->default : ''); $html[] = "<div class='control-group'>"; $html[] = "<label class='control-label'>" . JText::_($filter->title) . "</label>"; $html[] = "<div class='controls'>"; $html[] = JHTML::_('select.genericlist', $values, 'filter_' . $filter->name, ' onchange="document.report_params.submit( );"', 'key', 'display', $value); $html[] = "</div>"; $html[] = "</div>"; } else { if ($filter->type == "datepresets") { $value = FSS_Input::getString('filter_' . $filter->name, isset($filter->default) ? $filter->default : ''); $html[] = "<div class='control-group'>"; $html[] = "<label class='control-label'>" . JText::_($filter->title) . "</label>"; $html[] = "<div class='controls'>"; $html[] = JHTML::_('select.genericlist', $filter->select, 'filter_' . $filter->name, ' fsjfield="' . $filter->title . '" onchange="fsj_datepreset(this);"', 'key', 'display', $value); $html[] = "</div>"; $html[] = "</div>"; } else { $value = FSS_Input::getString('filter_' . $filter->name, isset($filter->default) ? $filter->default : ''); $html[] = "<div class='control-group'>"; $html[] = "<label class='control-label'>" . JText::_($filter->title) . "</label>"; $html[] = "<div class='controls'>"; $html[] = JHTML::_('select.genericlist', $filter->select, 'filter_' . $filter->name, ' onchange="document.report_params.submit( );"', 'key', 'display', $value); $html[] = "</div>"; $html[] = "</div>"; } } } } foreach ($this->group as $group) { $html[] = "<div class='control-group'>"; $html[] = "<label class='control-label'>" . JText::_($group->title) . "</label>"; $html[] = "<div class='controls'>"; //$html[] = "<div style='float:left;padding:3px;height:60px;'>"; //if (isset($group->title)) // $html[] = "<div style='margin-top: 5px;margin-bottom: 6px;margin-left:3px;'><span class='label'>".$group->title . "</span></div>"; if ($group->type == "dategroup") { $value = FSS_Input::getString('group_' . $group->name, 'day'); $html[] = JHTML::_('select.genericlist', $group->select, 'group_' . $group->name, ' onchange="document.report_params.submit( );"', 'key', 'display', $value); } $html[] = "</div>"; $html[] = "</div>"; } return implode($html); }
**/ defined('_JEXEC') or die; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'translate.php'; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'support_tickets.php'; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'support_source.php'; ?> <?php echo FSS_Helper::PageSubTitle("<a href='" . FSSRoute::_('index.php?option=com_fss&view=admin_support') . "'><img src='" . JURI::root(true) . "/components/com_fss/assets/images/support/support_24.png'> " . JText::_("SUPPORT_TICKETS") . "</a>", false); ?> <ul> <?php FSS_Ticket_Helper::GetStatusList(); $counts = SupportTickets::getTicketCount(); FSS_Translate_Helper::Tr(FSS_Ticket_Helper::$status_list); foreach (FSS_Ticket_Helper::$status_list as $status) { if ($status->def_archive) { continue; } if ($status->is_closed) { continue; } if (!array_key_exists($status->id, $counts)) { continue; } if ($counts[$status->id] < 1) { continue; } echo "<li>" . $status->title . ": <b>" . $counts[$status->id] . "</b> - <a href='" . FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $status->id) . "'>" . JText::_("VIEW_NOW") . "</a></li>"; }
<select name="support_default_priority"> <option value="" <?php if ($this->settings['support_default_priority'] == 0) { echo " SELECTED"; } ?> ><?php echo JText::_('support_default_priority_default'); ?> </option> <?php $db = JFactory::getDBO(); $qry = "SELECT * FROM #__fss_ticket_pri ORDER BY ordering"; $db->setQuery($qry); $pris = $db->loadObjectList(); FSS_Translate_Helper::Tr($pris); foreach ($pris as $pri) { ?> <option value="<?php echo $pri->id; ?> " <?php if ($this->settings['support_default_priority'] == $pri->id) { echo " SELECTED"; } ?> ><?php echo $pri->title; ?> </option> <?php