function isHot($hits) { if (empty($this->hot_hits)) { $this->hot_hits = RSTicketsProHelper::getConfig('kb_hot_hits'); } return $hits >= $this->hot_hits; }
protected function getInput() { // Base name of the HTML control. $ctrl = $this->name; $value = $this->value; // Construct an array of the HTML OPTION statements. $options = array(); // Construct the various argument calls that are supported. $attribs = ' '; if (isset($this->element['size'])) { $attribs .= 'size="' . (int) $this->element['size'] . '"'; } if (isset($this->element['class'])) { $attribs .= 'class="' . (string) $this->element['class'] . '"'; } else { $attribs .= 'class="inputbox"'; } if (isset($this->element['multiple'])) { $attribs .= ' '; } $novalue = new stdClass(); $novalue->value = '0'; $novalue->text = JText::_('RST_DEPARTMENTS_NO_VALUE'); $novalue->disabled = ''; $options = RSTicketsProHelper::getDepartments(); array_unshift($options, $novalue); // Render the HTML SELECT list. return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $this->name); }
function fetchElement($name, $value, &$node, $control_name) { // Base name of the HTML control. $ctrl = $control_name . '[' . $name . ']'; // Construct an array of the HTML OPTION statements. $options = array(); // Construct the various argument calls that are supported. $attribs = ' '; if ($v = $node->attributes('class')) { $attribs .= 'class="' . $v . '"'; } else { $attribs .= 'class="inputbox"'; } if ($m = $node->attributes('multiple')) { $attribs .= ''; $ctrl .= ''; } $novalue = new stdClass(); $novalue->value = '0'; $novalue->text = JText::_('RST_DEPARTMENTS_NO_VALUE'); $novalue->disabled = ''; $options = RSTicketsProHelper::getDepartments(); array_unshift($options, $novalue); // Render the HTML SELECT list. return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $control_name . $name); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); JToolBarHelper::title('RSTickets! Pro', 'rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_MANAGE_TICKETS'), 'index.php?option=com_rsticketspro&view=tickets', true); JSubMenuHelper::addEntry(JText::_('RST_DEPARTMENTS'), 'index.php?option=com_rsticketspro&view=departments'); JSubMenuHelper::addEntry(JText::_('RST_GROUPS'), 'index.php?option=com_rsticketspro&view=groups'); JSubMenuHelper::addEntry(JText::_('RST_STAFF_MEMBERS'), 'index.php?option=com_rsticketspro&view=staff'); JSubMenuHelper::addEntry(JText::_('RST_PRIORITIES'), 'index.php?option=com_rsticketspro&view=priorities'); JSubMenuHelper::addEntry(JText::_('RST_STATUSES'), 'index.php?option=com_rsticketspro&view=statuses'); JSubMenuHelper::addEntry(JText::_('RST_KNOWLEDGEBASE'), 'index.php?option=com_rsticketspro&view=knowledgebase'); JSubMenuHelper::addEntry(JText::_('RST_EMAIL_MESSAGES'), 'index.php?option=com_rsticketspro&view=emails'); JSubMenuHelper::addEntry(JText::_('RST_CONFIGURATION'), 'index.php?option=com_rsticketspro&view=configuration'); $mainframe->triggerEvent('onAfterTicketsMenu'); JSubMenuHelper::addEntry(JText::_('RST_UPDATES'), 'index.php?option=com_rsticketspro&view=updates'); JToolBarHelper::apply('applykbconvert'); JToolBarHelper::save('savekbconvert'); JToolBarHelper::cancel('cancelkbconvert'); $this->assignRef('ticket', $this->get('ticket', 'ticket')); $lists['categories'] = RSTicketsProHelper::getKBCategoriesTree('category_id', 0, 0, '', 0); $lists['publish_article'] = JHTML::_('select.booleanlist', 'publish_article', 'class="inputbox"', 1); $lists['private'] = JHTML::_('select.booleanlist', 'private', 'class="inputbox"', 0); $this->assignRef('lists', $lists); parent::display($tpl); }
protected function getInput() { // Base name of the HTML control. $ctrl = $this->name; $value = $this->value; // Construct an array of the HTML OPTION statements. $options = array(); // Construct the various argument calls that are supported. $attribs = ' '; if (isset($this->element['size'])) { $attribs .= 'size="' . (int) $this->element['size'] . '"'; } if (isset($this->element['class'])) { $attribs .= 'class="' . (string) $this->element['class'] . '"'; } else { $attribs .= 'class="inputbox"'; } if (isset($this->element['multiple'])) { $attribs .= ' multiple="multiple"'; } $options = RSTicketsProHelper::getStatuses(); if (empty($value)) { $value = $options; } // Render the HTML SELECT list. return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $this->name); }
function __construct() { parent::__construct(); $mainframe =& JFactory::getApplication(); $option = 'com_rsticketspro'; $user = JFactory::getUser(); if ($user->get('guest')) { $link = JRequest::getURI(); $link = base64_encode($link); $user_option = RSTicketsProHelper::isJ16() ? 'com_users' : 'com_user'; $mainframe->redirect(RSTicketsProHelper::route('index.php?option=' . $user_option . '&view=login&return=' . $link, false)); } if (!RSTicketsProHelper::isStaff()) { JError::raiseWarning(500, JText::_('RST_STAFF_CANNOT_VIEW_USERS')); $mainframe->redirect(RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=rsticketspro', false)); } $this->_permissions = RSTicketsProHelper::getCurrentPermissions(); if (!$this->_permissions->add_ticket_customers && !$this->_permissions->add_ticket_staff) { JError::raiseWarning(500, JText::_('RST_STAFF_CANNOT_VIEW_USERS')); $mainframe->redirect(RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=rsticketspro', false)); } $this->_db = JFactory::getDBO(); // Get pagination request variables $limit = JRequest::getVar('limit', $mainframe->getCfg('list_limit'), '', 'int'); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); // In case limit has been changed, adjust it $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0; $this->setState($option . '.users.limit', $limit); $this->setState($option . '.users.limitstart', $limitstart); $this->_query = $this->_buildQuery(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $this->assign('signature', RSTicketsProHelper::getSignature()); $this->assignRef('editor', JFactory::getEditor()); $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link')); $this->assign('footer', RSTicketsProHelper::getFooter()); if (RSTicketsProHelper::isJ16() && $mainframe->isSite()) { // Description if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } // Keywords if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } // Robots if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } } parent::display(); }
function fetchElement($name, $value, &$node, $control_name) { // Base name of the HTML control. $ctrl = $control_name . '[' . $name . ']'; // Construct an array of the HTML OPTION statements. $options = array(); // Construct the various argument calls that are supported. $attribs = ' '; if ($v = $node->attributes('size')) { $attribs .= 'size="' . $v . '"'; } if ($v = $node->attributes('class')) { $attribs .= 'class="' . $v . '"'; } else { $attribs .= 'class="inputbox"'; } if ($m = $node->attributes('multiple')) { $attribs .= ' multiple="multiple"'; $ctrl .= '[]'; } $options = RSTicketsProHelper::getStatuses(); if (empty($value)) { $value = $options; } // Render the HTML SELECT list. return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $control_name . $name); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); $this->assignRef('row', $this->get('row')); $this->assign('use_editor', RSTicketsProHelper::getConfig('allow_rich_editor')); $this->assignRef('editor', JFactory::getEditor()); parent::display(); }
function update() { // Check for request forgeries JRequest::checkToken() or jexit('Invalid Token'); $model = $this->getModel('notes'); $model->update(); $ticket_id = JRequest::getInt('ticket_id'); $this->setRedirect(RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=notes&ticket_id=' . $ticket_id . '&tmpl=component', false), JText::_('RST_UPDATE_TICKET_NOTE_OK')); }
function save() { $mainframe =& JFactory::getApplication(); $signature = JRequest::getVar('signature', '', 'post', 'none', JREQUEST_ALLOWHTML); $user = JFactory::getUser(); $this->_db->setQuery("UPDATE #__rsticketspro_staff SET signature='" . $this->_db->getEscaped($signature) . "' WHERE user_id='" . (int) $user->get('id') . "' LIMIT 1"); $this->_db->query(); $mainframe->redirect(RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=signature', false), JText::_('RST_SIGNATURE_OK')); }
function _buildQuery() { $mainframe =& JFactory::getApplication(); $ticket_id = JRequest::getInt('ticket_id'); $what = RSTicketsProHelper::getConfig('show_user_info'); $query = "SELECT h.*, u." . $this->_db->getEscaped($what) . " AS user FROM #__rsticketspro_ticket_history h LEFT JOIN #__users u ON (h.user_id = u.id) WHERE h.ticket_id='" . $ticket_id . "'"; $query .= " ORDER BY h.date DESC"; return $query; }
function getItemId() { if (RSTicketsProHelper::isStaff() && $this->params->get('staff_itemid')) { return '&Itemid=' . (int) $this->params->get('staff_itemid'); } if (!RSTicketsProHelper::isStaff() && $this->params->get('customer_itemid')) { return '&Itemid=' . (int) $this->params->get('customer_itemid'); } return ''; }
function save() { $row = $this->getRow(); $post = JRequest::get('post'); $post['message'] = JRequest::getVar('message', '', 'post', 'none', JREQUEST_ALLOWHTML); if (!RSTicketsProHelper::getConfig('allow_rich_editor')) { $post['message'] = htmlspecialchars($post['message'], ENT_COMPAT, 'utf-8'); } $row->message = $post['message']; $row->store(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if (!$mainframe->isAdmin()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $data = $this->get('data'); $this->assignRef('data', $data); $this->assignRef('custom_fields', $this->get('customfields')); $user = JFactory::getUser(); $this->assign('is_logged', !$user->get('guest')); $this->assign('is_staff', RSTicketsProHelper::isStaff()); $this->assign('permissions', RSTicketsProHelper::getCurrentPermissions()); $this->assignRef('user', $user); $this->assign('use_editor', RSTicketsProHelper::getConfig('allow_rich_editor')); $this->assignRef('editor', JFactory::getEditor()); $show_please_select = true; $lists['priorities'] = JHTML::_('select.genericlist', RSTicketsProHelper::getPriorities($show_please_select), 'priority_id', '', 'value', 'text', @$data['priority_id'], 'submit_priority'); $lists['departments'] = JHTML::_('select.genericlist', RSTicketsProHelper::getDepartments($show_please_select), 'department_id', 'onchange="rst_show_custom_fields(this.value); rst_show_priority(this.value); rst_show_upload(this.value); rst_show_subject(this.value);"', 'value', 'text', @$data['department_id']); $lists['subject'] = JHTML::_('select.genericlist', RSTicketsProHelper::getSubjects(@$data['department_id'], $show_please_select), 'subject', '', 'value', 'text', @$data['subject'], 'submit_subject'); $this->assignRef('lists', $lists); $this->assignRef('departments', $this->get('departments')); $this->assign('can_upload', $this->get('canupload')); $this->assign('use_captcha', $this->get('usecaptcha')); $this->assign('use_builtin', $this->get('usebuiltin')); $this->assign('use_recaptcha', $this->get('userecaptcha')); if ($this->get('userecaptcha') && $mainframe->isSite()) { $this->assign('show_recaptcha', JReCAPTCHA::getHTML($this->get('recaptchaerror'))); } $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link')); $this->assign('footer', RSTicketsProHelper::getFooter()); $this->assign('use_predefined_subjects', RSTicketsProHelper::getConfig('allow_predefined_subjects')); if ($mainframe->isAdmin()) { $this->assign('checked_create_new_user', JRequest::getVar('submit_type', 1) == 1); $this->assign('checked_existing_user', JRequest::getVar('submit_type', 1) == 2); } if (RSTicketsProHelper::isJ16() && $mainframe->isSite()) { // Description if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } // Keywords if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } // Robots if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } } parent::display(); }
function display($tpl = null) { JToolBarHelper::title('RSTickets! Pro', 'rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_BACK_TO_RSTICKETSPRO'), 'index.php?option=com_rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_KNOWLEDGEBASE'), 'index.php?option=com_rsticketspro&view=knowledgebase', true); JSubMenuHelper::addEntry(JText::_('RST_KB_CATEGORIES'), 'index.php?option=com_rsticketspro&view=kbcategories'); JSubMenuHelper::addEntry(JText::_('RST_KB_ARTICLES'), 'index.php?option=com_rsticketspro&view=kbcontent'); JSubMenuHelper::addEntry(JText::_('RST_KB_CONVERSION_RULES'), 'index.php?option=com_rsticketspro&view=kbrules'); $this->assign('code', RSTicketsProHelper::getConfig('global_register_code')); parent::display($tpl); parent::display('version'); }
function _getSearch() { $this->_row =& JTable::getInstance('RSTicketsPro_Searches', 'Table'); $cid = JRequest::getInt('cid', 0); if ($cid) { $this->_row->load($cid); $user = JFactory::getUser(); if ($user->get('id') != $this->_row->user_id) { $mainframe =& JFactory::getApplication(); JError::raiseWarning(500, JText::_('RST_STAFF_CANNOT_VIEW_SEARCHES')); $mainframe->redirect(RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=searches', false)); } } }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); $this->assign('date_format', RSTicketsProHelper::getConfig('date_format')); $this->assign('permissions', $this->get('permissions')); $this->assign('ticket_id', JRequest::getInt('ticket_id')); $task = JRequest::getCmd('task'); if ($task == 'edit') { $this->assignRef('row', $this->get('note')); } else { $this->assign('avatar', RSTicketsProHelper::getConfig('avatars')); $this->assignRef('notes', $this->get('notes')); $this->assignRef('pagination', $this->get('pagination')); $this->assignRef('limitstart', JRequest::getInt('limitstart', 0)); } parent::display(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $departments = RSTicketsProHelper::getDepartments(); $lists['departments'] = JHTML::_('select.genericlist', $departments, 'department_id[]', 'size="5" multiple="multiple"', 'value', 'text', $departments); $lists['statuses'] = JHTML::_('select.genericlist', RSTicketsProHelper::getStatuses(), 'status_id[]', 'size="5" multiple="multiple"', 'value', 'text', RSTicketsProHelper::getStatuses()); $lists['priorities'] = JHTML::_('select.genericlist', RSTicketsProHelper::getPriorities(), 'priority_id[]', 'size="5" multiple="multiple"', 'value', 'text', RSTicketsProHelper::getPriorities()); $ordering = array(); $ordering[] = JHTML::_('select.option', 'date', JText::_('Default')); $ordering[] = JHTML::_('select.option', 'last_reply', JText::_('RST_TICKET_LAST_REPLY')); $ordering[] = JHTML::_('select.option', 'subject', JText::_('RST_TICKET_SUBJECT')); $ordering[] = JHTML::_('select.option', 'status', JText::_('RST_TICKET_STATUS')); $ordering[] = JHTML::_('select.option', 'priority', JText::_('RST_TICKET_PRIORITY')); $ordering[] = JHTML::_('select.option', 'replies', JText::_('RST_TICKET_REPLIES')); $lists['ordering'] = JHTML::_('select.genericlist', $ordering, 'filter_order', '', 'value', 'text'); $ordering_dir = array(); $ordering_dir[] = JHTML::_('select.option', 'DESC', JText::_('DESC')); $ordering_dir[] = JHTML::_('select.option', 'ASC', JText::_('ASC')); $lists['ordering_dir'] = JHTML::_('select.genericlist', $ordering_dir, 'filter_order_Dir', '', 'value', 'text'); $this->assign('is_staff', RSTicketsProHelper::isStaff()); $this->assign('permissions', RSTicketsProHelper::getCurrentPermissions()); $this->assign('is_advanced', JRequest::getVar('advanced', false)); $this->assignRef('lists', $lists); $this->assign('itemid', $this->get('itemid')); $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link')); $this->assign('footer', RSTicketsProHelper::getFooter()); if (RSTicketsProHelper::isJ16() && $mainframe->isSite()) { // Description if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } // Keywords if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } // Robots if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } } parent::display(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); JToolBarHelper::title('RSTickets! Pro', 'rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_BACK_TO_RSTICKETSPRO'), 'index.php?option=com_rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_KNOWLEDGEBASE'), 'index.php?option=com_rsticketspro&view=knowledgebase'); JSubMenuHelper::addEntry(JText::_('RST_KB_CATEGORIES'), 'index.php?option=com_rsticketspro&view=kbcategories'); JSubMenuHelper::addEntry(JText::_('RST_KB_ARTICLES'), 'index.php?option=com_rsticketspro&view=kbcontent', true); JSubMenuHelper::addEntry(JText::_('RST_KB_CONVERSION_RULES'), 'index.php?option=com_rsticketspro&view=kbrules'); JSubMenuHelper::addEntry(JText::_('RST_KB_TEMPLATE'), 'index.php?option=com_rsticketspro&view=kbtemplate'); $task = JRequest::getVar('task', ''); if ($task == 'edit') { JToolBarHelper::title('RSTickets! Pro <small>[' . JText::_('RST_EDIT_KB_CONTENT') . ']</small>', 'rsticketspro'); JToolBarHelper::apply(); JToolBarHelper::save(); JToolBarHelper::cancel(); $row = $this->get('kbarticle'); $this->assignRef('row', $row); $this->assignRef('editor', JFactory::getEditor()); $lists['categories'] = RSTicketsProHelper::getKBCategoriesTree('category_id', $row->category_id, 0, '', 0); $lists['private'] = JHTML::_('select.booleanlist', 'private', 'class="inputbox"', $row->private); $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published); $this->assignRef('lists', $lists); } else { JToolBarHelper::addNewX('edit'); JToolBarHelper::editListX('edit'); JToolBarHelper::spacer(); JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::spacer(); JToolBarHelper::deleteList('RST_CONFIRM_DELETE'); $filter_state = $mainframe->getUserStateFromRequest('rsticketspro.filter_state', 'filter_state'); $mainframe->setUserState('rsticketspro.filter_state', $filter_state); $lists['state'] = JHTML::_('grid.state', $filter_state); $this->assignRef('sortColumn', JRequest::getVar('filter_order', 'ordering')); $this->assignRef('sortOrder', JRequest::getVar('filter_order_Dir', 'ASC')); $this->assignRef('kbarticles', $this->get('kbarticles')); $this->assignRef('pagination', $this->get('pagination')); $filter_word = JRequest::getCmd('search', ''); $this->assignRef('filter_word', $filter_word); $category_state = $mainframe->getUserStateFromRequest('rsticketspro.category_state', 'category_state'); $lists['category_state'] = RSTicketsProHelper::getKBCategoriesTree('category_state', $category_state); $this->assignRef('lists', $lists); } parent::display($tpl); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); JToolBarHelper::title('RSTickets! Pro', 'rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_MANAGE_TICKETS'), 'index.php?option=com_rsticketspro&view=tickets'); JSubMenuHelper::addEntry(JText::_('RST_DEPARTMENTS'), 'index.php?option=com_rsticketspro&view=departments'); JSubMenuHelper::addEntry(JText::_('RST_GROUPS'), 'index.php?option=com_rsticketspro&view=groups'); JSubMenuHelper::addEntry(JText::_('RST_STAFF_MEMBERS'), 'index.php?option=com_rsticketspro&view=staff'); JSubMenuHelper::addEntry(JText::_('RST_PRIORITIES'), 'index.php?option=com_rsticketspro&view=priorities'); JSubMenuHelper::addEntry(JText::_('RST_STATUSES'), 'index.php?option=com_rsticketspro&view=statuses'); JSubMenuHelper::addEntry(JText::_('RST_KNOWLEDGEBASE'), 'index.php?option=com_rsticketspro&view=knowledgebase'); JSubMenuHelper::addEntry(JText::_('RST_EMAIL_MESSAGES'), 'index.php?option=com_rsticketspro&view=emails'); JSubMenuHelper::addEntry(JText::_('RST_CONFIGURATION'), 'index.php?option=com_rsticketspro&view=configuration'); $mainframe->triggerEvent('onAfterTicketsMenu'); JSubMenuHelper::addEntry(JText::_('RST_UPDATES'), 'index.php?option=com_rsticketspro&view=updates'); $this->assign('code', RSTicketsProHelper::getConfig('global_register_code')); parent::display($tpl); parent::display('version'); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); JToolBarHelper::title('RSTickets! Pro', 'rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_BACK_TO_RSTICKETSPRO'), 'index.php?option=com_rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_KNOWLEDGEBASE'), 'index.php?option=com_rsticketspro&view=knowledgebase'); JSubMenuHelper::addEntry(JText::_('RST_KB_CATEGORIES'), 'index.php?option=com_rsticketspro&view=kbcategories'); JSubMenuHelper::addEntry(JText::_('RST_KB_ARTICLES'), 'index.php?option=com_rsticketspro&view=kbcontent'); JSubMenuHelper::addEntry(JText::_('RST_KB_CONVERSION_RULES'), 'index.php?option=com_rsticketspro&view=kbrules'); JSubMenuHelper::addEntry(JText::_('RST_KB_TEMPLATE'), 'index.php?option=com_rsticketspro&view=kbtemplate', true); JToolBarHelper::apply('applykbtemplate'); JToolBarHelper::save('savekbtemplate'); JToolBarHelper::cancel('cancelkbtemplate'); $editor =& JFactory::getEditor(); $this->assignRef('editor', $editor); $config = RSTicketsProHelper::getConfig(); $this->assignRef('config', $config); parent::display($tpl); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } if ($mainframe->isSite()) { $pathway =& $mainframe->getPathway(); $pathway->addItem(JText::_('RST_MANAGE_SEARCHES'), RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=searches')); } $task = JRequest::getVar('task'); if ($task == 'edit' || $task == 'save') { $row = $this->get('search'); $this->assignRef('row', $row); if ($mainframe->isSite()) { $pathway->addItem($row->name, ''); } $lists['default'] = JHTML::_('select.booleanlist', 'default', '', $row->default); $this->assignRef('lists', $lists); } else { $this->assignRef('searches', $this->get('searches')); $this->assignRef('pagination', $this->get('pagination')); } if (RSTicketsProHelper::isJ16() && $mainframe->isSite()) { // Description if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } // Keywords if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } // Robots if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } } parent::display(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); $this->assignRef('article', $this->get('article')); if (RSTicketsProHelper::isJ16()) { // Description if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } // Keywords if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } // Robots if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } } parent::display($tpl); }
function __construct() { parent::__construct(); $this->_db = JFactory::getDBO(); $this->_query = $this->_buildQuery(); $document =& JFactory::getDocument(); jimport('joomla.plugin.helper'); if (JPluginHelper::isEnabled('system', 'mtupgrade') || RSTicketsProHelper::isJ16()) { $document->addScript(JURI::base() . 'components/com_rsticketspro/assets/js/rainbow12.js'); } else { $document->addScript(JURI::base() . 'components/com_rsticketspro/assets/js/rainbow.js'); } $document->addStyleSheet(JURI::base() . 'components/com_rsticketspro/assets/css/colorpicker.css'); $mainframe =& JFactory::getApplication(); $option = 'com_rsticketspro'; // Get pagination request variables $limit = $mainframe->getUserStateFromRequest($option . '.priorities.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $limitstart = $mainframe->getUserStateFromRequest($option . '.priorities.limitstart', 'limitstart', 0, 'int'); // In case limit has been changed, adjust it $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0; $this->setState($option . '.priorities.limit', $limit); $this->setState($option . '.priorities.limitstart', $limitstart); }
function _getIsStaff() { $this->is_staff = RSTicketsProHelper::isStaff(); }
</a></td> <td><?php echo $this->escape(JText::_($ticket->status_name)); ?> </td> </tr> <?php if (isset($ticket->message)) { ?> <tr> <td colspan="2" bgcolor="#FFFFFF"><?php echo JHTML::image('components/com_rsticketspro/assets/images/smallicon4.gif', '', 'class="rsticketspro_smallicon"'); echo JText::_('RST_REPLY'); ?> : <a href="<?php echo RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=ticket&cid=' . $ticket->id . ':' . JFilterOutput::stringURLSafe($ticket->subject)); ?> "><?php echo $this->trim(strip_tags($ticket->message)); ?> </a></td> </tr> <?php } ?> <?php } ?> </table> <?php } else {
if ($this->params->get('show_page_title', 1)) { ?> <div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?> "><?php echo $this->escape($this->row->subject); ?> </div> <?php } } ?> <?php echo RSTicketsProHelper::getConfig('global_message'); ?> <?php if ($this->ticket_view == 'plain' || $this->do_print) { ?> <div class="rsticketspro_halfbox rsticketspro_fullbox"> <?php echo $this->loadTemplate('reply'); ?> <div id="rsticketspro_accordion"> <?php echo $this->loadTemplate('info'); ?> <?php if ($this->show_time_spent) {
/** * @version 2.0.0 * @package RSTickets! Pro 2.0.0 * @copyright (C) 2010 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-2.0.html */ defined('_JEXEC') or die('Restricted access'); JHTML::_('behavior.tooltip'); ?> <?php echo RSTicketsProHelper::getConfig('global_message'); ?> <form id="rsticketspro_form" action="<?php echo RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=tickets'); ?> " method="post" name="adminForm" id="adminForm"> <table cellspacing="0" cellpadding="0" border="0" width="100%" class="admintable"> <tr> <td width="150" align="right" class="key"><span class="hasTip" title="<?php echo JText::_('RST_SEARCH_TEXT_DESC'); ?> "><label for="filter_word"><?php echo JText::_('RST_SEARCH_TEXT'); ?> </label></span></td> <td><input type="text" name="filter_word" id="filter_word" size="40" value="" class="inputbox" /></td> </tr> <tr> <td width="150" align="right" class="key"><label class="float_left" for="customer"><span class="hasTip" title="<?php
function getResults() { $option = 'com_rsticketspro'; $value = $this->getResultsWord(); if (!$value) { return array(); } $escvalue = $this->_db->getEscaped($value); $escvalue = str_replace('%', '\\%', $escvalue); $escvalue = str_replace(' ', '%', $escvalue); $is_staff = RSTicketsProHelper::isStaff(); if (!$is_staff) { $this->_db->setQuery("SELECT id FROM #__rsticketspro_kb_categories c WHERE c.private='0' AND c.published='1'"); } else { $this->_db->setQuery("SELECT id FROM #__rsticketspro_kb_categories c WHERE c.published='1'"); } $cat_ids = $this->_db->loadResultArray(); $results = $this->_getList("SELECT c.*, cat.name AS category_name FROM #__rsticketspro_kb_content c LEFT JOIN #__rsticketspro_kb_categories cat ON (c.category_id=cat.id) WHERE (c.name LIKE '%" . $escvalue . "%' OR c.text LIKE '%" . $escvalue . "%') " . ($is_staff ? "" : " AND c.`private`='0'") . " AND c.published=1 " . ($cat_ids ? " AND c.category_id IN (" . implode(",", $cat_ids) . ")" : "") . " ORDER BY cat.ordering, c.ordering", $this->getState($option . '.categories.limitstart'), $this->getState($option . '.categories.limit')); $this->_total = 0; if ($results) { $this->_db->setQuery("SELECT COUNT(id) FROM #__rsticketspro_kb_content c WHERE (c.name LIKE '%" . $escvalue . "%' OR c.text LIKE '%" . $escvalue . "%') " . ($is_staff ? "" : " AND c.`private`='0'") . " AND c.published=1 " . ($cat_ids ? " AND c.category_id IN (" . implode(",", $cat_ids) . ")" : "")); $this->_total = $this->_db->loadResult(); } return $results; }