| Server IP : 180.180.241.3 / Your IP : 216.73.216.35 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/news/administrator/components/com_weblinks/views/weblinks/ |
Upload File : |
<?php
/**
* @version $Id: view.html.php 19343 2010-11-03 18:12:02Z ian $
* @package Joomla
* @subpackage Weblinks
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );
jimport( 'joomla.application.component.view');
/**
* HTML View class for the WebLinks component
*
* @static
* @package Joomla
* @subpackage Weblinks
* @since 1.0
*/
class WeblinksViewWeblinks extends JView
{
function display($tpl = null)
{
global $mainframe, $option;
$db =& JFactory::getDBO();
$uri =& JFactory::getURI();
$filter_state = $mainframe->getUserStateFromRequest( $option.'filter_state', 'filter_state', '', 'word' );
$filter_catid = $mainframe->getUserStateFromRequest( $option.'filter_catid', 'filter_catid', 0, 'int' );
$filter_order = $mainframe->getUserStateFromRequest( $option.'filter_order', 'filter_order', 'a.ordering', 'cmd' );
$filter_order_Dir = $mainframe->getUserStateFromRequest( $option.'filter_order_Dir', 'filter_order_Dir', '', 'word' );
$search = $mainframe->getUserStateFromRequest( $option.'search', 'search', '', 'string' );
if (strpos($search, '"') !== false) {
$search = str_replace(array('=', '<'), '', $search);
}
$search = JString::strtolower($search);
// sanitize $filter_order
if (!in_array($filter_order, array('a.title', 'a.published', 'a.ordering', 'category', 'a.hits', 'a.id'))) {
$filter_order = 'a.ordering';
}
if (!in_array(strtoupper($filter_order_Dir), array('ASC', 'DESC'))) {
$filter_order_Dir = '';
}
// Get data from the model
$items = & $this->get( 'Data');
$total = & $this->get( 'Total');
$pagination = & $this->get( 'Pagination' );
// build list of categories
$javascript = 'onchange="document.adminForm.submit();"';
$lists['catid'] = JHTML::_('list.category', 'filter_catid', $option, intval( $filter_catid ), $javascript );
// state filter
$lists['state'] = JHTML::_('grid.state', $filter_state );
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search']= $search;
$this->assignRef('user', JFactory::getUser());
$this->assignRef('lists', $lists);
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
parent::display($tpl);
}
}