[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/administrator/components/com_search/views/search/ -> view.php (source)

   1  <?php
   2  /**
   3  * @version        $Id: view.php 17299 2010-05-27 16:06:54Z ian $
   4  * @package        Joomla
   5  * @subpackage    Search
   6  * @copyright    Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
   7  * @license        GNU/GPL, see LICENSE.php
   8  * Joomla! is free software. This version may have been modified pursuant
   9  * to the GNU General Public License, and as distributed it includes or
  10  * is derivative of works licensed under the GNU General Public License or
  11  * other free or open source software licenses.
  12  * See COPYRIGHT.php for copyright notices and details.
  13  */
  14  
  15  // no direct access
  16  defined( '_JEXEC' ) or die( 'Restricted access' );
  17  
  18  jimport('joomla.application.component.view');
  19  
  20  /**
  21   * @package        Joomla
  22   * @subpackage    Search
  23   * @since 1.5
  24   */
  25  class SearchViewSearch extends JView
  26  {
  27  	function display($tpl=null)
  28      {
  29          global $mainframe;
  30  
  31          JToolBarHelper::title( JText::_( 'Search Statistics' ), 'searchtext.png' );
  32          JToolBarHelper::custom( 'reset', 'delete.png', 'delete_f2.png', 'Reset', false );
  33          JToolBarHelper::preferences( 'com_search', '150' );
  34          JToolBarHelper::help( 'screen.stats.searches' );
  35  
  36          $document = & JFactory::getDocument();
  37          $document->setTitle(JText::_('Search Statistics'));
  38  
  39          $limit         = $mainframe->getUserStateFromRequest( 'global.list.limit',    'limit', $mainframe->getCfg('list_limit'), 'int' );
  40          $limitstart    = $mainframe->getUserStateFromRequest( 'com_search.limitstart', 'limitstart', 0, 'int' );
  41  
  42          $model = $this->getModel();
  43          $items = $model->getItems();
  44          $params = &JComponentHelper::getParams( 'com_search' );
  45          $enabled = $params->get('enabled');
  46          JHTML::_('behavior.tooltip');
  47          jimport('joomla.html.pagination');
  48          $pageNav = new JPagination( count($items), $limitstart, $limit );
  49  
  50          $showResults    = JRequest::getInt('search_results');
  51  
  52          $search         = $mainframe->getUserStateFromRequest( 'com_search.search', 'search', '', 'string' );
  53          if (strpos($search, '"') !== false) {
  54              $search = str_replace(array('=', '<'), '', $search);
  55          }
  56          $search = JString::strtolower($search);
  57          
  58          $this->assignRef('items',     $items);
  59          $this->assignRef('enabled', $enabled);
  60          $this->assignRef('pageNav', $pageNav);
  61          $this->assignRef('search',     $search );
  62          $this->assignRef('lists',    $model->lists );
  63  
  64          $this->assignRef('showResults', $showResults);
  65  
  66          parent::display($tpl);
  67      }
  68  }


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1