<?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');
$ordering = ($this->lists['order'] == 'pm.ordering');?>

<form action="index.php" method="post" name="adminForm" id="adminForm">

	<table>
		<tr>
			<td align="left" width="100%"><?php echo JText::_( 'Filter' ); ?>: <input
				type="text" name="search" id="search"
				value="<?php echo htmlspecialchars($this->lists['search']);?>"
				class="text_area" onchange="document.adminForm.submit();" />
				<button onclick="this.form.submit();">
				<?php echo JText::_( 'Go' ); ?>
				</button>
				<button
					onclick="document.getElementById('search').value='';this.form.getElementById('filter_catid').value='0';this.form.getElementById('filter_state').value='';document.getElementById('filter_country').value='';this.form.submit();">
					<?php echo JText::_( 'Filter Reset' ); ?>
				</button>
			</td>
			<td nowrap="nowrap"><?php
			//echo $this->lists['state'];
			?>
			</td>
		</tr>
	</table>

	<div id="editcell">
		<table class="table table-striped">
			<thead>
				<tr>
					<th><?php echo JHTML::_('grid.sort', 'Id', 'pm.id', @$this->lists['order_Dir'], @$this->lists['order'] );?>
					</th>
					<th><?php echo JHTML::_('grid.sort',  JText::_('Payment Time'), 'pm.payment_time', @$this->lists['order_Dir'], @$this->lists['order'] );?>
					</th>

					<th><?php echo JHTML::_('grid.sort',  JText::_('Order Id'), 'pm.order_id', @$this->lists['order_Dir'], @$this->lists['order'] );?>
					</th>

					<th><?php echo JHTML::_('grid.sort',  JText::_('Method'), 'pm.payment_method', @$this->lists['order_Dir'], @$this->lists['order'] );?>
					</th>
					<th><?php echo JHTML::_('grid.sort',  JText::_('Amount'), 'pm.amount', @$this->lists['order_Dir'], @$this->lists['order'] );?>
					</th>

					<th><?php echo JHTML::_('grid.sort',  JText::_('Status'), 'pm.status', @$this->lists['order_Dir'], @$this->lists['order'] );?>
					</th>
					<th><?php echo JHTML::_('grid.sort',  JText::_('Transaction Id'), 'pm.transactionid', @$this->lists['order_Dir'], @$this->lists['order'] );?>
					</th>
				</tr>
			</thead>
			<?php
			$k = 0;
			for ($i=0, $n=count( $this->items ); $i < $n; $i++)	{
				$row = &$this->items[$i];
				$checked 	= JHTML::_('grid.id',   $i, $row->id);

				?>
			<tr class="<?php echo "row$k"; ?>">
				<td><?php echo $row->id; ?></td>
                <td><?php echo JHTML::_('date', $row->payment_time, JText::_('DATE_FORMAT_LC4').' h:m:s');?></td>
				<td><?php echo $row->order_id; ?></td>
				<td><?php echo $row->payment_method; ?></td>
				<td><?php echo $row->amount; ?></td>
				<td><?php if ($row->status==1){
					echo JText::_('Success');
				}else{
					echo JText::_('Fail');
				}
				?>
				</td>
				<td><?php echo $row->transactionid; ?>
				</td>

			</tr>
			<?php
			$k = 1 - $k;
			}
			?>
			<tfoot>
				<tr>
					<td colspan="9"><?php echo $this->pagination->getListFooter(); ?></td>
				</tr>
			</tfoot>

		</table>
	</div>

	<input type="hidden" name="option" value="com_jlticketcenter" /> <input
		type="hidden" name="task" value="" /> <input type="hidden"
		name="boxchecked" value="0" /> <input type="hidden" name="controller"
		value="paymentlog" /> <input type="hidden" name="filter_order"
		value="<?php echo $this->lists['order']; ?>" /> <input type="hidden"
		name="filter_order_Dir"
		value="<?php echo $this->lists['order_Dir']; ?>" />


		<?php echo JHTML::_( 'form.token' ); ?>
</form>
