
	
	
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1>Ürünler</h1>
        </div>
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="<?= SITE ?>">Anasayfa</a></li>
              <li class="breadcrumb-item"><a href="<?= SITE ?>urun-ekle">Ürün Ekle</a></li>
            <li class="breadcrumb-item active">Ürünler</li>
          </ol>
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </section>

  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
      <div class="row">
        <div class="col-12"> 
          <div class="card"> 
            <!-- /.card-header -->
            <div class="card-body">
              <table id="example1" class="table table-bordered table-striped">

                <thead>
                  <tr>
                 <th style="width:5px;">Sıra</th>
                   <th style="width:5px;">Resim</th>
                   <th style="width:300px;">Ürün Adı</th>
                   <th style="width:50px;">Kodu</th>
                   <th style="width:50px;">Durum</th>
                   <th style="width:50px;">Vitrin</th>
                   <th style="width:50px;">Tarih</th>
                   <th style="width:10px;">İşlem</th>
                  </tr>
                </thead>

                <tbody>
                <?php
            $veriler=$VT->VeriGetir("urunler","","","ORDER BY ID ASC");
            if($veriler!=false)
            {
              $sira=0;
              for($i=0;$i<count($veriler);$i++)
              {
                $sira++;
                if($veriler[$i]["durum"]==1){$aktifpasif=' checked="checked"';}else{$aktifpasif='';}
                if($veriler[$i]["vitrindurum"]==1){$vitrinaktifpasif=' checked="checked"';}else{$vitrinaktifpasif='';}
                ?>
                <tr>
                  <td><?=$sira?></td>
                  <td> 
                    <img src="<?=ANASITE?>images/urunler/<?=$veriler[$i]["resim"]?>" style="height: 50px; width: 50px; margin-right: 8px; float: left;">
                    
                  </td>
                  <td><?=stripcslashes($veriler[$i]["baslik"])?></td>

                  <td> <span class="right badge badge-danger"><?=$veriler[$i]["urunkodu"]?></span></td>

                  <td>
                    <div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
                      <input type="checkbox" class="custom-control-input aktifpasif<?=$veriler[$i]["ID"]?>" id="customSwitch3<?=$veriler[$i]["ID"]?>"<?=$aktifpasif?> value="<?=$veriler[$i]["ID"]?>" onclick="aktifpasif(<?=$veriler[$i]["ID"]?>,'urunler');">
                      <label class="custom-control-label" for="customSwitch3<?=$veriler[$i]["ID"]?>"></label>
                    </div>
                  </td>

                  <td>
                    <div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
                      <input type="checkbox" class="custom-control-input vitrinaktifpasif<?=$veriler[$i]["ID"]?>" id="customSwitch4<?=$veriler[$i]["ID"]?>"<?=$vitrinaktifpasif?> value="<?=$veriler[$i]["ID"]?>" onclick="vitrinaktifpasif(<?=$veriler[$i]["ID"]?>,'urunler');">
                      <label class="custom-control-label" for="customSwitch4<?=$veriler[$i]["ID"]?>"></label>
                    </div>
                  </td>

                  <td><?=$veriler[$i]["tarih"]?></td>
                  <td>
                    <a href="<?=SITE?>urun-duzenle/<?=$veriler[$i]["ID"]?>" class="btn btn-warning btn-sm" ><i class="fa fa-edit"></i></a>
                    <a href="<?=SITE?>urun-stok/<?=$veriler[$i]["ID"]?>" class="btn btn-success btn-sm"><i class="fa fa-cubes"></i></a>
                    <a href="<?=SITE?>resimler/urunler/<?=$veriler[$i]["ID"]?>" class="btn btn-primary btn-sm"><i class="fa fa-images"></i></a>
                    <a href="<?=SITE?>urun-sil/<?=$veriler[$i]["ID"]?>" class="btn btn-danger btn-sm silmeAlani"><i class="fa fa-trash"></i></a> 

                  </td>

                </tr>
                <?php
              }
            }
            ?>               
                </tbody>
                <tfoot>
                  <tr>
                   <th>Sıra</th>
                   <th>Resim</th>
                   <th>Ürün Adı</th>
                   <th>Kodu</th>
                   <th>Durum</th>
                   <th>Vitrin</th>
                   <th>Tarih</th>
                   <th>İşlem</th>
                 </tr>
               </tfoot>
             </table>
           </div>
           <!-- /.card-body -->
         </div>
         <!-- /.card -->
       </div>
       <!-- /.col -->
     </div>
     <!-- /.row -->
   </div>
   <!-- /.container-fluid -->
 </section>
 <!-- /.content -->
</div>
