<?php
/**
 * JE GroupBuy package
 * @author J-Extension <contact@jextn.com>
 * @link http://www.jextn.com
 * @copyright (C) 2011 - 2012 J-Extension
 * @license GNU/GPL, see LICENSE.php for full license.
**/

// no direct access
defined('_JEXEC') or die;
?>
<style type="text/css">
.row1
{
	background-color:#F6F6F6;
}
.paymentmsg tr, td
{
	border:none;
}
</style>
<?php
if($this->result!="")
{
?>

<table style="width:100%;" class="paymentmsg">
	<tr >
		<td align="center" width="100%" >
			<table cellpadding="0" cellspacing="10" style="width:80%;border: 1px solid rgb(0, 0, 0);background-color:#f0ffe9;border-color:#b4ffa3;">
				<tr height="30">
					<td width="16"><img src="<?php echo JURI::root(); ?>components/com_jegroupbuy/assets/images/tick.png"></td>
					<td align="left">
						<b color="#060606">&nbsp;<?php echo JText::_("COM_JEGROUPBUY_PAYMENT_SUCCESS_MSG"); ?></b>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<br/>
<?php
}
?>
<table cellpadding="" cellspacing="5" border="0" width="100%">
	<tr height="30" style="background-color:#F8F8F8;">
		<td width="5%">
			<b>&nbsp;<?php echo JText::_("COM_JEGROUPBUY_COUPON_PAGE_ID"); ?></b>
		</td>
		<td >
			<b>&nbsp;<?php echo JText::_("COM_JEGROUPBUY_COUPON_PAGE_NAME"); ?></b>
		</td>
		<td width="15%">
			<b>&nbsp;<?php echo JText::_("COM_JEGROUPBUY_COUPON_PAGE_PAYMENT_PRICE"); ?></b>
		</td>
		<td width="15%">
			<b>&nbsp;<?php echo JText::_("COM_JEGROUPBUY_COUPON_PAGE_PAYMENT_TYPE"); ?></b>
		</td>
		<td width="15%">
			<b>&nbsp;<?php echo JText::_("COM_JEGROUPBUY_COUPON_PAGE_PAYMENT_DATE"); ?></b>
		</td>
	</tr>
	<?php
	if(count( $this->rows ) )
	{
		$db	= JFactory::getDBO();
		$i = 1;
		$k = 0;
		foreach ($this->rows as $row)
		{
			?>
				<tr height="25" class="<?php echo "row$k"; ?>">
					<td>
						&nbsp;<?php echo $i; ?>
					</td>
					<td>
						&nbsp;<a href="<?php echo JRoute::_('index.php?option=com_jegroupbuy&view=couponpage&layout=coupon&payment_id='.$row->id); ?>"><?php echo $row->title; ?></a>
					</td>
					<td>
						&nbsp;<?php echo $row->deal_price; ?>
					</td>
					<td>
						&nbsp;<?php echo $row->method; ?>
					</td>
					<td>
						&nbsp;<?php echo JHTML::_('date',  $row->pdate, "d-m-Y"); ?>
					</td>
				</tr>
			<?php
			$i++;
			$k = 1 - $k;
		}
	}
	?>
</table>