<?php require 'ust.php'; ?>
<main id="main">
  <section class="breadcrumbs">
    <div class="container">
      <div class="d-flex justify-content-between align-items-center">
        <h2>Kullanıcı Paneli</h2>
        <ol>
          <li><a href="index.php">Ana Sayfa</a></li>
          <li>Kullanıcı Paneli</li>
        </ol>
      </div>
    </div>
  </section>
  <?php
if($_GET["kf"] == "ok"){
  echo'<script>swal("Falınız Yorumcuya İletildi", "En Kısa Süre İçerisinde Yorumlanacaktır.", "success");</script>';
}
if($_GET["kf"] == "kd"){
  echo'<script>swal("Kredi Hatası", "Değerli Üyemiz Krediniz Bu Falı Baktırmaya Uygun Değildir.", "warning");</script>';
}
if($_GET["yf"] == "ok"){
  echo'<script>swal("Falınız Yorumcuya İletildi", "En Kısa Süre İçerisinde Yorumlanacaktır.", "success");</script>';
}
if($_GET["yf"] == "kd"){
  echo'<script>swal("Kredi Hatası", "Değerli Üyemiz Krediniz Bu Falı Baktırmaya Uygun Değildir.", "warning");</script>';
}
if($_GET["sf"] == "ok"){
  echo'<script>swal("Falınız Yorumcuya İletildi", "En Kısa Süre İçerisinde Yorumlanacaktır.", "success");</script>';
}
if($_GET["sf"] == "kd"){
  echo'<script>swal("Kredi Hatası", "Değerli Üyemiz Krediniz Bu Falı Baktırmaya Uygun Değildir.", "warning");</script>';
}
if($_GET["tf"] == "ok"){
  echo'<script>swal("Falınız Yorumcuya İletildi", "En Kısa Süre İçerisinde Yorumlanacaktır.", "success");</script>';
}
if($_GET["tf"] == "kd"){
  echo'<script>swal("Kredi Hatası", "Değerli Üyemiz Krediniz Bu Falı Baktırmaya Uygun Değildir.", "warning");</script>';
}
if($_GET["ktf"] == "ok"){
  echo'<script>swal("Falınız Yorumcuya İletildi", "En Kısa Süre İçerisinde Yorumlanacaktır.", "success");</script>';
}
if($_GET["ktf"] == "kd"){
  echo'<script>swal("Kredi Hatası", "Değerli Üyemiz Krediniz Bu Falı Baktırmaya Uygun Değildir.", "warning");</script>';
}
   ?>
  <section class="inner-page">
    <div class="container">
      <div class="col-lg-12">
      <div class="row">
        <div class="col-lg-3">
          <?php require 'panelmenü.php'; ?>
          <br>
          <div data-aos="fade-right" data-aos-delay="100">
          <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"> Günlük Hediye Çarkını Çevir! </span>
            </div>
            <center><a href="cark.php"><img style="margin:auto !important;" src="assets/img/cark.png" class="img-fluid" alt="Responsive image"></a></center>
          </div>
          </div>
          </div><br>
          <?php
          $saydiruyeid = $uyedetay["id"];
          $kahvefalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM kahvefali WHERE uyeid = '$saydiruyeid' AND fal_durum = 'Bakılmadı'"));
          $tarotfalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM tarotfali WHERE uyeid = '$saydiruyeid' AND durum = 'Bakılmadı'"));
          $yildiznamefalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM yildiznamefali WHERE uyeid = '$saydiruyeid' AND fal_durum = 'Bakılmadı'"));
          $katinafalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM katinafali WHERE uyeid = '$saydiruyeid' AND durum = 'Bakılmadı'"));
          $sufalisayisi = mysqli_num_rows(mysqli_query($db, "SELECT * FROM sufali WHERE uyeid = '$saydiruyeid' AND fal_durum = 'Bakılmadı'"));

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

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

          $btoplambkleyenfalsayisi = $bkahvefalisayisi + $btarotfalisayisi + $byildiznamefalisayisi + $bkatinafalisayisi + $bsufalisayisi;
           ?>
      <div class="col-lg-9">
        <?php if ($uyedetay["uye_kredi"] <= 100) {?>
        <div data-aos="fade-down" data-aos-delay="200" id="krediuyari" class="alert alert-light" role="alert" style="margin: 0;line-height: 1rem; text-align:center; color: rgba(1, 4, 136, 0.9);"><p> Değerli Üyemiz Krediniz Az Kaldı ( <?php echo $uyedetay["uye_kredi"]; ?> ) Fal Baktırmaya Uygun Olmayabilir Kredi Almak İçin <a href="paketler.php">Tıklayın</a></p></div>
        <?php } ?>
        <div class="row">
        <div data-aos="fade-left" data-aos-delay="100" class="col-lg-3"><a style="color: white; text-decoration:none;" href="bekleyenfallar.php"><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;"> Bekleyen Fallarınız
          <p style="text-align: center; color: #fff; font-size: 30px;"><?php echo $toplambkleyenfalsayisi; ?></p></p></div></a></div>
          <div data-aos="fade-left" data-aos-delay="200" class="col-lg-3"><a style="color: white; text-decoration:none;" href="bakilanfallar.php"><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;">Bakılan Fallarınız
            <p style="text-align: center; color: #fff; font-size: 30px;"><?php echo $btoplambkleyenfalsayisi; ?></p></p></div></a></div>
            <div data-aos="fade-left" data-aos-delay="300" 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="yorumcular.php">
              <p style="text-align: center; color: #fff;  font-size: 30px;margin: 0;line-height: 6rem;"> Fal Baktır </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="paketler.php">
                <p style="text-align: center; color: #fff;  font-size: 30px;margin: 0;line-height: 6rem;"> Paketler </p></a></div></div>
      </div>
          <div class="row my-3">
          <div class="col-12 col-lg-4 col-md-6">
                <center><a href="burc-uyum.php"><img src="assets/img/but.png" class="img-fluid" style="border-radius:25px; width: 300px; height: 150px; margin-right: 10px; margin-bottom: 10px;"></a></center>
          </div>
          <div class="col-12 col-lg-4 col-md-6">
                <center><a href="cin-burcu-hesaplama.php"><img src="assets/img/cb.png" class="img-fluid" style="border-radius:25px; width: 300px; height: 150px; margin-right: 10px; margin-bottom: 10px;"></a></center>
          </div>
          <div class="col-12 col-lg-4 col-md-6">
                <center><a href="ykslenburc.php"><img src="assets/img/yksl.png" class="img-fluid" style="border-radius:25px; width: 300px; height: 150px; margin-bottom: 10px;"></a></center>
          </div>
          </div>
        <div class="col-lg-12" data-aos="fade-up" data-aos-delay="500"> <!-- Burç yorumları başlangıç -->
          <div class="row">
            <div class="card-header" style="background: rgba(0,206,209, 0.9); text-align: center;">
              <span style="text-align: center; color: #fff"> Günlük Burç Yorumları </span>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center; display:flex;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=koc"><img id="brcbtn" src="assets/img/koc.png" style="margin-left: 12px; border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Koç</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=boga"><img id="brcbtn" src="assets/img/boga.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Boğa</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=ikizler"><img id="brcbtn" src="assets/img/ikizler.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">ikizler</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=yengec"><img id="brcbtn" src="assets/img/yengec.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Yengeç</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=aslan"><img id="brcbtn" src="assets/img/aslan.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Aslan</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=basak"><img id="brcbtn" src="assets/img/basak.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Başak</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=terazi"><img id="brcbtn" src="assets/img/terazi.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Terazi</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=akrep"><img id="brcbtn" src="assets/img/akrep.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Akrep</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=yay"><img id="brcbtn" src="assets/img/yay.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Yay</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=oglak"><img id="brcbtn" src="assets/img/oglak.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Oğlak</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=kova"><img id="brcbtn" src="assets/img/kova.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Kova</h6>
              </div>
            </div>
            <div class="card col-4 col-sm-2 col-md-2 col-lg-2 col-xl-1 col-xxl-1" style="border:none; align-items:center;">
              <div class="card-body" style="align-items:center;">
                <a href="gunluk-burc-yorumlari.php?burc=balik"><img id="brcbtn" src="assets/img/balik.png" style="border: 2px solid rgba(0,206,209, 0.9); width: 60px; height: 60px; border-radius: 999rem;"></a>
                <h6 class="card-title text-center">Balık</h6>
              </div>
            </div>

          </div>
        </div><!-- Burç yorumları bitiş -->
          <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 = 'Üyelere' 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>
      </div>
      </div>
      </div>
    </div>
  </section>
  <style>
  #brcbtn{
    transition: all 0.3s;
  }
  #brcbtn:hover{
    background: rgba(0,206,209, 0.9) !important;
  }
  #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'; ?>
