74 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			74 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * @package    JEM
 | |
|  * @copyright  (C) 2013-2024 joomlaeventmanager.net
 | |
|  * @copyright  (C) 2005-2009 Christoph Lukes
 | |
|  * @license    https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
 | |
|  */
 | |
| 
 | |
| defined('_JEXEC') or die;
 | |
| 
 | |
| use Joomla\CMS\HTML\HTMLHelper;
 | |
| use Joomla\CMS\Language\Text;
 | |
| use Joomla\CMS\Toolbar\ToolbarHelper;
 | |
| use Joomla\CMS\Factory;
 | |
| use Joomla\CMS\MVC\View\HtmlView;
 | |
| 
 | |
| /**
 | |
|  * Venueselect-View
 | |
|  */
 | |
| class JemViewVenueelement extends Htmlview {
 | |
| 
 | |
| 	public function display($tpl = null)
 | |
| 	{
 | |
| 		$app = Factory::getApplication();
 | |
| 
 | |
| 		//initialise variables
 | |
| 		$document   = $app->getDocument();
 | |
| 		$db			= Factory::getContainer()->get('DatabaseDriver');
 | |
| 		$itemid 	= $app->input->getInt('id', 0) . ':' . $app->input->getInt('Itemid', 0);
 | |
| 
 | |
| 		//get vars
 | |
| 		$filter_order     = $app->getUserStateFromRequest('com_jem.venueelement.'.$itemid.'.filter_order', 'filter_order', 'l.ordering', 'cmd');
 | |
| 		$filter_order_Dir = $app->getUserStateFromRequest('com_jem.venueelement.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', '', 'word');
 | |
| 		$filter_type      = $app->getUserStateFromRequest('com_jem.venueelement.'.$itemid.'.filter_type', 'filter_type', 0, 'int');
 | |
| 		$filter_search    = $app->getUserStateFromRequest('com_jem.venueelement.'.$itemid.'.filter_search', 'filter_search', '', 'string');
 | |
| 		$filter_search    = $db->escape(trim(\Joomla\String\StringHelper::strtolower($filter_search)));
 | |
| 
 | |
| 		//prepare document
 | |
| 		$document->setTitle(Text::_('COM_JEM_SELECTVENUE'));
 | |
| 
 | |
| 		// Load css
 | |
| 		// HTMLHelper::_('stylesheet', 'com_jem/backend.css', array(), true);
 | |
| 		$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
 | |
| 		$wa->registerStyle('jem.backend', 'com_jem/backend.css')->useStyle('jem.backend');
 | |
| 		// Get data from the model
 | |
| 		$rows = $this->get('Data');
 | |
| 
 | |
| 		// add pagination
 | |
| 		$pagination = $this->get('Pagination');
 | |
| 
 | |
| 		// table ordering
 | |
| 		$lists['order_Dir'] = $filter_order_Dir;
 | |
| 		$lists['order'] = $filter_order;
 | |
| 
 | |
| 		//Build search filter
 | |
| 		$filters = array();
 | |
| 		$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_VENUE'));
 | |
| 		$filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_CITY'));
 | |
| 		$filters[] = HTMLHelper::_('select.option', '3', Text::_('COM_JEM_STATE'));
 | |
| 		$lists['filter'] = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
 | |
| 
 | |
| 		// search filter
 | |
| 		$lists['search']= $filter_search;
 | |
| 
 | |
| 		//assign data to template
 | |
| 		$this->lists		= $lists;
 | |
| 		$this->rows			= $rows;
 | |
| 		$this->pagination	= $pagination;
 | |
| 
 | |
| 		parent::display($tpl);
 | |
| 	}
 | |
| }
 | |
| ?>
 |