<?php echo $header; ?>

<?php if ($success) { ?>
<div class="success"><?php echo $success; ?></div>
<?php } ?>
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>

<section class="main-container col2-left-layout">
    <article class="col-main">
        <div class="breadcrumbs">
            <ul>
                <?php foreach ($breadcrumbs as $breadcrumb) { ?>
                <li class="category11"><span><?php echo $breadcrumb['separator']; ?></span><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> </li>
                <?php } ?>
            </ul>
        </div>
        <div class="page-title">
            <h2><?php echo $heading_title; ?></h2>
        </div>
        <ol class="one-page-checkout" id="checkoutSteps">
            <li id="opc-billing" class="section allow active custom_login_input_box">
                <div class="step-title"> 
                   
                </div>
                <div id="checkout-step-billing" class="step a-item custom_class" style="">
<div id="content">
    <?php echo $content_top; ?>


<table class="list data-table cart-table">
           <colgroup>
               <col width="100%">

           </colgroup>
    <thead>
      <tr>
        <th  colspan="2"><?php echo $text_recurring_detail; ?></th>
      </tr>
    </thead>
    <tbody>
    <tr>
        <td  >
            <p style="margin:5px;"><b><?php echo $text_recurring_id; ?></b> #<?php echo $profile['order_recurring_id']; ?></p>
            <p style="margin:5px;"><b><?php echo $text_date_added; ?></b> <?php echo $profile['created']; ?></p>
            <p style="margin:5px;"><b><?php echo $text_status; ?></b> <?php echo $status_types[$profile['status']]; ?></p>
            <p style="margin:5px;"><b><?php echo $text_payment_method; ?></b> <?php echo $profile['payment_method']; ?></p>
        </td>
        <td  >
            <p style="margin:5px;"><b><?php echo $text_product; ?></b> <a href="<?php echo $profile['product_link']; ?>"><?php echo $profile['product_name']; ?></a></p>
            <p style="margin:5px;"><b><?php echo $text_quantity; ?></b> <?php echo $profile['product_quantity']; ?></p>
            <p style="margin:5px;"><b><?php echo $text_order; ?></b> <a href="<?php echo $profile['order_link']; ?>">#<?php echo $profile['order_id']; ?></a></p>
        </td>
    </tr>
    </tbody>
  </table>
   <table class="list data-table cart-table">
           <colgroup>
               <col width="50%">
                  <col width="50%">
           </colgroup>
        <thead>
            <tr>
                <th ><?php echo $text_recurring_description; ?></th>
                <th ><?php echo $text_ref; ?></th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td ><p style="margin:5px;"><?php echo $profile['profile_description']; ?></p></td>
                <td ><p style="margin:5px;"><?php echo $profile['profile_reference']; ?></p></td>
            </tr>
        </tbody>
  </table>
  <h2><?php echo $text_transactions; ?></h2>
   <table class="list data-table cart-table">
           <colgroup>
               <col width="30%">
               <col width="30%">
                <col width="30%">
           </colgroup>
    <thead>
      <tr>
        <th><?php echo $column_created; ?></th>
        <th><?php echo $column_type; ?></th>
        <th><?php echo $column_amount; ?></th>
      </tr>
    </thead>
    <tbody>
      <?php

      if(!empty($profile['transactions'])){
      foreach ($profile['transactions'] as $transaction) {

      ?>
      <tr>
        <td ><?php echo $transaction['created']; ?></td>
        <td ><?php echo $transaction_types[$transaction['type']]; ?></td>
        <td ><?php echo $transaction['amount']; ?></td>
      </tr>
      <?php } }else{ ?>

      <tr>
          <td colspan="3" class="center"><?php echo $text_empty_transactions; ?></td>
      </tr>

    <?php } ?>
    </tbody>
  </table>

  <div class="buttons">
    <div class="right">
        <?php if($cancel_link){ ?>
            <a href="<?php echo $cancel_link; ?>" class="button btn-continue" onclick="return confirmCancel();"><span><?php echo $button_cancel_profile; ?></span></a>
        <?php } ?>
        <a href="<?php echo $continue; ?>" class="button btn-continue"><span><?php echo $button_continue; ?></span></a>
    </div>
  </div>
 </div>
                </div>
            </li>

        </ol>
    </article>
    <!--	///*///======    End Col Main  ========= //*/// -->
    <aside class="col-right sidebar">
        <?php echo $column_right; ?>
    </aside>

</section>

<?php echo $footer; ?>
<script type="text/javascript"><!--
    function confirmCancel(){
        var confirmed = confirm("<?php echo $text_confirm_cancel; ?>");
        return confirmed;
    }
//--></script>