<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="edit">
    <h3 style="position:relative;left:-185px;">ORDERS & REWARDS</h3>
	<hr style="margin-left:-190px;">
	  <div id="tabs" class="htabs">
			<a href="#tab-summary" style="font-family:calibri;">SUMMARY</a>
			<a href="#tab-credits" style="font-family:calibri;">REWARDS</a>
			<a href="#tab-coupons" style="font-family:calibri;">COUPONS / REDEMPTIONS</a>
	  </div>
	  <br>
	  
    <div class="content" id="tab-summary" style="background:none;border-right:none;border-left:none;border-bottom:none;">
	
	<div style="margin-left:210px;margin-top:30px;">
	<div style="width:400px;margin-bottom:15px;">
		<div style="float:left;width:150px;">Earned</div> <div>$<?php echo $PositiveAmount; ?> </div>
	</div>
	<div style="width:400px;margin-bottom:15px;">
		<div style="float:left;width:150px;">Redeemed</div> <div>$<?php echo round($NegativeAmount); ?> </div>
	</div>
	
	<div style="width:400px;margin-bottom:15px;">
		<div style="position:relative;left:91px;">  <img src="catalog/view/theme/default/image/line1.png" /> </div>
		<div style="position:relative;left:150px;">  $<?php echo $tamount; ?> </div>
		<div style="position:relative;left:91px;">  <img src="catalog/view/theme/default/image/line1.png" /> </div>
	</div>
	</div>
	
	<div style="margin-left:40px;margin-top:30px;">
		<div style="font-family:Mistral;font-size:23px;float:left;margin-right:20px;">You have <font color=red>$<?php echo $tamount; ?></font> to spend in-store now!</div>
		<?php if($tamount <> 0){ ?>
		<div style="position:relative;top:-15px;"><a href="index.php?route=account/credit/redeem&amount=<?php echo $tamount; ?>"><img src="catalog/view/theme/default/image/redeem_now.png" /></a></div>
		<?php } ?>
	</div>
	
	<!--
	<?php if($tamount) { ?>
		Redeem <?php echo $tamount; ?> Click Here  <a class="button" href="index.php?route=account/credit/redeem&amount=<?php echo $tamount; ?>"><span>REDEEM</span></a>
	<?php }  else { ?>
		There is no Redeem Points available. 
	<?php } ?>
    -->
    
	</div>
	<div class="content" id="tab-credits">	

   <div style="	border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:150px;float:left;">
		<span style="position: relative; top: 8px;left:30px;">Date</span>
   </div>
   <div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:90px;float:left;">
		<span style="position: relative; top: 8px; left:24px;">Order Id</span>
   </div>
   <div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:195px;float:left;">
		<span style="position: relative; top: 8px;left:25px;">Design</span>
   </div>
   <div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:125px;float:left;">
		<span style="position: relative; top: 8px;left:37px;">Sale Value</span>
   </div>
   <!-- <div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:125px;float:left;">
		<span style="position: relative; top: 8px;left:33px;">Co-Owners</span> 
   </div> 
	<div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:125px;float:left;">
		<span style="position: relative; top: 8px;left:46px;">Reward</span>
   </div>
   -->
   <div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:125px;float:left;">
		<span style="position: relative; top: 8px;left:33px;">Reward</span> 
   </div> 
   
   <?php foreach ($rewardsplus as $reward) { ?>
   
	<div style="margin-bottom: 5px;width:150px;float:left;">
		<span style="position: relative; top: 8px;left:27px;"><?php echo $reward['date_added']; ?></span>
   </div>
	<div style="margin-bottom: 5px;width:90px;float:left;">
		<span style="position: relative; top: 8px;left:39px;"><?php echo $reward['order_id']; ?></span>
   </div>
	<div style="margin-bottom: 5px;width:195px;float:left;">
		<span style="position: relative; top: 8px;left:30px;"><?php echo $reward['description']; ?></span>
   </div>
	<div style="margin-bottom: 5px;width:125px;float:left;">
		<span style="position: relative; top: 8px;left:56px;"><?php echo $reward['points']; ?><?php echo ' '.$reward['currency']; ?></span>
   </div>
	<!--<div style="margin-bottom: 5px;width:125px;float:left;">
		<span style="position: relative; top: 8px;left:56px;"><?php echo $reward['owner_count']; ?></span>
   </div>
	<div style="margin-bottom: 5px;width:125px;float:left;">
		<span style="position: relative; top: 8px;left:27px;"><?php echo $reward['reward']; ?><?php echo ' '.$reward['currency']; ?>
		<?php 
		if($reward['reward1']) {
		//echo ' + '.$reward['reward1'].' '.$reward['currency']; 
		} ?>
		</span>
   </div> --->  
   <div style="margin-bottom: 5px;width:125px;float:left;">
		<span style="position: relative; top: 8px;left:48px;"><?php echo $reward['reward']; ?><?php echo ' '.$reward['currency']; ?></span> 
   </div> 

  <?php } ?>
	
	</div>
	<div class="content" id="tab-coupons" style="background:none;border-right:none;border-left:none;border-bottom:none;">	
	
   <div style="	border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:160px;float:left;">
		<span style="position: relative; top: 8px;left:56px;">Date</span>
   </div>
   <div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:160px;float:left;">
		<span style="position: relative; top: 8px; left:35px;">Coupon ID</span>
   </div>
   <div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:180px;float:left;">
		<span style="position: relative; top: 8px;left:70px;">Coupon Code</span>
   </div>
   <div style="border:1px solid #EDEDED;height: 30px;border-radius:3px;box-shadow: -2px 8px 11px -8px grey;margin-bottom: 5px;width:160px;float:left;">
		<span style="position: relative; top: 8px;left:46px;">Amount</span>
   </div>
   
     <?php foreach ($rewardsminus as $reward) { ?>
    
	<div style="margin-bottom: 5px;width:160px;float:left;">
		<span style="position: relative; top: 8px;left:56px;"><?php echo $reward['date_added']; ?></span>
   </div>
	<div style="margin-bottom: 5px;width:160px;float:left;">
		<span style="position: relative; top: 8px;left:35px;"><?php echo $reward['voucher_id']; ?></span>
   </div>
	<div style="margin-bottom: 5px;width:180px;float:left;">
		<span style="position: relative; top: 8px;left:70px;"><?php echo $reward['code']; ?></span>
   </div>
	<div style="margin-bottom: 5px;width:160px;float:left;">
		<span style="position: relative; top: 8px;left:46px;"><?php echo (int)$reward['amount'].' AUD'; ?></span>
   </div>

  <?php } ?>

	</div>
	
    
  </form>
  <?php echo $content_bottom; ?></div>
<?php echo $footer; ?>
<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script> 