/**
  * Generates a list of JSON items.
  *
  * @return    void
  */
 public function display($tpl = null)
 {
     $model = $this->getModel();
     $this->item = $this->get('Item');
     $this->component = $model->getState($model->getName() . '.component');
     $this->section = $model->getState($model->getName() . '.section');
     $this->asset_id = $model->getState($model->getName() . '.asset_id');
     $this->project_id = $model->getState($model->getName() . '.project_id');
     $this->inherit = $model->getState($model->getName() . '.inherit');
     if (!$this->asset_id && $this->inherit) {
         $this->asset_id = $this->getComponentProjectAssetId($this->component, $this->project_id);
     }
     $this->rules = $this->getAssetRules();
     $this->public_groups = array('1', JComponentHelper::getParams('com_users')->get('guest_usergroup', 1));
     $user = JFactory::getUser();
     if (!$user->authorise('core.admin', $this->component) && !$user->authorise('core.manage', $this->component)) {
         JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR'));
         return false;
     }
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseWarning(500, implode("\n", $errors));
         return false;
     }
     parent::display($tpl);
 }
Example #2
1
 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed   A string if successful, otherwise a Error object.
  */
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Preprocess the list of items to find ordering divisions.
     foreach ($this->items as &$item) {
         $this->ordering[$item->parent_id][] = $item->id;
     }
     // Levels filter.
     $options = array();
     $options[] = JHtml::_('select.option', '1', JText::_('J1'));
     $options[] = JHtml::_('select.option', '2', JText::_('J2'));
     $options[] = JHtml::_('select.option', '3', JText::_('J3'));
     $options[] = JHtml::_('select.option', '4', JText::_('J4'));
     $options[] = JHtml::_('select.option', '5', JText::_('J5'));
     $options[] = JHtml::_('select.option', '6', JText::_('J6'));
     $options[] = JHtml::_('select.option', '7', JText::_('J7'));
     $options[] = JHtml::_('select.option', '8', JText::_('J8'));
     $options[] = JHtml::_('select.option', '9', JText::_('J9'));
     $options[] = JHtml::_('select.option', '10', JText::_('J10'));
     $this->f_levels = $options;
     // We don't need toolbar in the modal window.
     if ($this->getLayout() !== 'modal') {
         $this->addToolbar();
     }
     parent::display($tpl);
 }
Example #3
1
 /**
  * sauto view display method.
  *
  * @param string $tpl The name of the template file to parse;
  *
  * @return void
  */
 public function display($tpl = null)
 {
     $app =& JFactory::getApplication();
     $link_redirect = JRoute::_('index.php?option=com_sauto');
     $user =& JFactory::getUser();
     $uid = $user->id;
     if ($uid == 0) {
         //vizitator
         $app->redirect($link_redirect, JText::_('SAUTO_PAGE_NOT_EXIST'));
     } else {
         $db = JFactory::getDbo();
         $query = "SELECT `tip_cont` FROM #__sa_profiles WHERE `uid` = '" . $uid . "'";
         $db->setQuery($query);
         $type = $db->loadResult();
         if ($type == 0) {
             //cont customer
             $tpl = '0';
         } elseif ($type == 1) {
             //cont dealer
             $tpl = '1';
         } else {
             $app->redirect($link_redirect, JText::_('SAUTO_PAGE_NOT_EXIST'));
         }
         parent::display($tpl);
     }
 }
Example #4
0
 protected function assignExtrasView()
 {
     // Create the View
     $view = new JViewLegacy(array('name' => 'extras', 'base_path' => JPATH_SITE . '/components/com_rsmembership'));
     // Create the Model
     $model = JModelLegacy::getInstance('Extras', 'RSMembershipModel');
     // Assign the Model to the View and set it as default.
     $view->setModel($model, true);
     $view->model =& $model;
     $view->item = $this->membership;
     $view->extras = $model->getItems();
     $view->show_subscribe_btn = false;
     $this->extrasview = $view->loadTemplate();
 }
