<?php if(!defined("Hacking")){die("404 Not Found"); } ?>

<div id="tour-11" class="header-content">
  <h2><i class="fa fa-cart-arrow-down"></i>Gelen Siparişler</h2>
</div>
<div class="body-content animated zoomIn">
  <div class="row">
    <div class="col-sm-12">
      <div class="panel rounded shadow panel-teal">
        <div class="panel-body no-padding">
          <div class="table-responsive">
                <?php
                              /*  $siparisler = $db->select('siparisler')
                                    ->orderby('siparisler_id','DESC')
                                    ->run();*/
                                $siparisler = $Modul->sayfalamastart($kayitsayisi,'siparisler');
                                foreach ($siparisler as $key => $value){
                            ?>
<div class="media">
<div class="media-body">
<p style="font-size:20px;">&nbsp;&nbsp;<?php echo $value['siparisler_adsoyad']; ?> - <?php echo $value['siparisler_email']; ?></p>
<p style="font-size:20px;" class="media-meta">&nbsp;&nbsp;Sipariş Tarihi: <?php echo $value['siparisler_tarih']; ?></p>
<p style="font-size:20px;" class="media-meta">&nbsp;&nbsp;Sipariş Durumu: <?php
if ($value['siparis_durum'] == 1) {
  echo '<i class="fa fa-clock-o" aria-hidden="true"></i> Onay Bekliyor';
}
elseif ($value['siparis_durum'] == 2) {
  echo '<i class="fa fa-eye" aria-hidden="true"></i> İşlemde';
}
elseif ($value['siparis_durum'] == 3) {
  echo '<i class="fa fa-window-close" aria-hidden="true"></i> İptal Edildi';
}
elseif ($value['siparis_durum'] == 4) {
  echo '<i class="fa fa-check-square" aria-hidden="true"></i> Tamamlandı';
}
 ?></p>
<h5>&nbsp;<a class="text-primary" style="text-decoration:none;" href="index.php?do=siparisler&oku=<?php echo $value['siparisler_id']; ?>">
&nbsp;<li class="fa fa-eye">&nbsp;</li>Sipariş Detaylarını Gör</a> &nbsp;&nbsp;&nbsp; <a href="#" onclick="itemsil(<?php echo $value['siparisler_id']?>,'','<?php echo $value['siparisler_adsoyad']?>','siparisler');" style="text-decoration:none; color:#FF0004;" href="index.php?do=siparisler&sil=<?php echo $value['siparisler_id']; ?>">
<li style="color:#FF0004;" class="fa fa-trash-o">&nbsp;</li>Siparişi Sil</a> </h5>
</div>
</div>
<hr>
<?php } ?>
          </div>
        </div>
      </div>
    </div>
  </div>
  <?php
    $Modul->sayfalama("siparisler","siparisler",$kayitsayisi);    //sayfa do , tablo adı , limit , sayfa_type (tablo sayfa değilse girme)
  ?>
</div>
