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); }
static function getPrintList($for_admin, $ticket) { $result = array(); $path = JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'plugins' . DS . 'ticketprint'; $files = JFolder::files($path, ".xml\$"); foreach ($files as $file) { $id = pathinfo($file, PATHINFO_FILENAME); if (!FSS_Helper::IsPluignEnabled("ticketprint", $id)) { continue; } $xml = simplexml_load_file($path . DS . $file); if ($for_admin && (int) $xml->admin != 1) { continue; } if (!$for_admin && (int) $xml->user != 1) { continue; } if ($xml->can_run_php) { $fn = create_function('$for_admin,$ticket', (string) $xml->can_run_php); if (!$fn($for_admin, $ticket)) { continue; } } $result[str_ireplace(".xml", "", $file)] = (string) $xml->title; } return $result; }
protected function _glossary(&$text, &$params) { $text = FSS_Glossary::ReplaceGlossary($text); $text .= FSS_Glossary::Footer(); FSS_Helper::StylesAndJS(); return true; }
static function LoadPlugins($also_disabled = false) { // load in all php files in components/com_fss/plugins/tickets and for each make a new object if (empty(self::$plugins)) { self::$plugins = array(); $path = JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'plugins' . DS . 'tickets'; $files = JFolder::files($path, ".php\$"); foreach ($files as $file) { $fullpath = $path . DS . $file; $info = pathinfo($fullpath); if (!FSS_Helper::IsPluignEnabled("tickets", $info['filename'])) { continue; } $ext = $info['extension']; $classname = "SupportActions" . $info['filename']; require_once $fullpath; if (class_exists($classname)) { $plugin = new $classname(); $plugin->enabled = true; $plugin->php_file = $fullpath; $plugin->id = $info['filename']; self::$plugins[] = $plugin; } } } return self::$plugins; }
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); }
function Input($current, $params, $context, $id) { $params = $this->parseParams($params); $output = array(); $checked = array(); $posted = FSS_Input::getInt("custom_{$id}_count"); if ($posted) { for ($i = 1; $i <= $posted; $i++) { $val = FSS_Input::getString("custom_{$id}_{$i}"); if ($val) { $checked[$val] = $val; } } } $i = 0; foreach ($params->entries as $entry) { $i++; $output[] = '<label class="checkbox-inline">'; $output[] = '<input type="checkbox" id="custom_$id_' . $i . '" name="custom_' . $id . '_' . $i . '" value="' . FSS_Helper::encode($entry) . '" '; if (array_key_exists($entry, $checked)) { $output[] = " checked='checked' "; } $output[] = '>'; $output[] = $entry; $output[] = '</label>'; } $output[] = "<input type='hidden' name='custom_{$id}_count' value='{$i}' />"; return implode("\n", $output); }
function __construct() { if (!JFormFieldFSSChecklist::$init) { FSS_Helper::StylesAndJS(array(), array("administrator/components/com_fss/assets/css/field.fsschecklist.css"), array("administrator/components/com_fss/assets/js/field.fsschecklist.js")); JFormFieldfssChecklist::$init = true; } //parent::__construct(); }
function displayRegistered() { if (FSS_Settings::get('support_no_admin_for_user_open')) { JFactory::getApplication()->redirect("index.php?option=com_fss&view=admin_support"); } FSS_Helper::IncludeModal(); $this->_display("registered"); }
function display($tpl = NULL) { FSS_Helper::AddSCEditor(); if (FSS_Input::getInt('sigid')) { return $this->display_edit(); } $this->sigs = SupportCanned::GetAllSigs(null); $this->_display("list"); }
function display($tpl = NULL) { // view a ticket! $this->ticketid = FSS_Input::getInt('ticketid'); $document = JFactory::getDocument(); $document->addScript(JURI::root() . 'components/com_fss/assets/js/bootstrap/bootstrap-timepicker.min.js'); $this->ticket = new SupportTicket(); if (!$this->ticket->load($this->ticketid)) { if ($this->ticket->checkExist($this->ticketid)) { return $this->_display("noperm"); } else { return JError::raiseWarning(404, JText::_('Ticket not found')); } } if ($this->ticket->merged > 0 && FSS_Input::getInt('no_redirect') != '1') { JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=' . $this->ticket->merged . "&Itemid=" . FSS_Input::getInt('Itemid'), false)); } $reverse = JRequest::getInt('sort', null); if ($reverse !== null) { if ($reverse) { // we want messages in opposite order to normal if (SupportUsers::getSetting("reverse_order")) { $reverse = true; } else { $reverse = false; } } else { // we want messages in normal order $reverse = null; } } $this->ticket->loadAll($reverse); $this->loadMerged(); $pathway = JFactory::getApplication()->getPathway(); $pathway->addItem(JText::_("SUPPORT"), FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $this->ticket_view)); $pathway->addItem(JText::_("VIEW_TICKET") . " : " . $this->ticket->reference . " - " . $this->ticket->title); $this->assignOnOpen(); $this->tryLock(); if ($this->ticket->admin_id > 0) { $this->adminuser = SupportUsers::getUser($this->ticket->admin_id); } $this->ticket_view = $this->ticket->ticket_status_id; $this->HandleRefresh(); if (FSS_Settings::get('time_tracking') == "auto") { $session = JFactory::getSession(); $session->set('ticket_' . $this->ticket->id . "_opened", time()); } FSS_Helper::IncludeModal(); FSS_Helper::AddSCEditor(); $this->HandleRefresh(); $this->print = FSS_Input::getCmd('print'); if ($this->print) { return $this->_display("print"); } $this->_display(); }
function EMail_AddFields(&$comment) { $comment['title'] = $this->email_title; $comment['article_type'] = $this->email_article_type; $itemid = $comment['itemid']; $item = $this->GetItem($itemid); $comment['article'] = $item[$this->field_title]; $link = FSS_Helper::GetBaseURL() . FSSRoute::_(str_replace("{id}", $itemid, $this->article_link)); $comment['linkart'] = $link; }
function displayType() { require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'content' . DS . $this->type . '.php'; $class = "FSS_ContentEdit_{$this->type}"; $content = new $class(); $content->layout = $this->layout; $content->type = $this->type; $content->view = $this->view; FSS_Helper::IncludeModal(); $content->Display(); }
function display($tpl = NULL) { $preview = FSS_Input::getCmd('preview'); if ($preview) { return $this->showPreview($preview); } FSS_Helper::IncludeModal(); $this->state = FSS_Input::getCmd('state'); $this->ticket_view = ""; $this->getLimits(); $this->pending = $this->loadPending(); $this->_display(); }
function SaveLog() { $db = JFactory::getDBO(); $class = get_class($this); $class = str_ireplace("FSSCron", "", $class); $now = FSS_Helper::CurDate(); $qry = "INSERT INTO #__fss_cron_log (cron, `when`, log) VALUES ('" . FSSJ3Helper::getEscaped($db, $class) . "', '{$now}', '" . FSSJ3Helper::getEscaped($db, $this->_log) . "')"; $db->SetQuery($qry); $db->Query(); //echo $qry."<br>"; $qry = "DELETE FROM #__fss_cron_log WHERE `when` < DATE_SUB('{$now}', INTERVAL " . (int) FSS_Settings::get('support_cronlog_keep') . " DAY)"; $db->SetQuery($qry); $db->Query(); }
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); }
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; }
function init() { $user = JFactory::getUser(); $this->userid = $user->get('id'); $this->model = $this->getModel("admin_support"); if (!FSS_Permission::auth("fss.handler", "com_fss.support_admin")) { return FSS_Admin_Helper::NoPerm(); } $this->def_open = FSS_Ticket_Helper::GetStatusID('def_open'); $this->ticket_view = FSS_Input::getCmd('tickets', $this->def_open); $this->count = SupportTickets::getTicketCount(); FSS_Helper::StylesAndJS(array('calendar', 'base64')); if (Task_Helper::HandleTasks($this)) { return false; } return true; }
function display($tpl = null) { $fileid = FSS_Input::getInt('fileid'); $key = FSS_Input::getCmd('key'); $decoded = FSS_Helper::decrypt(FSS_Helper::base64url_decode($key), FSS_Helper::getEncKey("file")); if ($fileid != $decoded) { exit; } $db = JFactory::getDBO(); $sql = "SELECT * FROM #__fss_ticket_attach WHERE id = " . $fileid; $db->setQuery($sql); $attach = $db->loadObject(); $image = in_array(strtolower(pathinfo($attach->filename, PATHINFO_EXTENSION)), array('jpg', 'jpeg', 'png', 'gif')); $image_file = JPATH_SITE . DS . FSS_Settings::get('attach_location') . DS . "support" . DS . $attach->diskfile; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'files.php'; FSS_File_Helper::OutputImage($image_file, pathinfo($attach->filename, PATHINFO_EXTENSION)); }
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 .= " <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); }
static function load() { if (self::$loaded) { return; } $path = JPATH_SITE . DS . "components" . DS . "com_fss" . DS . "plugins" . DS . "gui" . DS; $files = JFolder::files($path, ".php\$"); foreach ($files as $file) { $id = pathinfo($file, PATHINFO_FILENAME); if (!FSS_Helper::IsPluignEnabled("gui", $id)) { continue; } $class = "FSS_GUIPlugin_" . $id; require_once $path . DS . $file; if (class_exists($class)) { self::$plugins[$id] = new $class(); self::$plugins[$id]->id = $id; } } self::$loaded = true; }
static function GetGlossary() { if (empty(FSS_Glossary::$glossary)) { $db = JFactory::getDBO(); $query = 'SELECT * FROM #__fss_glossary'; $where = array(); $where[] = " published = 1 "; $where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')'; $user = JFactory::getUser(); $where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'; if (count($where) > 0) { $query .= " WHERE " . implode(" AND ", $where); } $query .= ' ORDER BY LENGTH(word) DESC'; $db->setQuery($query); self::$glossary = $db->loadObjectList(); $extra = array(); foreach (self::$glossary as $offset => &$data) { $data->base_offset = -1; $altwords = explode("\n", $data->altwords); $awp = array(); foreach ($altwords as $aw) { $aw = trim($aw); if (!$aw) { continue; } $ex = clone $data; $ex->is_clone = true; $ex->word = $aw; $ex->linkword = $data->word; $ex->base_offset = $offset; $extra[] = $ex; } } self::$glossary = array_merge(self::$glossary, $extra); // add javascript FSS_Helper::StylesAndJS(array('tooltip', 'glossary')); } }
} if ($params->get('show_add') && $comments->can_add) { ?> <?php if ($params->get('addlink')) { ?> <div class='fss_mod_test_add'><a href='<?php echo JRoute::_($params->get('addlink')); ?> '><?php echo JText::_("ADD_A_TESTIMONIAL"); ?> </a></div> <?php } else { ?> <div class='fss_mod_test_add'><a class='show_modal_iframe' data_modal_width="650" href='<?php echo FSSRoute::_('index.php?tmpl=component&option=com_fss&view=test&layout=create&onlyprodid=' . $prodid); ?> '><?php echo JText::_("ADD_A_TESTIMONIAL"); ?> </a></div> <?php } } ?> <?php FSS_Helper::ModuleEnd();
<?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; 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)) {
<tr> <td width="135" align="right" class="key"> <label for="longdesc"> <?php echo JText::_("ALTERNATE_WORDS"); ?> : </label> </td> <td> <div><?php echo JText::_("ALTERNATE_WORDS_HELP"); ?> </div> <textarea name="altwords" cols="80" rows="6" style="width:100%"><?php echo FSS_Helper::encode($this->glossary->altwords); ?> </textarea> </td> </tr> <tr> <td width="135" align="right" class="key"> <label for="description"> <?php echo JText::_("DESCRIPTION"); ?> : </label> </td> <td> <?php
FSS_Table::TableClose(); $grouping = ""; $open = false; if ($this->ticket->customfields && count($this->ticket->customfields) > 0) { foreach ($this->ticket->customfields as $field) { if ($field['grouping'] == "") { continue; } if ($field['adminhide']) { continue; } if ($field['grouping'] != $grouping) { if ($open) { FSS_Table::TableClose(); } echo FSS_Helper::PageSubTitle($field['grouping']); FSS_Table::TableOpen(); $open = true; $grouping = $field['grouping']; } FSS_Table::ColStart("tr_cf" . $field['id'] . " tr_cf_" . $field['alias']); ?> <th width='<?php echo FSS_Settings::get('ticket_label_width'); ?> '><?php echo FSSCF::FieldHeader($field); ?> </th> <td> <?php
?> </table> <input type="hidden" name="groupid" value="<?php echo FSS_Input::getInt('groupid'); ?> " /> <input type="hidden" name="what" value="pickuser" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="filter_order" value="<?php echo FSS_Helper::escape($this->order); ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo FSS_Helper::escape($this->order_Dir); ?> " /> <input type="hidden" name="limit_start" id="limitstart" value="<?php echo (int) $this->limit_start; ?> "> </form> </div> <div class="modal-footer"> <a href='#' class="btn btn-primary" id="addlink" onclick='document.fssForm.what.value="adduser";document.fssForm.submit();return false;'><?php echo JText::_('ADD_USERS_TO_GROUP'); ?> </a>
if ($mode == "accordion") { $maxheight = 0; } $db = JFactory::getDBO(); $qry = "SELECT * FROM #__fss_faq_faq"; $where = array(); $where[] = "published = 1"; // for cats if ($catid > 0) { $where[] = "faq_cat_id = " . FSSJ3Helper::getEscaped($db, $catid); } else { if ($catid == -5) { $where[] = "featured = 1"; } } if (count($where) > 0) { $qry .= " WHERE " . implode(" AND ", $where); } $order = "ordering"; $qry .= " ORDER BY {$order} "; if ($dispcount > 0) { $qry .= " LIMIT {$dispcount}"; } $db->setQuery($qry); $data = $db->loadObjectList(); $posdata = array(); if ($mode == "popup") { FSS_Helper::IncludeModal(); } require JModuleHelper::getLayoutPath('mod_fss_faqs'); }
<?php echo FSS_Helper::PageTitle("Reports", $this->report->title); } ?> <?php if (FSS_Input::getCmd('type') == "") { ?> <div class="well well-small form-horizontal form-condensed"> <?php echo $this->report->listFilterValues(); ?> </div> <?php } ?> <?php include $this->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'admin_report' . DS . 'snippet' . DS . '_report_table.php'); ?> <?php echo FSS_Helper::PageStyleEnd(); ?> <script> jQuery(document).ready( function () { window.print(); }); </script>
static function IsPluignEnabled($type, $plugin) { if (empty(self::$plugin_data)) { $db = JFactory::getDBO(); $qry = "SELECT * FROM #__fss_plugins"; $db->setQuery($qry); $pluigns = $db->loadObjectList(); self::$plugin_data = array(); foreach ($pluigns as $plg) { $key = $plg->type . $plg->name; self::$plugin_data[$key] = $plg->enabled; } } $key = $type . $plugin; if (!array_key_exists($key, self::$plugin_data)) { return 0; } return self::$plugin_data[$key]; }
if (substr($product['image'], 0, 1) != "/") { ?> <img class='media-object' src='<?php echo JURI::root(true); ?> /images/fss/products/<?php echo FSS_Helper::escape($product['image']); ?> ' width='64' height='64'> <?php } else { ?> <img class='media-object' src='<?php echo JURI::root(true); echo FSS_Helper::escape($product['image']); ?> ' width='64' height='64'> <?php } ?> </a> </div> <?php } ?> <div class="media-body accordion-group" style="border:0;padding:0;margin:0"> <div <?php if ($this->test_show_prod_mode == "accordian") {