Example #5
0
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $pathway = $app->getPathWay();
     $menus = $app->getMenu();
     $menu = $menus->getActive();
     $params = $app->getParams();
     $this->assignRef('params', $params);
     $id = $params->get('course_id');
     if (!$id) {
         $id = JRequest::getVar('course_id');
     }
     $id = (int) $id;
     if (!$id) {
         echo JText::_('COM_JOOMDLE_NO_COURSE_SELECTED');
         return;
     }
     $this->course_info = JoomdleHelperContent::getCourseInfo($id);
     $this->student_no = JoomdleHelperContent::getCourseStudentsNo($id);
     $this->assignments = JoomdleHelperContent::getAssignmentSubmissions($id);
     $this->grades = JoomdleHelperContent::getAssignmentGrades($id);
     $this->daily_stats = JoomdleHelperContent::getCourseDailyStats($id);
     if (is_object($menu) && $menu->query['view'] != 'coursestats') {
         $pathway->addItem($this->course_info['fullname'], '');
     }
     $document = JFactory::getDocument();
     $document->setTitle($this->course_info['fullname'] . ': ' . JText::_('COM_JOOMDLE_STATS'));
     parent::display($tpl);
 }
Example #6
0
 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a Error object.
  *
  * @see     JViewLegacy::loadTemplate()
  * @since   12.2
  */
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     /** @var $app JApplicationSite */
     $this->layout = $this->getLayout();
     switch ($this->layout) {
         case "contact":
             $this->prepareContact();
             break;
         case "social":
             $this->prepareSocialProfiles();
             break;
         default:
             // Basic data for the profile.
             $this->prepareBasic();
             break;
     }
     $userId = JFactory::getUser()->id;
     if (!$userId) {
         $app->enqueueMessage(JText::_("COM_SOCIALCOMMUNITY_ERROR_NOT_LOG_IN"), "notice");
         $app->redirect(JRoute::_('index.php?option=com_users&view=login', false));
         return;
     }
     // Prepare layout data.
     $this->layoutData = new JData();
     $this->layoutData->layout = $this->layout;
     $this->prepareDocument();
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     $entry = $this->get('Data');
     $characters_length = $this->get('CharactersLength');
     $robots_array = array('', 'index, follow', 'noindex, follow', 'index, nofollow', 'noindex, nofollow');
     if (empty($entry->id)) {
         JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_NEWENTRY'), 'easyfrontendseo-add');
         JToolBarHelper::save('save');
         JToolBarHelper::cancel('cancel');
     } else {
         JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_EDITENTRY'), 'easyfrontendseo-edit');
         JToolbarHelper::apply('apply');
         JToolBarHelper::save('save');
         JToolBarHelper::cancel('cancel', 'Close');
     }
     JHTML::_('behavior.framework');
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_easyfrontendseo/css/easyfrontendseo.css');
     $document->addScript('components/com_easyfrontendseo/js/wordcount.js', 'text/javascript');
     $output = "window.addEvent('domready', function(){";
     $output .= "new WordCount('counter_title', {inputName:'title', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_title', {inputName:'title', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_description', {inputName:'description', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_description', {inputName:'description', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_keywords', {inputName:'keywords', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_keywords', {inputName:'keywords', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_generator', {inputName:'generator', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_generator', {inputName:'generator', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= " });";
     $document->addScriptDeclaration($output, 'text/javascript');
     $this->entry = $entry;
     $this->characters_length = $characters_length;
     $this->robots_array = $robots_array;
     // Get donation code message
     require_once JPATH_COMPONENT . '/helpers/easyfrontendseo.php';
     $donation_code_message = EasyFrontendSeoHelper::getDonationCodeMessage();
     $this->donation_code_message = $donation_code_message;
     parent::display($tpl);
 }
