<?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 colspan="0" rowspan="0" style="width: 700px; border: 1px solid;">
	<tr>
		<td style="border-right: 1px dashed;">
			<table style="width: 500px;">
				<tr>
					<td colspan="2" class="bottom_border2"><span
						style="font-size: 18px; font-weight: bold;"><?php echo $line->event_name;?>
					</span> <br /> <br />
					</td>
				</tr>
				<tr>
					<td colspan="2" class="bottom_border2" align="right"><?php echo JText::_('JLTC_TICKET_NUM');?>
					<?php
					$ticket_number = str_pad($line->event_id, 3, "0", STR_PAD_LEFT).'-'.str_pad($line->order_id, 3, "0", STR_PAD_LEFT).'-'.str_pad($line->line_id, 4, "0", STR_PAD_LEFT);
					if($params->get('individual_tickets')==1){
						$ticket_number .= '/'.str_pad($i, 3, "0", STR_PAD_LEFT);
					}
					echo $ticket_number;
					?>
					</td>
				
				
				<tr>
				
				
				<tr valign="top">
					<td width="100" class="bottom_border1"><?php echo JText::_('When');?>:</td>
					<td class="bottom_border1"><strong><?php echo JHTML::_('date',$line->event_date, JText::_('DATE_FORMAT_LC4').' H:i',null);?>
					</strong>
					</td>
				</tr>
				<tr valign="top" class="bottom_border1">
					<td class="bottom_border1"><?php echo JText::_('Location');?>:</td>
					<td class="bottom_border1"><strong><?php echo $line->venue_name .'<br/> '.$line->city_name.'<br/> '.$line->state_name.' '.$line->country;?>
					</strong>
					</td>
				</tr>

				<tr valign="top" class="bottom_border1">
					<td class="bottom_border1"><?php echo JText::_('Tickets');?>:</td>
					<td class="bottom_border1"><strong> <?php if($line->ticket_desc>''){ echo $line->ticket_desc.' - ';} ?>
					<?php echo $quantity;?>&nbsp;&nbsp;x &nbsp;&nbsp;<?php echo $params->get('currency_symbol').' '.$line->ticket_price;?>
					</strong>
					</td>
				</tr>

				<tr valign="middle">
					<td class="bottom_fall_border2"><?php echo JText::_('Total');?>:</td>
					<br />
					<td class="bottom_fall_border2"><strong> <?php echo $params->get('currency_symbol').' '.$line->ticket_price * $line->quantity;?>
					</strong> <br />
					</td>
				</tr>

				<tr valign="middle">
					<td colspan="2"><?php echo JText::_('Client Detial');?>:</td>
					<br />
				</tr>

				<tr valign="top" class="bottom_border1">
					<td class="bottom_border1"><?php echo JText::_('Name');?>:</td>
					<td class="bottom_border1"><strong> <?php echo $order->first_name . ' ' .$order->last_name;?>
					</strong>
					</td>
				</tr>

				<tr valign="top" class="bottom_border1">
					<td><?php echo JText::_('Address');?>:</td>
					<td><strong> <?php echo $order->street;?> <br /> <?php echo $order->city;?>
							<br /> <?php echo $order->state. ' '.$order->country;?> </strong>
					</td>
				</tr>

			</table>
		</td>
		<td valign="top" align="center"><?php	
		if ($params->get('logo')){
			$logo = JHtml::image(JURI::root().'images/'.$params->get('logo'),$config->get( 'config.sitename'));
			echo JHtml::link(JURI::base(),$logo);
		}
		echo '<br /><br />';
		echo nl2br($params->get('ticket_site_desc'));
		if ((int)$params->get('enable_qr_code')==1){
			if(file_exists(JPATH_ADMINISTRATOR.'/components/com_jlticketcenter/helpers/jlticketcenter_pro_helper.php')){
				JLoader::import('components.com_jlticketcenter.helpers.jlticketcenter_ticket_template',JPATH_ADMINISTRATOR);
				echo "<br/>";
				echo  JLTicketCenterTicketTemplateHelper::generateQRCode($ticket_number);
			}
		}
		?>
		</td>
	</tr>
	<?php if ($params->get('ticket_remarks')){?>
	<tr>
		<td colspan="2" class="top_border1"><?php echo nl2br($params->get('ticket_remarks')); ?></td>
	</tr>
	<?php }?>
</table>
<br />
<br />
