<?php require 'ust.php'; ?>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<main id="main">
  <section class="breadcrumbs">
    <div class="container">
      <div class="d-flex justify-content-between align-items-center">
        <h2>Yorumcu Paneli</h2>
        <ol>
          <li><a href="index.php">Ana Sayfa</a></li>
          <li>Yorumcu Paneli</li>
        </ol>
      </div>
    </div>
  </section>
  <section class="inner-page">
    <div class="container">
      <div class="col-lg-12">
      <div class="row">
        <div class="col-lg-3">
          <?php require 'ypm.php'; ?>
          <?php

          $saydiruyeid = $_SESSION["yorumcuid"];
          $kahvefalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM kahvefali WHERE yorumcu_id = '$saydiruyeid' AND fal_durum = 'Bakılmadı'"));
          $tarotfalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM tarotfali WHERE yid = '$saydiruyeid' AND durum = 'Bakılmadı'"));
          $yildiznamefalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM yildiznamefali WHERE yid = '$saydiruyeid' AND fal_durum = 'Bakılmadı'"));
          $katinafalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM katinafali WHERE yid = '$saydiruyeid' AND durum = 'Bakılmadı'"));
          $sufalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM sufali WHERE yid = '$saydiruyeid' AND fal_durum = 'Bakılmadı'"));

          $toplambkleyenfalsayisi = $kahvefalisayisi + $tarotfalisayisi + $yildiznamefalisayisi + $katinafalisayisi + $sufalisayisi;

          $bsaydiruyeid = $_SESSION["yorumcuid"];
          $bkahvefalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM kahvefali WHERE yorumcu_id = '$saydiruyeid' AND fal_durum = 'Bakıldı'"));
          $btarotfalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM tarotfali WHERE yid = '$saydiruyeid' AND durum = 'Bakıldı'"));
          $byildiznamefalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM yildiznamefali WHERE yid = '$saydiruyeid' AND fal_durum = 'Bakıldı'"));
          $bkatinafalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM katinafali WHERE yid = '$saydiruyeid' AND durum = 'Bakıldı'"));
          $bsufalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM sufali WHERE yid = '$saydiruyeid' AND fal_durum = 'Bakıldı'"));

          $btoplambkleyenfalsayisi = $bkahvefalisayisi + $btarotfalisayisi + $byildiznamefalisayisi + $bkatinafalisayisi + $bsufalisayisi;

          $yorumcudetay = mysqli_fetch_array(mysqli_query($db, "SELECT * FROM yorumcular WHERE id = '$bsaydiruyeid'"));
           ?>
        </div><br>
      <div class="col-lg-9">
        <div class="row">
        <div data-aos="fade-left" data-aos-delay="100" class="col-lg-3"><div id="ustb" style="text-align: center; border-radius: 5px; margin-left: auto; margin-top: 10px; margin-right: 20px; background: rgba(0,206,209, 0.9); width: auto; height: 100px;"><p style="text-align: center; color: #fff; padding-top: 10px;">
          <a style="color: white; text-decoration:none;" href="ybekleyenf.php"> Bekleyen Fallar
          <p style="text-align: center; color: #fff; font-size: 30px;"> <?php echo $toplambkleyenfalsayisi; ?> </p></p></a></div></div>
          <div data-aos="fade-left" data-aos-delay="200" class="col-lg-3"><div id="ustb" style="text-align: center; border-radius: 5px; margin-left: auto; margin-top: 10px; margin-right: 20px; background: rgba(0,206,209, 0.9); width: auto; height: 100px;"><p style="text-align: center; color: #fff; padding-top: 10px;">
            <a style="color: white; text-decoration:none;" href="ybakilanf.php"> Bakılan Fallar
            <p style="text-align: center; color: #fff; font-size: 30px;"> <?php echo $btoplambkleyenfalsayisi; ?> </p></p></a></div></div>
            <div data-aos="fade-left" data-aos-delay="300" class="col-lg-3"><div id="ustb" style="text-align: center; border-radius: 5px; margin-left: auto; margin-top: 10px; margin-right: 20px; background: rgba(0,206,209, 0.9); width: auto; height: 100px;"><p style="text-align: center; color: #fff; padding-top: 10px;">
              <a style="color: white; text-decoration:none;" href="#"> Toplam Krediniz
              <p style="text-align: center; color: #fff; font-size: 30px;"> <?php echo $yorumcudetay["kredi"]; ?> </p></p></a></div></div>
              <div data-aos="fade-left" data-aos-delay="400" class="col-lg-3"><div id="ustb" style="border-radius: 5px; margin-left: auto; margin-top: 10px; margin-right: 20px; background: rgba(0,206,209, 0.9); width: auto; height: 100px;"><a style="color: white; text-decoration:none;" href="kredib.php">
                <p style="text-align: center; color: #fff;  font-size: 20px;margin: 0;line-height: 3rem;"> Ödeme Talebinde <br> Bulunun </p></a></div></div>
      </div>
      <section>
          <div class="col-lg-12" data-aos="fade-up" data-aos-delay="500">
            <div class="card">
                <div class="card-header" style="background: rgba(0,206,209, 0.9); text-align: center;">
                  <span style="text-align: center; color: #fff"> Duyurular </span>
                </div>
                <div class="card-body">
                  <ul class="list-group">
                    <?php
                    $duyurugetir = mysqli_query($db, "SELECT * FROM duyurular WHERE duyuru_kime = 'Yorumculara' ORDER BY id DESC");
                    while ($duyuru_listele = mysqli_fetch_array($duyurugetir)) {?>
                    <li class="list-group-item"><?php echo $duyuru_listele["duyuru"];?><text style="float:right;"><?php echo $duyuru_listele["duyuru_tarihi"];?></text></li>
                  <?php } ?>
                  </ul>
                </div>
            </div>
          </div>
      </section>
      </div>
      </div>
      </div>
    </div>
  </section>
  <style>
  #ustb{
    transition: all 0.3s;
  }
  #ustb:hover {
    background: rgba(1, 4, 136, 0.9) !important;
    }
  #krediuyari{
    transition: all 0.3s;
    background:rgba(0,206,209, 0.9);
  }
  #krediuyari:hover {
    background: rgba(1, 4, 136, 0.9) !important;
    color: #fff;
    }
    #krediuyari:hover p{
      color: #fff;
      }
  </style>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
<?php require 'footer.php'; ?>