Example #8
0
 function display($tpl = null)
 {
     $lists = array();
     $condition = $this->get('condition');
     $optionFields = $this->get('optionFields');
     $allFields = $this->get('allFields');
     foreach ($allFields as $field) {
         foreach ($optionFields as $i => $optionField) {
             if ($field->ComponentId == $optionField->ComponentId) {
                 $optionField->ComponentName = $field->PropertyValue;
                 $optionFields[$i] = $optionField;
                 break;
             }
         }
     }
     $actions = array(JHTML::_('select.option', 'show', JText::_('RSFP_CONDITION_SHOW')), JHTML::_('select.option', 'hide', JText::_('RSFP_CONDITION_HIDE')));
     $lists['action'] = JHTML::_('select.genericlist', $actions, 'action', '', 'value', 'text', $condition->action);
     $blocks = array(JHTML::_('select.option', 1, JText::_('RSFP_CONDITION_BLOCK')), JHTML::_('select.option', 0, JText::_('RSFP_CONDITION_FIELD')));
     $lists['block'] = JHTML::_('select.genericlist', $blocks, 'block', '', 'value', 'text', $condition->block);
     $conditions = array(JHTML::_('select.option', 'all', JText::_('RSFP_CONDITION_ALL')), JHTML::_('select.option', 'any', JText::_('RSFP_CONDITION_ANY')));
     $lists['condition'] = JHTML::_('select.genericlist', $conditions, 'condition', '', 'value', 'text', $condition->condition);
     $operators = array(JHTML::_('select.option', 'is', JText::_('RSFP_CONDITION_IS')), JHTML::_('select.option', 'is_not', JText::_('RSFP_CONDITION_IS_NOT')));
     $lists['allfields'] = JHTML::_('select.genericlist', $allFields, 'component_id', '', 'ComponentId', 'PropertyValue', $condition->component_id);
     $this->lang = $this->get('lang');
     $this->operators = $operators;
     $this->allFields = $allFields;
     $this->optionFields = $optionFields;
     $this->formId = $this->get('formId');
     $this->close = JRequest::getInt('close');
     $this->condition = $condition;
     $this->lists = $lists;
     parent::display($tpl);
 }
Example #9
0
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->params = $this->state->get("params");
     $currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->state->params->get("project_currency"));
     $this->amount = new Crowdfunding\Amount($this->params);
     $this->amount->setCurrency($currency);
     // Get rewards number
     $usersIds = array();
     foreach ($this->items as $item) {
         $usersIds[] = $item->id;
     }
     // Get number of rewards.
     $statistics = new Crowdfunding\Statistics\Users(JFactory::getDbo(), $usersIds);
     $this->projects = $statistics->getProjectsNumber();
     $this->amounts = $statistics->getAmounts();
     // Add submenu
     CrowdfundingHelper::addSubmenu($this->getName());
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }
Example #10
0
 /**
  * Renders the view
  *
  * @param   string  $tpl  Template name
  *
  * @return void
  *
  * @since  2.5.4
  */
 public function display($tpl = null)
 {
     // Get data from the model
     $this->state = $this->get('State');
     // Load useful classes
     $model = $this->getModel();
     $this->loadHelper('select');
     // Assign view variables
     $ftp = $model->getFTPOptions();
     $this->assign('updateInfo', $model->getUpdateInformation());
     $this->assign('methodSelect', JoomlaupdateHelperSelect::getMethods($ftp['enabled']));
     // Set the toolbar information
     JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
     JToolbarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false);
     // Add toolbar buttons
     JToolbarHelper::preferences('com_joomlaupdate');
     // Load mooTools
     JHtml::_('behavior.framework', true);
     // Load our Javascript
     $document = JFactory::getDocument();
     $document->addScript('../media/com_joomlaupdate/default.js');
     JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
     // Render the view
     parent::display($tpl);
 }
