<!-- HEADER -->
<?php

session_start();

require_once(dirname(__FILE__) . '\header.php');
?>
<!-- PENUTUP HEADER -->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>index</title>
  <?php if (!isset($_SESSION["login"])) : ?>
    <style>
      .bd-placeholder-img {
        font-size: 1.125rem;
        text-anchor: middle;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }

      @media (min-width: 768px) {
        .bd-placeholder-img-lg {
          font-size: 3.5rem;
        }
      }
    </style>
    <link href="css/carousel.css" rel="stylesheet">
  <?php endif; ?>
</head>

<body>


  <?php if (isset($_SESSION["login"])) : ?>
    <!-- jumbotron -->
    <div class="jumbotron jumbotron-fluid">
      <div class="container">
        <?php if (isset($_SESSION["level"])) : ?>
          <?php $level = $_SESSION["level"] == 'admin';
          if ($level) : ?>
            <h1 class="display-1" style="color:red">WELCOME ADMIN</h1>
          <?php endif; ?>
          <?php if (!$level) : ?>
            <h1 class="display-4">WE HERE TO HELP YOU</h1>
          <?php endif; ?>
        <?php endif; ?>
        <?php if (!isset($_SESSION["level"])) : ?>
          <h1 class="display-4">WE HERE TO HELP YOU</h1>
        <?php endif; ?>
        <?php if (isset($_SESSION["login"])) : ?>
          <?php if (isset($_SESSION["level"])) : ?>
            <?php $level = $_SESSION["level"] == 'admin';
            if (!$level) : ?>
              <a href="User_BuatKeluhan.php" class="btn tombol tobol1"><img src=img/tambah.png class="logo"><br>Buat Keluhan</a>
              <a href="grafik.php" class="btn tombol tobol1"><img src=img/grafik3.png class="logo"><br>Grafik</a>
            <?php endif; ?>
          <?php endif; ?>
        <?php endif; ?>
      <?php endif; ?>
      </div>
    </div>
    <!--penutup jumbotron -->

    <?php if (!isset($_SESSION["login"])) : ?>
      <main role="main">

        <div id="myCarousel" class="carousel slide" data-ride="carousel">
          <ol class="carousel-indicators">
            <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#myCarousel" data-slide-to="1"></li>
            <li data-target="#myCarousel" data-slide-to="2"></li>
          </ol>
          <div class="carousel-inner">
            <div class="carousel-item active">
              <svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img">
                <rect width="100%" height="100%" fill="#777" /><img src=img/danau.jpg> </svg> <div class="container">
                <div class="carousel-caption text-left">
                  <h1>Anda Punya Keluhan ? atau Anda Punya Pertanyaan?</h1>
                  <p>Silahkan berikan pertanyaan kepada kami.</p>
                  <p><a class="btn btn-lg btn-primary" href="login.php" role="button">Sign up today</a> </p>
                </div>
            </div>
          </div>
          <div class="carousel-item">
            <svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img">
              <rect width="100%" height="100%" fill="#777" /><img src=img/senyum.jpg> </svg> <div class="container">
              <div class="carousel-caption">
                <h1>Belum punya akun?</h1>
                <p>Silahkan daftarkan akun anda.</p>
                <p><a class="btn btn-lg btn-primary" href="User_Registrasi.php" role="button">Learn more</a></p>
              </div>
          </div>
        </div>
        <div class="carousel-item">
          <svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img">
            <rect width="100%" height="100%" fill="#777" /><img src=img/padi.jpg> </svg> <div class="container">
            <div class="carousel-caption text-right">
              <h1>Kami ada untuk membantu anda.</h1>
              <p><a class="btn btn-lg btn-primary" href="login.php" role="button">Learn more</a></p>
            </div>
        </div>
        </div>
        </div>
        <a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
          <span class="carousel-control-prev-icon" aria-hidden="true"></span>
          <span class="sr-only">Previous</span>
        </a>
        <a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
          <span class="carousel-control-next-icon" aria-hidden="true"></span>
          <span class="sr-only">Next</span>
        </a>
        </div>


        <!-- Marketing messaging and featurettes
  ================================================== -->
        <!-- Wrap the rest of the page in another container to center all the content. -->

        <div class="container marketing">

          <!-- Three columns of text below the carousel -->


          <!-- START THE FEATURETTES -->

          <hr class="featurette-divider">

          <div class="row featurette">
            <div class="col-md-7">
              <h2 class="featurette-heading">Anda butuh bantuan? <span class="text-muted">Kami siap membantu anda.</span></h2>
              <p class="lead">silahkan login dan berikan keluhan anda.</p>
            </div>
            <div class="col-md-5"><img src=img/senyum2.jpg class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500" height="500" preserveAspectRatio=" xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 500x500">
              <title>Placeholder</title>
              <rect width="100%" height="100%" fill="#eee" /> <text x="50%" y="50%" fill="#aaa" dy=".3em"></text>

            </div>
          </div>

          <hr class="featurette-divider">

          <div class="row featurette">
            <div class="col-md-7 order-md-2">
              <h2 class="featurette-heading">Kami akan melayani anda. <span class="text-muted">Jangan ragu.</span></h2>
            </div>
            <div class="col-md-5 order-md-1">
              <img src=img/aaa.jpeg class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500" height="500" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 500x500">
              <title>Placeholder</title>
              <rect width="100%" height="100%" fill="#eee" /><text x="50%" y="50%" fill="#aaa" dy=".3em"></text>

            </div>
          </div>

          <hr class="featurette-divider">

          <div class="row featurette">
            <div class="col-md-7">
              <h2 class="featurette-heading">Selalu jaga tata krama. <span class="text-muted">Dan tetap pada norma kesopanan.</span></h2>
              <p class="lead">Anda sopan kami bantu.</p>
            </div>
            <div class="col-md-5">
              <img src=img/aaa2.png class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500" height="500" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 500x500">
              <title>Placeholder</title>
              <rect width="100%" height="100%" fill="#eee" /><text x="50%" y="50%" fill="#aaa" dy=".3em"></text>

            </div>
          </div>

          <hr class="featurette-divider">

          <!-- /END THE FEATURETTES -->

        </div><!-- /.container -->

      <?php endif; ?>

      <!-- FOOTER -->
      <?php
      require_once(dirname(__FILE__) . '\footer.php');
      ?>
      <!-- PENUTUP FOOTER -->
</body>

</html>