<?php
/**
 * @version		3.0.0
 * @package		JomLand TicketCenter
 * @copyright	Copyright (C) 2010 JomLand.com. All rights reserved.
 * @link 		www.jomland.com
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<table class="table table-striped">
	<thead>
		<tr>
			<th width="5"><?php echo JText::_('ID');?>
			</th>


			<th><?php echo JText::_('Event');?>
			</th>
			<th><?php echo JText::_('Date');?>
			</th>
			<th><?php echo JText::_('Performer');?>
			</th>
			<th><?php echo JText::_('Venue');?>
			</th>

			<?php if ($this->params->get('display_city',0)>0){ ?>
			<th><?php echo JText::_('City');?>
			</th>
			<?php }?>

			<th><?php echo JText::_('Tickets');?>
			</th>
			<th><?php echo JText::_('Ordered');?>
			</th>
			<th><?php echo JText::_('Sold');?>
			</th>

		</tr>
	</thead>
	<?php
	$k = 0;
	$n=count( $this->events );
	for ($i=0, $n; $i < $n; $i++)	{
		$row = &$this->events[$i];
		$checked 	= JHTML::_('grid.id',   $i, $row->id);
		$link 		= JRoute::_( 'index.php?option=com_jlticketcenter&controller=events&task=edit&cid[]='.$row->id);


		$row->published = $row->published;
		$published		= JHTML::_('grid.published', $row, $i );
		$checked		= JHTML::_('grid.checkedout',   $row, $i );

		?>
	<tr class="<?php echo "row$k"; ?>">

		<td><?php echo $row->id; ?>
		</td>
		<td><a href="<?php echo $link;?>"> <?php echo $row->event_name; ?> </a>
		</td>
		<td><?php echo JHTML::_('date', $row->event_date, JText::_('DATE_FORMAT_LC4'),null);?>
		</td>
		<td><?php echo $row->performer_name;?>
		</td>
		<td><?php echo $row->venue_name; ?>
		</td>

		<?php if ($this->params->get('display_city',0)>0){?>
		<td><?php echo $row->city_name; ?>
		</td>
		<?php }?>


		<td><?php echo $row->tickets;?>
		</td>
		<td><?php echo $row->tickets_ordered;?>
		</td>
		<td><?php echo $row->tickets_sold;?>
		</td>


	</tr>
	<?php
	$k = 1 - $k;
	}
	?>

</table>