Example #11
0
 function display($tpl = null)
 {
     $state = $this->get('State');
     $this->params = $state->get("parameters.menu");
     $categoryId = JRequest::getVar('categoryId');
     $this->assignRef('categoryId', $categoryId);
     $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings();
     $events = $this->get('Events');
     $this->assignRef('events', $events);
     //dump($events);
     $categories = $this->get('Categories');
     $this->assignRef('categories', $categories);
     if ($this->appSettings->enable_search_filter_events) {
         $serachFilter = $this->get('SeachFilter');
         $this->assignRef('searchFilter', $serachFilter);
     }
     $categoryId = $this->get('CategoryId');
     if (!empty($categoryId)) {
         $this->categoryId = $categoryId;
         $this->category = $this->get('Category');
     }
     $pagination = $this->get('Pagination');
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
 public function display($tpl = null)
 {
     $this->option = JFactory::getApplication()->input->get('option');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Get parameters of com_crowdfunding.
     /** @var  $cParams Joomla\Registry\Registry */
     $cParams = JComponentHelper::getParams('com_crowdfunding');
     $this->cfParams = $cParams;
     $currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->cfParams->get('project_currency'));
     $this->amount = new Crowdfunding\Amount($this->cfParams);
     $this->amount->setCurrency($currency);
     // Get rewards number
     $projectsIds = array();
     foreach ($this->items as $item) {
         $projectsIds[] = $item->id;
     }
     $projects = new Crowdfunding\Projects(JFactory::getDbo());
     $this->transactions = $projects->getTransactionsNumber($projectsIds);
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }
Example #13
0
    /**
     * Renders the view
     *
     * @param   string  $tpl  Template name
     *
     * @return void
     */
    public function display($tpl = null)
    {
        $password = JFactory::getApplication()->getUserState('com_joomlaupdate.password', null);
        $filesize = JFactory::getApplication()->getUserState('com_joomlaupdate.filesize', null);
        $ajaxUrl = JUri::base() . 'components/com_joomlaupdate/restore.php';
        $returnUrl = 'index.php?option=com_joomlaupdate&task=update.finalise';
        // Set the toolbar information
        JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
        JToolBarHelper::divider();
        JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE');
        // Add toolbar buttons
        if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) {
            JToolbarHelper::preferences('com_joomlaupdate');
        }
        // Load mooTools
        JHtml::_('behavior.framework', true);
        $updateScript = <<<ENDSCRIPT
var joomlaupdate_password = '******';
var joomlaupdate_totalsize = '{$filesize}';
var joomlaupdate_ajax_url = '{$ajaxUrl}';
var joomlaupdate_return_url = '{$returnUrl}';

ENDSCRIPT;
        // Load our Javascript
        $document = JFactory::getDocument();
        $document->addScript('../media/com_joomlaupdate/json2.js');
        $document->addScript('../media/com_joomlaupdate/encryption.js');
        $document->addScript('../media/com_joomlaupdate/update.js');
        JHtml::_('script', 'system/progressbar.js', true, true);
        JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
        $document->addScriptDeclaration($updateScript);
        // Render the view
        parent::display($tpl);
    }
Example #14
0
 function display($tpl = null)
 {
     // Initialise variables.
     $this->item = $this->get('Item');
     $this->_prepareDocument();
     parent::display($tpl);
 }
Example #15
0
 /**
  * The default method that will display the output of this view which is called by
  * Joomla
  *
  * @param	string template	Template file name
  **/
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     //$search				= $mainframe->getUserStateFromRequest( "com_community.videos.search", 'search', '', 'string' );
     $search = JRequest::getVar('search', '');
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_COMMUNITY_VIDEOS'), 'videos');
     // Add the necessary buttons
     JToolbarHelper::custom('fetchThumbnail', 'pictures', '', JText::_('COM_COMMUNITY_FETCH_THUMBNAIL'));
     JToolBarHelper::trash('delete', JText::_('COM_COMMUNITY_DELETE'));
     JToolBarHelper::publishList('publish', JText::_('COM_COMMUNITY_PUBLISH'));
     JToolBarHelper::unpublishList('unpublish', JText::_('COM_COMMUNITY_UNPUBLISH'));
     $videos = $this->get('Videos');
     $pagination = $this->get('Pagination');
     $categories = $this->get('Categories');
     foreach ($videos as $key => $vid) {
         foreach ($categories as $cat) {
             $videos[$key]->categoryName = '';
             if ($cat->id == $vid->category_id) {
                 $videos[$key]->categoryName = $cat->name;
                 break;
             }
         }
     }
     $catHTML = $this->_getCategoriesHTML($categories);
     $this->assignRef('videos', $videos);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('search', $search);
     $this->assignRef('categories', $catHTML);
     parent::display($tpl);
 }
