<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>TAW Subscription Packages</title>
    <link rel="stylesheet" href="/css/global.css" type="text/css">
  </head>
  <body>
      <?php foreach($subscriptions['subscriptions'] as $subscription): ?>
          <div class="sub_box">
              <h2><?=$subscription['name']?></h2>
              <p><?=$subscription['description']?></p>
              <h3>£<?=$subscription['price']?>pm</h3>
              <p><?php if($subscription['current_plan']) { echo '<span style="color: green">(Current)</span>'; } else { echo '<a href="/checkout/payment/?sub='.$subscription['id'].'">Change Subscription</a>'; } ?></p>
          </div>
      <?php endforeach; ?>
      <div style="clear: both">&nbsp;</div>
      <h4>The above is production ready. It is just mocked with my auth token -- Will</h4>
      <hr />
      <pre>{
          "success": true,
          "message": "Successfully logged in",
          "auth_token": "06072b0536fda3846569d8ce07e09456",
          "user": {
              "email": "will@pixelbeard.co",
              "firstname": "Will",
              "lastname": "Roberts",
              "auth_level": "9",
              "user_id": "1070683490",
              "banned": "0",
              "avatar": "https://api-taw.pixelbeard.co/images/uploads/",
              "amember_user_id": "18260",
              "amember_email": "will@pixelbeard.co",
              "username": "PixelBeard",
              "subscriptions": [
                  {
                      "subscription_auth_level": "9",
                      "subscription_expiry": "2029-03-31"
                  }
              ]
          }
      }</pre>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
  </body>
</html>
