
	
	<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>Müşteri Yorumları</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 active">Müşteri Yorumları</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>Sıra</th> 
                   <th>Adı Soyadı</th>
                   <th>Yorumu</th>
                   <th>Durum</th>
                   <th>Ürün Puan</th> 
                   <th>Tarih</th>
                   <th>İşlem</th>
                 </tr>
               </thead>

               <tbody>
                <?php 
                $yorumlar=$VT->VeriGetir("yorumlar","","","ORDER BY ID DESC");
                if ($yorumlar!=false) 
                {
                  $sirano=0;
                  for ($i=0; $i <count($yorumlar);$i++) 
                  { 
                   $sirano++;
                   if($yorumlar[$i]["durum"]==1){$aktifpasif=' checked="checked"';}else{$aktifpasif='';}
                   if($yorumlar[$i]["durum"]==1){$yorumaktifpasif=' checked="checked"';}else{$yorumaktifpasif='';}

                   $uyebilgisi=$VT->VeriGetir("uyeler","WHERE ID=? AND durum=?",array($yorumlar[$i]["uyeID"],1),"ORDER BY ID ASC",1);
                   if ($yorumlar!=false) 
                   {

                    if($uyebilgisi[0]["tipi"]==1) {
                      $adsoyad=stripslashes($uyebilgisi[0]["ad"]." ".$uyebilgisi[0]["soyad"]);
                    }
                    else
                    {
                      $adsoyad=stripslashes($uyebilgisi[0]["firmaadi"]);
                    }
                    ?> 
                    <tr>
                      <td><?=$sirano?></td>
                      <td><?=$adsoyad?><br>
                        <td><?=stripcslashes($yorumlar[$i]["metin"])?></td>

                        <td>
                          <div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
                            <input type="checkbox" class="custom-control-input aktifpasif<?=$yorumlar[$i]["ID"]?>" id="customSwitch3<?=$yorumlar[$i]["ID"]?>"<?=$aktifpasif?> value="<?=$yorumlar[$i]["ID"]?>" onclick="aktifpasif(<?=$yorumlar[$i]["ID"]?>,'yorumlar');">
                            <label class="custom-control-label" for="customSwitch3<?=$yorumlar[$i]["ID"]?>"></label>
                          </div>
                        </td>
                        <td>Puanı <span class="right badge badge-danger"><?=$yorumlar[$i]["puan"]?></span></td>
                        <td><?=$yorumlar[$i]["tarih"]?></td>
                        <td> 
                          <a href="<?=SITE?>yorum-sil/<?=$yorumlar[$i]["ID"]?>" class="btn btn-danger btn-sm silmeAlani"><i class="fa fa-trash"></i></a>  
                        </td>
                      </tr>
                      <?php
                    }
                  }
                  }
                  ?>               
                </tbody> 
              </table>
            </div>
            <!-- /.card-body -->
          </div>
          <!-- /.card -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </div>
    <!-- /.container-fluid -->
  </section>
  <!-- /.content -->
</div>
 