Example #16
0
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     ContentHelper::addSubmenu('featured');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->authors = $this->get('Authors');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Levels filter.
     $options = array();
     $options[] = JHtml::_('select.option', '1', JText::_('J1'));
     $options[] = JHtml::_('select.option', '2', JText::_('J2'));
     $options[] = JHtml::_('select.option', '3', JText::_('J3'));
     $options[] = JHtml::_('select.option', '4', JText::_('J4'));
     $options[] = JHtml::_('select.option', '5', JText::_('J5'));
     $options[] = JHtml::_('select.option', '6', JText::_('J6'));
     $options[] = JHtml::_('select.option', '7', JText::_('J7'));
     $options[] = JHtml::_('select.option', '8', JText::_('J8'));
     $options[] = JHtml::_('select.option', '9', JText::_('J9'));
     $options[] = JHtml::_('select.option', '10', JText::_('J10'));
     $this->f_levels = $options;
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #17
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     JFactory::getLanguage()->load('com_categories');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Preprocess the list of items to find ordering divisions.
     foreach ($this->items as &$item) {
         $this->ordering[$item->parent_id][] = $item->id;
     }
     // Levels filter.
     $options = array();
     $options[] = JHtml::_('select.option', '1', JText::_('J1'));
     $options[] = JHtml::_('select.option', '2', JText::_('J2'));
     $options[] = JHtml::_('select.option', '3', JText::_('J3'));
     $options[] = JHtml::_('select.option', '4', JText::_('J4'));
     $options[] = JHtml::_('select.option', '5', JText::_('J5'));
     $options[] = JHtml::_('select.option', '6', JText::_('J6'));
     $options[] = JHtml::_('select.option', '7', JText::_('J7'));
     $options[] = JHtml::_('select.option', '8', JText::_('J8'));
     $options[] = JHtml::_('select.option', '9', JText::_('J9'));
     $options[] = JHtml::_('select.option', '10', JText::_('J10'));
     $this->assign('f_levels', $options);
     $this->assign('listsGroup', $this->get('Groups'));
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #18
0
 function display($tpl = null)
 {
     $this->categories = $this->get('Categories');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->countItems = $this->get('CountItems');
     $this->pagination = $this->get('Pagination');
     /*
     		jimport('joomla.html.pagination');		
     		$limit = JRequest::getVar('limit', '25', '', 'int');
     		$limitstart = JRequest::getVar('limitstart', '0', '', 'int');		
     		$pagination = new JPagination($this->countItems, $limitstart, $limit);
     		$this->pagination  = $pagination;*/
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     $version = new JVersion();
     if (version_compare($version->getShortVersion(), '3.0.0', '<')) {
         $tpl = 'legacy';
     } else {
         /*JHtmlSidebar::addFilter(
         			JText::_('JOPTION_SELECT_CATEGORY'),
         			'filter_category',
         			JHtml::_('select.options', DJClassifiedsCategory::getCatSelect(), 'value', 'text', $this->state->get('filter.category'), true)
         		);*/
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', array(JHtml::_('select.option', '1', 'JPUBLISHED'), JHtml::_('select.option', '0', 'JUNPUBLISHED')), 'value', 'text', $this->state->get('filter.published'), true));
         JHtmlSidebar::addFilter(JText::_('COM_DJCLASSIFIEDS_SELECT_ACTIVE'), 'filter_active', JHtml::_('select.options', array(JHtml::_('select.option', '1', 'COM_DJCLASSIFIEDS_ACTIVE'), JHtml::_('select.option', '0', 'COM_DJCLASSIFIEDS_HIDE')), 'value', 'text', $this->state->get('filter.active'), true));
         $this->sidebar = JHtmlSidebar::render();
     }
     parent::display($tpl);
 }
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     if ($this->getLayout() == 'pagebreak') {
         // TODO: This is really dogy - should change this one day.
         $eName = JRequest::getVar('e_name');
         $eName = preg_replace('#[^A-Z0-9\\-\\_\\[\\]]#i', '', $eName);
         $document = JFactory::getDocument();
         $document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE'));
         $this->assignRef('eName', $eName);
         parent::display($tpl);
         return;
     }
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     parent::display($tpl);
 }
