<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
  
<div id="content">
    <div class="top">
      <div class="left"></div>
      <div class="right"></div>
      <div class="center"> <h1><?php echo $heading_title; ?></h1> </div>
    </div>

<div id="middle">
  <br>
    <div id="tabs" class="htabs" >  
		<a  href="#tab_curaccount"><?php echo $text_Account_Details; ?></a>  
		<?php if($config_refcustomer) { ?>
         <a href="#tab_refdetails"><?php echo $text_Customer_Details; ?></a>        
		 <?php } ?>
    </div>     
	<?php if($config_refcustomer) { ?>
    <div id="tab_refdetails"  class="tabs">           
         <br>
             <table width=100%>
                 <thead bgcolor="#DDDDDD" height=50> 	
          	       <tr align=center width=100%>
          	       	<td width=10%><B>No.</td>
          	       	<td ><B>Customer Name</td>
          	       	<td ><B>Customer Id</td>
          	       	<td ><B>Referred Date</td>
          	       	<td ><B>Customer Status</td>
          	       </tr>		
          	       </thead>
          	       <?php $refcount=0; ?>
          	       <?php foreach ($referrals as $referral) { ?>
          	           <?php $refcount=$refcount + 1; ?>
          	       <tr align=center width=100%  height=25>
          	       	<td width=10%><B><?php echo $refcount; ?></td>
          	       	<td ><?php echo $referral['firstname']." , ".$referral['lastname']; ?></td>
          	       	<td ><?php echo $referral['customer_id']; ?></td>
          	       	<td ><?php echo $referral['referred_date']; ?></td>
          	       	<td ><?php  if($referral['status']==1){echo $text_Active;}else{ echo $text_InActive;}; ?></td>
          	       </tr>		
          	       <?php } ?>
                 </table>
      </div>  
	  <?php } ?>
       
      <div id="tab_curaccount"  class="tab-content"> 
          <br>             
             <table width=100%>
                 <thead bgcolor="#DDDDDD" height=50> 	
          	       <tr align=center width=100%>
          	       	<td width=25%><B>Customers ClickCount</td>
          	       	<td width=25%><B>Total No. of Customers Referred</td>
          	       	<td width=20%><B>Total No. Guests Referred</td>
          	       	<td width=15%><B>Date</td>		           	       	
          	       </tr>
          	  </thead>        	     
          	  <tr align=center width=100%  height=25>
          	       	<td ><B><?php if (isset($UrlCount)) { echo $UrlCount; } ?></td>
          	       	<td ><B><?php if (isset($Total_Customers)) {  echo $Total_Customers; } ?></td>
          	       	<td ><B><?php if (isset($Total_Guests)) {  echo $Total_Guests; } ?></td>
          	       	<td ><B> <?php echo date('m-d-Y'); ?></td>		           	       	
          	  </tr>		
             </table>
 
             <table width=100%>
                 <thead bgcolor="#DDDDDD" height=50> 	
          	       <tr align=center width=100%>
          	       <?php if($payperaffiliate_enable) { ?><td><B>Pay for Affiliate Registration</td> <?php } ?>
          	       <?php if($flag_payclickcount_enable) { ?>  <td><B>Pay for ClickCount </td>         <?php } ?>
          	       <?php if($flag_paypercust_enable) { ?>     <td><B>Pay for Customers Referred</td> <?php } ?>
          	       <td><B>Pay for Referral Orders</td>    
          	       <!-- <?php if($flag_flatratesale_enable) { ?>   <td><B>Flat Rate for Sales</td>        <?php } ?> -->
          	       </tr>
          	  </thead>        	     
          	  <tr align=center width=100%  height=25> 
          	       <?php if($payperaffiliate_enable) { ?>
          	       	  <td><B><?php if (isset($afftransaction)) { echo $this->currency->format($afftransaction); } ?></td>
          	       <?php } ?>
          	       <?php if($flag_payclickcount_enable) { ?>
          	         	<td align=center><B><?php if (isset($Sale_Click)) { echo $Sale_Click; } ?></td>
          	       <?php } ?>
          	       <?php if($flag_paypercust_enable) { ?>
          	       	  <td><B><?php if (isset($Sale_CustomerCount)) { echo $Sale_CustomerCount; } ?></td>
          	       <?php } ?>
       	       	  <td><B><?php if (isset($Sale_Order)) { echo $Sale_Order; } ?></td>		         
       	       </tr>		
            </table>
<br><br><br>
             <table width=50%>
                 <thead bgcolor="#DDDDDD" height=50> 	
          	       <tr align=center width=50%>
                   	<td width=25%><B>Affiliate's Total Credits :</td>
                   	<td width=25%><B><?php  if (isset($balance)) {  echo $balance; } ?></td>		           	       	
          	     </tr>		
          	 </thead> 	
             </table><br>
             <table width=50%>
                 <thead bgcolor="#DDDDDD" height=50> 	
          	       <tr align=center width=50%>
                   	<td width=25%><B>Adjusted/Paid Payments : </td>
                   	<td width=25%><B><?php  if (isset($combalances)) {  echo $combalances; } ?></td>		           	       	
          	     </tr>		
          	 </thead> 	
             </table><br>
             <table width=50%>
                 <thead bgcolor="#DDDDDD" height=50> 	
          	       <tr align=center width=50%>
                   	<td width=25%><B>Affiliate Balance: </td>
                   	<td width=25%><B><?php  if (isset($totalbalance)) {  echo $totalbalance; } ?></td>		           	       	
          	     </tr>		
          	 </thead> 	
             </table><br>
      </div> 
                                              
      

      </div>       
   <div class="buttons">

    <div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_continue; ?></span></a></div>

  </div>
  

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