| Server IP : 180.180.241.3 / Your IP : 216.73.216.216 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_phocagallery/views/phocagalleryra/ |
Upload File : |
<?php
/*
* @package Joomla 1.5
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die();
jimport( 'joomla.application.component.view' );
class PhocaGalleryCpViewPhocaGalleryRa extends JView
{
var $_context = 'com_phocagallery.phocagalleryra';
function display($tpl = null) {
global $mainframe;
$uri =& JFactory::getURI();
$document =& JFactory::getDocument();
$db =& JFactory::getDBO();
JHTML::stylesheet( 'phocagallery.css', 'administrator/components/com_phocagallery/assets/' );
//Filter
$filter_catid = $mainframe->getUserStateFromRequest( $this->_context.'.filter_catid', 'filter_catid', 0, 'int' );
$filter_order = $mainframe->getUserStateFromRequest( $this->_context.'.filter_order', 'filter_order', 'a.ordering', 'cmd' );
$filter_order_Dir = $mainframe->getUserStateFromRequest( $this->_context.'.filter_order_Dir', 'filter_order_Dir', '', 'word' );
$search = $mainframe->getUserStateFromRequest( $this->_context.'.search', 'search', '', 'string' );
if (strpos($search, '"') !== false) {
$search = str_replace(array('=', '<'), '', $search);
}
$search = JString::strtolower( $search );
// Get data from the model
$items = & $this->get( 'Data');
$total = & $this->get( 'Total');
$pagination = & $this->get( 'Pagination' );
// build list of categories
$javascript = 'class="inputbox" size="1" onchange="submitform( );"';
$query = 'SELECT a.title AS text, a.id AS value, a.parent_id as parentid'
. ' FROM #__phocagallery_categories AS a'
// . ' WHERE a.published = 1'
. ' ORDER BY a.ordering';
$db->setQuery( $query );
$phocagallerys = $db->loadObjectList();
$tree = array();
$text = '';
$tree = PhocaGalleryRenderAdmin::CategoryTreeOption($phocagallerys, $tree, 0, $text, -1);
array_unshift($tree, JHTML::_('select.option', '0', '- '.JText::_('Select Category').' -', 'value', 'text'));
//list categories
$lists['catid'] = JHTML::_( 'select.genericlist', $tree, 'filter_catid', $javascript , 'value', 'text', $filter_catid );
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search']= $search;
$this->assignRef('button', $button);
$this->assignRef('user', JFactory::getUser());
$this->assignRef('lists', $lists);
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
$this->assignRef('request_url', $uri->toString());
parent::display($tpl);
$this->_setToolbar();
}
function _setToolbar() {
JToolBarHelper::title( JText::_( 'Phoca Gallery Category Rating' ), 'vote.png' );
JToolBarHelper::deleteList( JText::_( 'WARNWANTDELLISTEDITEMS' ), 'remove', 'delete');
JToolBarHelper::help( 'screen.phocagallery', true );
}
}
?>