<?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');

$tickets = $this->tickets;

?>
<?php
if ($this->params->get('logo')){
	$logo = JHtml::image(JURI::root().'images/'.$this->params->get('logo'),'');
	echo JHtml::link(JURI::base(),$logo);
}
?>
<div style="width: 1000px;">
<?php
if (!empty($tickets)){ ?>
	<h2>
	<?php echo $tickets[0]->event_name;?>
		-
		<?php echo JHTML::_('date',$tickets[0]->event_date, JText::_('DATE_FORMAT_LC3').' H:i',null);?>
	</h2>

	<table border="1">
		<thead>
			<tr>
				<th><?php echo JText::_('JLTC_TICKET_NUM');?>
				</th>
				<th><?php echo JText::_('JLTC_ORDER_ID');?>
				</th>

				<th><?php echo JText::_('JLTC_CLIENT_NAME');?>
				</th>
				<th><?php echo JText::_('JLTC_CLIENT_ADDRESS');?>
				</th>
				<th><?php echo JText::_('JLTC_CLIENT_ZIPCODE');?>
				</th>
				<th><?php echo JText::_('JLTC_CLIENT_PHONE');?>
				</th>

				<th><?php echo JText::_('JLTC_CLIENT_EMAIL');?>
				</th>

				<th><?php echo JText::_('JLTC_TICKET_PRICE');?>
				</th>
				<th><?php echo JText::_('JLTC_TICKET_QUANTITY');?>
				</th>
			</tr>
		</thead>
		<?php foreach ($tickets as $ticket){?>
		<tr>
			<td><?php echo str_pad($ticket->event_id, 3, "0", STR_PAD_LEFT);?>-<?php echo str_pad($ticket->order_id, 3, "0", STR_PAD_LEFT);?>-<?php echo str_pad($ticket->line_id, 4, "0", STR_PAD_LEFT);?>
			</td>
			<td><?php echo $ticket->order_id;?>
			</td>

			<td><?php echo $ticket->first_name. ' '.$ticket->last_name;?>
			</td>
			<td><?php echo $ticket->street. ' ' . $ticket->city;?> &nbsp;</td>

			<td><?php echo $ticket->zip_code;?> &nbsp;</td>

			<td><?php echo $ticket->phone_num;?> &nbsp;</td>
			<td><?php echo $ticket->email;?> &nbsp;</td>

			<td><?php echo $this->params->get('currency_symbol').' '.$ticket->ticket_price;?>
			</td>
			<td><?php echo $ticket->quantity?> <?php if (!empty($ticket->ticket_desc)){
				echo  ' x '.$ticket->ticket_desc;
			}?>
			</td>
		</tr>
		<?php }?>
	</table>

	<?php }
	else{
		echo JText::_('JLTC_NO_GUESTS');
	}?>

	<br />
</div>