Example #20
0
 /**
  * Method to display the view.
  *
  * @param   string  $tpl  A template file to load. [optional]
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  *
  * @since   2.5
  */
 public function display($tpl = null)
 {
     // Load plug-in language files.
     FinderHelperLanguage::loadPluginLanguage();
     $this->items = $this->get('Items');
     $this->total = $this->get('Total');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->pluginState = $this->get('pluginState');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     FinderHelper::addSubmenu('index');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     if (!$this->pluginState['plg_content_finder']->enabled) {
         JFactory::getApplication()->enqueueMessage(JText::_('COM_FINDER_INDEX_PLUGIN_CONTENT_NOT_ENABLED'), 'warning');
     } elseif ($this->get('TotalIndexed') === 0) {
         JFactory::getApplication()->enqueueMessage(JText::_('COM_FINDER_INDEX_NO_DATA') . '  ' . JText::_('COM_FINDER_INDEX_TIP'), 'notice');
     }
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     // Configure the toolbar.
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #21
0
 /**
  * Method to display the view.
  *
  * @param	string	The template file to include
  * @since	1.5
  */
 function display($tpl = null)
 {
     // This name will be used to get the model
     $name = $this->getLayout();
     // Check that the name is valid - has an associated model.
     if (!in_array($name, array('confirm', 'complete'))) {
         $name = 'default';
     }
     if ('default' == $name) {
         $formname = 'Form';
     } else {
         $formname = ucfirst($this->_name) . ucfirst($name) . 'Form';
     }
     // Get the view data.
     $this->form = $this->get($formname);
     $this->state = $this->get('State');
     $this->params = $this->state->params;
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         App::abort(500, implode('<br />', $errors));
         return false;
     }
     //Escape strings for HTML output
     $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
     $this->prepareDocument();
     $password_rules = \Hubzero\Password\Rule::getRules();
     $this->password_rules = array();
     foreach ($password_rules as $rule) {
         if (!empty($rule['description'])) {
             $this->password_rules[] = $rule['description'];
         }
     }
     parent::display($tpl);
 }
Example #22
0
 function display($tpl = null)
 {
     switch ($this->getlayout()) {
         case 'delete':
             $this->prepareDelete();
             break;
         case 'edit':
         case 'error':
             $this->prepareDisplay();
             break;
         case 'edit2':
             $this->prepareDisplay();
             $this->prepareDisplay_Ajax();
             break;
         default:
             break;
     }
     if (JCck::on()) {
         $this->css = array('_' => '', 'panel_height' => '89px', 'w30' => 'span4', 'w70' => 'span8', 'wrapper' => 'container', 'wrapper2' => 'row-fluid', 'wrapper_tmpl' => 'span');
         $this->js = array('_' => '', 'tooltip' => '$(".hasTooltip").tooltip({});');
     } else {
         $this->css = array('_' => '', 'panel_height' => '65px', 'w30' => 'width-30', 'w70' => 'width-70 fltlft', 'wrapper' => 'sebwrapper', 'wrapper2' => 'seb-wrapper workshop', 'wrapper_tmpl' => 'width-100 bg-dark fltlft');
         $this->js = array('_' => '', 'tooltip' => '');
     }
     $this->uix = 'full';
     parent::display($tpl);
 }
