<?php echo $this->render('module/header_mobi.phtml'); ?>

<script type="text/javascript" language="javascript">

	$(document).ready(function () {
	
	});

</script>


<div class="conBox">
<div class="container widthDiv" style="padding-top:15px;">
	<div class="row">
		<div class="col-lg-12 categoryBox" style="padding-bottom:15px;">
		
		
		<div class="col-lg-8">
		<h1 style="margin:0;font-size:26px;"><?php echo @Lib_Lang::translate(front_account_youraccount_history_top); ?></h1>	
		</div>
		<div class="col-lg-4">
			<a href="<?php echo @$this->url(array('controller' => 'account', 'action' => 'info'), 'default', true); ?>" class="form-control" style="text-align:center;"><?php echo @Lib_Lang::translate(front_account_youraccount_top); ?></a>
		</div>	

	
<div class="col-lg-12 col-sm-12 col-md-12">		
<?php echo $this->render('module/module_page.phtml'); ?>
<table class="table table-striped table-bordered table-hover" style="margin-bottom:0px;">
	<thead>
		<tr>
			<th><?php echo @Lib_Lang::translate(front_order_list_lp); ?></th>
			<th><?php echo @Lib_Lang::translate(front_order_list_ordernr); ?></th>
			<th><?php echo @Lib_Lang::translate(front_order_list_price); ?></th>
			<th><?php echo @Lib_Lang::translate(front_order_list_ins); ?></th>
			<th><?php echo @Lib_Lang::translate(front_order_list_status); ?></th>
			<th><?php echo @Lib_Lang::translate(front_order_list_status_pay); ?></th>
			<th></th>
		</tr>
	</thead>
	<tbody>
	<?php $i=$this->escape($this->page); foreach ($this->dataTable as $key => $val): $i=$i+1;?>
		<tr>
			<td><?php echo$i; ?></td>
			<td><?php echo$val['order_id']; ?></td>
			<td><?php echo number_format($val['order_price'], 2, ',', ' '); ?> zł</td>
			<td><?php echo$val['order_ins']; ?></td>
			<td><?php echo @Lib_Lang::consta(order_status_.$val['order_status']); ?></td>
			<td><?php 
				if( $val['order_pay'] == 1 ){
					echo @Lib_Lang::translate(front_order_list_status_pay_1);
					if( $val['order_pay_date'] != '0000-00-00 00:00:00' ) echo' ('.$val['order_pay_date'].')';
				}else{
					echo @Lib_Lang::translate(front_order_list_status_pay_0).' (<a href="'.@$this->url(array('controller' => 'account', 'action' => 'pay', 'id' => $val['order_id']), 'default', true).'">'.@Lib_Lang::translate(front_order_list_pay_again).'</a>)';				
				}
			?></td>
			<td style="text-align:center;">
				<a href="<?php echo @$this->url(array('controller' => 'account', 'action' => 'order', 'id' => $val['order_id']), 'default', true); ?>"><?php echo @Lib_Lang::translate(front_order_list_editbutton); ?></a>
			</td>
		</tr>	
	<?php endforeach; ?>
	</tbody>
</table>	
<?php echo $this->render('module/module_page.phtml'); ?>
</div>	
		
		
		
		</div>
	</div>
</div>
</div>

<?php echo $this->render('module/footer_mobi.phtml'); ?>

