<?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>
  <section class="inner-page">
    <div class="container">
      <div class="col-lg-12">
      <div class="row">
        <div class="col-lg-3">
          <?php require 'panelmenü.php'; ?>
        </div><br>
      <div class="col-lg-9">
        <div class="col-lg-9">
              <div class="col-lg-12" data-aos="fade-up" data-aos-delay="100">
                <div class="card">
                    <div class="card-header" style="background: rgba(1, 4, 136, 0.9); text-align: center;">
                      <span style="text-align: center; color: #fff"> Kredi Geçmişiniz </span>
                    </div>
                    <div class="card-body">
                      <div class="table-responsive">
                      <table class="table">
                        <thead>
                          <tr>
                            <th scope="col"> Kredi Miktarı </th>
                            <th scope="col"> Durum </th>
                            <th scope="col"> Yüklenme Tarihi </th>
                          </tr>
                        </thead>
                        <tbody>
                          <?php
                          $uid = $_SESSION["uyeid"];
                          $krediigetir = mysqli_query($db, "SELECT * FROM kredi_yuklemeleri WHERE uyeid = '$uid'");
                          while ($krediilistele = mysqli_fetch_array($krediigetir)) {?>
                          <tr>
                            <th scope="row"> <?php echo $krediilistele["kredi_miktari"]; ?> Kredi </th>
                            <td> <?php echo $krediilistele["durum"]; ?> </td>
                            <td> <?php echo $krediilistele["tarih"]; ?> </td>
                          </tr>
                        <?php } ?>
                        </tbody>
                      </table>
                    </div>
                    </div>
                </div>
              </div>
        </div>
      </div>
      </div>
      </div>
    </div>
  </section>
</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'; ?>
