<?php echo $header; ?>
<div class="container">
  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>

  <div class="row"><?php echo $column_left; ?>
    <?php if ($column_left && $column_right) { ?>
    <?php $class = 'col-sm-6'; ?>
    <?php } elseif ($column_left || $column_right) { ?>
    <?php $class = 'col-sm-9'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-12'; ?>
    <?php } ?>
    <div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>
      <h1><?php echo $heading_title; ?></h1>

      <?php if(!$coupons){ ?>
       <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> Hesabınıza Tanımlı Kupon Bulunmamaktadır</div>
      <?php }else { ?>
       <div class="table-responsive">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <td class="text-right"><b>Kupon Kodu</b></td>
                    <td class="text-left"><b>İndirim Tutarı</b></td>
                    <td class="text-left"><b>İndirim Türü</b></td>
                    <td class="text-left"><b>Not</b></td>
                </tr>
                </thead>
                <tbody>

                <?php foreach($coupons as $coupon){ ?>
                <tr>
                    <td class="text-right"><?=$coupon['code']; ?></td>
                    <td class="text-left">indirim tutarı: <?=$coupon['discount']; ?></td>
                    <td class="text-left">
                      <?php if($coupon['type'] == 'P'){ ?>
                        Yüzdelik İndirim
                      <?php }else{ ?>
                        Sabit Fiyat
                      <?php } ?>
                    </td>
                    <td class="text-left">Kuponlar tek kullanımlıktır. İade kuponlarının kullanım süresi max 1 aydır</td>
                </tr>
                <?php } ?>

                </tbody>
            </table>
        </div>
        <?php } ?>
        <div class="row">
            <div class="col-sm-6 text-left"><?php echo $pagination; ?></div>
            <div class="col-sm-6 text-right"><?php echo $results; ?></div>
        </div>

        <div class="buttons clearfix">
                <div class="pull-right"><a href="<?php echo $continue; ?>" class="btn btn-primary">Devam</a></div>
        </div>


     
    
      <?php echo $content_bottom; ?></div>
    <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>