<div class="row">
  <div class="col-lg-9 col-md-8">

    <div class="panel panel-default">
      <div class="panel-body">
        {$TEXT[0]}
      </div>
    </div>

    {if $REFERRALS}
    <div class="panel panel-default">
      <div class="panel-body">
        <div class="table-responsive">
          <table class="table table-striped table-hover" id="sortTable">
            <thead>
              <tr>
                <th data-sort="string">{$TEXT[2]}</th>
                <th data-sort="string">{$TEXT[3]}</th>
                <th data-sort="float">{$TEXT[4]}</th>
              </tr>
            </thead>
            <tbody>
              {$REFERRALS | noescape}
            </tbody>
          </table>
        </div>
      </div>
    </div>

    {* == PAGINATION == *}

    {$PAGES | noescape}

    {else}
    <div class="panel panel-danger">
      <div class="panel-body nodata">
        <i class="fa fa-warning fa-fw"></i> {$TEXT[5]}
      </div>
    </div>
    {/if}

  </div>
  <div class="col-lg-3 col-md-4">
    <div class="panel panel-default menuboxarea">
      <div class="panel-heading">
        <i class="fa fa-globe fa-fw"></i> {$TEXT[1]}
      </div>
      <div class="panel-body">
        {$TEXT[9]}:<br><span class="highlight">{$TOTALS['ref'] | noescape}</span><br><br>
        {$TEXT[10]}:<br><span class="highlight">{$TOTALS['uni'] | noescape}</span>
      </div>
    </div>
    <div class="panel panel-default menuboxarea">
      <div class="panel-heading">
        <i class="fa fa-filter fa-fw"></i> {$TEXT[6]}
      </div>
      <div class="panel-body">
        <form method="get" action="index.php">
          <input type="hidden" name="p" value="referrals">
          <div class="form-group">
            <label>{$TEXT[7]}</label>
            <select name="product" class="form-control">
              <option value="0">- - - - -</option>
              {$PRODUCTS_LIST | noescape}
            </select>
          </div>
          <hr>
          <button class="btn btn-primary"><i class="fa fa-check fa-fw"></i> {$TEXT[8]}</button>
        </form>
      </div>
    </div>

    {include 'right-panel.tpl'}
    
  </div>
</div>