function display($tpl = null) { require_once JPATH_COMPONENT_ADMINISTRATOR . '/views/common.php'; // layout start if ($layoutName == 'fieldsordering') { // field ordering $fieldfor = JRequest::getVar('ff', 0); $session = JFactory::getSession(); $session->set('fieldfor', $fieldfor); $fieldfor = $session->get('fieldfor'); JToolBarHelper::publishlist('fieldordering.fieldpublished'); JToolBarHelper::unpublishlist('fieldordering.fieldunpublished'); JToolBarHelper::custom('fieldordering.visitorfieldpublished', 'visitorpublishedbutton', '', 'Visitor Publish', true); JToolBarHelper::custom('fieldordering.visitorfieldunpublished', 'visitorunpublishedbutton', '', 'Visitor Unpublish', true); JToolBarHelper::custom('fieldordering.fieldrequired', 'required', '', 'Required', true); JToolBarHelper::custom('fieldordering.fieldnotrequired', 'notrequired', '', 'Not Required', true); if ($fieldfor) { $_SESSION['fford'] = $fieldfor; } else { $fieldfor = $_SESSION['fford']; } if ($fieldfor == 11 || $fieldfor == 12 || $fieldfor == 13) { JToolBarHelper::title(JText::_('JS_VISITOR_FIELDS')); } else { JToolBarHelper::title(JText::_('JS_FIELDS')); } $result = $this->getJSModel('fieldordering')->getFieldsOrdering($fieldfor, $limitstart, $limit); // 1 for company $items = $result[0]; $total = $result[1]; if ($total <= $limitstart) { $limitstart = 0; } $pagination = new JPagination($total, $limitstart, $limit); $this->assignRef('pagination', $pagination); } // layout end $this->assignRef('config', $config); $this->assignRef('ff', $fieldfor); $this->assignRef('application', $application); $this->assignRef('items', $items); $this->assignRef('theme', $theme); $this->assignRef('option', $option); $this->assignRef('uid', $uid); $this->assignRef('msg', $msg); $this->assignRef('isjobsharing', $_client_auth_key); parent::display($tpl); }
function display($tpl = null) { require_once JPATH_COMPONENT_ADMINISTRATOR . '/views/common.php'; // layout start if ($layoutName == 'formcountry') { // countries if (isset($_GET['cid'][0])) { $c_id = $_GET['cid'][0]; } else { $c_id = ''; } if ($c_id == '') { $cids = JRequest::getVar('cid', array(0), 'post', 'array'); $c_id = $cids[0]; } if (is_numeric($c_id) == true and $c_id != 0) { $country = $this->getJSModel('country')->getCountrybyId($c_id); } if (isset($country->id)) { $isNew = false; } $text = $isNew ? JText::_('ADD') : JText::_('EDIT'); JToolBarHelper::title(JText::_('JS_COUNTRY') . ': <small><small>[ ' . $text . ' ]</small></small>'); $this->assignRef('country', $country); JToolBarHelper::save('country.savecountry'); if ($isNew) { JToolBarHelper::cancel('country.cancel'); } else { JToolBarHelper::cancel('country.cancel', 'Close'); } } elseif ($layoutName == 'countries') { // countries JToolBarHelper::title(JText::_('JS_COUNTRIES')); JToolBarHelper::addNew('country.editjobcountry'); JToolBarHelper::editList('country.editjobcountry'); JToolBarHelper::publishlist('country.publishcountries'); JToolBarHelper::unpublishlist('country.unpublishcountries'); JToolBarHelper::deleteList(JText::_('JS_ARE_YOU_SURE'), 'country.deletecountry'); $form = 'com_jsjobs.countries.list.'; $searchname = $mainframe->getUserStateFromRequest($form . 'searchname', 'searchname', '', 'string'); $result = $this->getJSModel('country')->getAllCountries($searchname, $limitstart, $limit); $items = $result[0]; $total = $result[1]; if (isset($result[2])) { $this->assignRef('lists', $result[2]); } if ($total <= $limitstart) { $limitstart = 0; } $pagination = new JPagination($total, $limitstart, $limit); $this->assignRef('pagination', $pagination); } $this->assignRef('config', $config); $this->assignRef('application', $application); $this->assignRef('items', $items); $this->assignRef('theme', $theme); $this->assignRef('option', $option); $this->assignRef('uid', $uid); $this->assignRef('msg', $msg); $this->assignRef('isjobsharing', $_client_auth_key); parent::display($tpl); }