Example #23
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>', 'fst_prods');
     if (FST_Helper::Is16()) {
         JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false);
         JToolBarHelper::spacer();
     }
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSTAdminHelper::DoSubToolbar();
     $this->assignRef('prod', $prod);
     $path = JPATH_SITE . DS . 'images' . DS . 'fst' . 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->assignRef('lists', $lists);
     parent::display($tpl);
 }
Example #24
0
 /**
  * Method to display the view.
  *
  * @param   string  The template file to include
  * @since   1.5
  */
 public function display($tpl = null)
 {
     // This name will be used to get the model
     $name = $this->getLayout();
     // Check that the name is valid - has an associated model.
     if (!in_array($name, array('confirm', 'complete'))) {
         $name = 'default';
     }
     if ('default' == $name) {
         $formname = 'Form';
     } else {
         $formname = ucfirst($this->_name) . ucfirst($name) . 'Form';
     }
     // Get the view data.
     $this->form = $this->get($formname);
     $this->state = $this->get('State');
     $this->params = $this->state->params;
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     //Escape strings for HTML output
     $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
     $this->prepareDocument();
     parent::display($tpl);
 }
Example #25
0
 public function display($tpl = null)
 {
     // Initialise variables
     $this->state = $this->get("State");
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Get params
     $this->params = $this->state->get("params");
     /** @var  $this->params Joomla\Registry\Registry */
     $this->numberInRow = $this->params->get("items_row", 3);
     $this->items = CrowdfundingHelper::prepareItems($this->items, $this->numberInRow);
     // Get the folder with images
     $this->imageFolder = $this->params->get("images_directory", "images/crowdfunding");
     // Get currency
     $currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->params->get("project_currency"));
     $this->amount = new Crowdfunding\Amount($this->params);
     $this->amount->setCurrency($currency);
     $this->displayCreator = $this->params->get("integration_display_creator", true);
     // Prepare social integration.
     if (!empty($this->displayCreator)) {
         $socialProfilesBuilder = new Prism\Integration\Profiles\Builder(array("social_platform" => $this->params->get("integration_social_platform"), "users_ids" => CrowdfundingHelper::fetchUserIds($this->items)));
         $socialProfilesBuilder->build();
         $this->socialProfiles = $socialProfilesBuilder->getProfiles();
     }
     $this->layoutData = array("items" => $this->items, "params" => $this->params, "amount" => $this->amount, "socialProfiles" => $this->socialProfiles, "imageFolder" => $this->imageFolder, "titleLength" => $this->params->get("discover_title_length", 0), "descriptionLength" => $this->params->get("discover_description_length", 0), "span" => !empty($this->numberInRow) ? round(12 / $this->numberInRow) : 4);
     $this->prepareDocument();
     parent::display($tpl);
 }
 /**
  * Display the view
  *
  * @return	mixed	False on error, null otherwise.
  */
 function display($tpl = null)
 {
     // Initialise variables
     $state = $this->get('State');
     $items = $this->get('Items');
     $parent = $this->get('Parent');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseWarning(500, implode("\n", $errors));
         return false;
     }
     if ($items === false) {
         JError::raiseError(404, JText::_('COM_CONTENT_ERROR_CATEGORY_NOT_FOUND'));
         return false;
     }
     if ($parent == false) {
         JError::raiseError(404, JText::_('COM_CONTENT_ERROR_PARENT_CATEGORY_NOT_FOUND'));
         return false;
     }
     $params =& $state->params;
     $items = array($parent->id => $items);
     //Escape strings for HTML output
     $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
     $this->maxLevelcat = $params->get('maxLevelcat', -1);
     $this->assignRef('params', $params);
     $this->assignRef('parent', $parent);
     $this->assignRef('items', $items);
     $this->_prepareDocument();
     parent::display($tpl);
 }
Example #27
0
 function display($tpl = null)
 {
     $layout = JRequest::getVar('layout');
     $model = $this->getModel();
     $liga = $model->getCLMLiga();
     $this->assignRef('liga', $liga);
     $model = $this->getModel();
     $spieler = $model->getCLMSpieler();
     $this->assignRef('spieler', $spieler);
     $model = $this->getModel();
     $count = $model->getCLMCount();
     $this->assignRef('count', $count);
     $model = $this->getModel();
     $clmuser = $model->getCLMCLMuser();
     $this->assignRef('clmuser', $clmuser);
     if (!isset($layout) or $layout == '') {
         $model = $this->getModel();
         $access = $model->getCLMAccess();
         $this->assignRef('access', $access);
     }
     $model = $this->getModel();
     $abgabe = $model->getCLMAbgabe();
     $this->assignRef('abgabe', $abgabe);
     $model = $this->getModel();
     $mllist = $model->getCLMML();
     $this->assignRef('mllist', $mllist);
     parent::display($tpl);
 }
Example #28
0
	/**
	 *  Displays the list view
 	 * @param string $tpl   
     */
	public function display($tpl = null)
	{
		
		$this->items		= $this->get('Items');
		$this->pagination	= $this->get('Pagination');
		$this->state		= $this->get('State');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode("\n", $errors));
			return false;
		}

		TagnyilvantartasHelper::addSubmenu('cimkeks');

		$this->addToolbar();
		if(!version_compare(JVERSION,'3','<')){
			$this->sidebar = JHtmlSidebar::render();
		}
		
		if(version_compare(JVERSION,'3','<')){
			$tpl = "25";
		}
		parent::display($tpl);
	}
Example #29
0
 /**
  * Display the Hello World view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $context = "business.list.admin.business";
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->filter_order = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'businessName', 'cmd');
     $this->filter_order_Dir = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', 'asc', 'cmd');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     BusinessHelper::addSubmenu('logstamps');
     // Set the toolbar
     $this->addToolBar();
     // Display the template
     parent::display($tpl);
     // Set the document
     $this->setDocument();
 }
Example #30
-1
 /**
  * Displays the form
  *
  * @param   string  $tpl  - The tmpl
  *
  * @return  mixed|void
  */
 public function display($tpl = null)
 {
     if (MatukioHelperSettings::getSettings('rss_feed', 1) == 0) {
         JError::raiseError(403, JText::_("ALERTNOTAUTH"));
     }
     $database = JFactory::getDBO();
     $neudatum = MatukioHelperUtilsDate::getCurrentDate();
     $where = array();
     $database->setQuery("SELECT id, access FROM #__categories WHERE extension='" . JFactory::getApplication()->input->get('option') . "'");
     $cats = $database->loadObjectList();
     $allowedcat = array();
     foreach ($cats as $cat) {
         if ($cat->access < 1) {
             $allowedcat[] = $cat->id;
         }
     }
     if (count($allowedcat) > 0) {
         $allowedcat = implode(',', $allowedcat);
         $where[] = "a.catid IN ({$allowedcat})";
     }
     $where[] = "a.published = '1'";
     $where[] = "a.end > '{$neudatum}'";
     $where[] = "a.booked > '{$neudatum}'";
     $database->setQuery("SELECT a.*, r.*, cat.title AS category FROM #__matukio_recurring AS r\r\n\t\t LEFT JOIN #__matukio AS a ON r.event_id = a.id\r\n\t\t LEFT JOIN #__categories AS cat ON cat.id = a.catid" . (count($where) ? "\nWHERE " . implode(' AND ', $where) : "") . "\nORDER BY r.begin ASC" . "\nLIMIT 0, 1000");
     $rows = $database->loadObjectList();
     $this->rows = $rows;
     parent::display($tpl);
 }