<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>KVS DIGITAL - E-VOTING SYSTEM</title>
  <meta content="" name="description">
  <meta content="" name="keywords">

  <!-- Favicons -->
  <link href="assets/img/kvs.png" rel="icon">
  <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">

  <!-- Vendor CSS Files -->
 	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="assets/vendor/icofont/icofont.min.css" rel="stylesheet">
  <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="assets/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet">
  <link href="assets/vendor/venobox/venobox.css" rel="stylesheet">
  <link href="assets/vendor/aos/aos.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="assets/css/style.css" rel="stylesheet">

  <!-- =======================================================
 
  ======================================================== -->
</head>

<body>
 <?php if (isset($_GET['error'])) { ?>
      	      <div class="alert alert-danger" role="alert">
				  <?=$_GET['error']?>
			  </div>
			  <?php } ?>
  <!-- ======= Header ======= -->
  <header id="header" class="fixed-top  header-transparent ">
    <div class="container d-flex align-items-center">
      
      <div class="logo mr-auto">      
        
        <!-- Uncomment below if you prefer to use an image logo -->
        <a class="navbar-brand" href="#"></a>
          <h1 class="text-light"><a href="index.html">KVS DIGITAL E- VOTING</a></h1>
        </a>
      </div>

      <nav class="nav-menu d-none d-lg-block">
        
        <ul>
          <li class="active"><a href="index.php">Home</a></li>
          <li><a href="#features">Tatacara</a></li>
          <li><a href="#features">JOM UNDI</a></li>
          <li><a href="profilpelajar.php">Profil Calon</a></li>
          <?php if (isset($_SESSION["admin"]) && $_SESSION["admin"] == "Digital2026") { ?>
          <li><a href="admin.php">ADMIN PANEL</a></li>
          <li class="get-started"><a href="logout.php">LOGOUT</a></li>
          <?php } else { ?>
          <li><a href="#" data-target="#loginModal" data-toggle="modal">ADMIN</a></li>
          <?php } ?>
         
        </ul>
      </nav><!-- .nav-menu -->
 
    </div>
  </header><!-- End Header -->
<br><br><br><hr>
  <!-- ======= Hero Section ======= -->
  <section id="hero" class="d-flex align-items-center">

    <div class="container">
      <div class="row">
        <div class="col-lg-6 d-lg-flex flex-lg-column justify-content-center align-items-stretch pt-5 pt-lg-0 order-2 order-lg-1" data-aos="fade-up">
          <div>
            <h1>Pilihanraya Majlis Perwakilan Pelajar</h1>
            <h2>Tunaikan kewajipan anda. Pilih calon untuk mewakili anda. Segalanya di tangan anda</h2>
           <button type="button" class="btn btn-outline-info"><a href="#features">Jom Undi</a></button> 
          </div>
        </div>
        <div class="col-lg-6 d-lg-flex flex-lg-column align-items-stretch order-1 order-lg-2 hero-img" data-aos="fade-up">
          <img src="assets/img/hero-img.jpg" class="img-fluid" alt="">
        </div>
      </div>
    </div>

  </section><!-- End Hero -->
  
  
 

  <main id="main">
      
      <!-- ======= App Features Section ======= -->
  <section id="features" class="features contact">  
      <div class="container">
        <div class="row no-gutters">
            <div class="col-lg-5 border border-primary" style="padding: 15px;">
                <br>
                 <div class="section-title">
                     
                  
                      
                 </div>
        
         <form action="profilpelajar.php" method="post" class="contact" role="form" data-aos="fade-up">
            <p>Pilih menu Profil Calon / isi IC untuk mula undian</p>
            <div class="form-group">
            <input placeholder="No Kad Pengenalan" type="text" name="studentIC" class="form-control" id="name" required />
                
                <?php if (isset($_GET['error'])) {
                   ?>
      	      <div class="alert alert-danger" role="alert">
				  <?=$_GET['error']?>
			  </div>
			  <?php } ?>
              </div>
              <br><br>
              <div class="text-center"><button type="submit" class="btn btn-outline-success">Terus ke Profil Pelajar</button></div>
            </form>
            
            
          </div>
           <div class="col-lg-1"></div>
          
          <div class="col-xl-6 d-flex align-items-stretch order-2 order-lg-1">
              
            <div class="content d-flex flex-column justify-content-center">
                <div class="section-title">
          <h2>Tatacara Pengundian</h2>
          <p>Pilih tepat 28 calon.</p>
        </div>
              <div class="row">
                  
                <div class="col-md-6 icon-box" data-aos="fade-up">
                  <i class="bx bxs-pencil"></i>
                  <h4>Undian Online</h4>
                  <p>Membolehkan semua pengundi berdaftar menggunakan system ini secara online</p>
                </div>
                <div class="col-md-6 icon-box" data-aos="fade-up" data-aos-delay="100">
                  <i class="bx bxs-time"></i>
                  <h4>Time Frame</h4>
                  <p>Pengundi hanya boleh mengundi pada masa yang telah ditetapkan.</p>
                </div>
                <div class="col-md-6 icon-box" data-aos="fade-up" data-aos-delay="200">
                  <i class="bx bx-images"></i>
                  <h4>Undi Sekali</h4>
                  <p>Pengundi hanya boleh mengundi sekali </p>
                </div>
                <div class="col-md-6 icon-box" data-aos="fade-up" data-aos-delay="300">
                  <i class="bx bx-upload"></i>
                  <h4>Daftar dan Semak</h4>
                  <p>Mendaftar dan menyemak pengundi dan calon secara online.(ADMIN)</p>
                </div>
                <div class="col-md-6 icon-box" data-aos="fade-up" data-aos-delay="400">
                  <i class="bx bx-atom"></i>
                  <h4>Undi 28</h4>
                  <p>Pilih tepat 28 calon</p>
                </div>
                <div class="col-md-6 icon-box" data-aos="fade-up" data-aos-delay="500">
                  <i class="bx bx-check"></i>
                  <h4>Admin</h4>
                  <p>Mengetahui keputusan undian secara langsung.</p>
                </div>
              </div>
            </div>
          </div>
          
        </div>

      </div>
    </section><!-- End App Features Section -->
 
  </main><!-- End #main -->

  <!-- ======= Footer ======= -->
  <footer id="footer">
    <div class="container py-4">
      <div class="copyright">
        &copy; Copyright <?php echo date("Y"); ?> <strong><span> kvsdigital.my </span></strong>. All Rights Reserved
      </div>
      
    </div>
  </footer><!-- End Footer -->

  <a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>

<!-- ADMIN LOGIN MODAL -->


<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header border-bottom-0">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <div class="form-title text-center">
          <h4>Admin Login</h4>
        </div>
        <div class="d-flex flex-column text-center">
          <form action="admin.php" method="post" >
            
            <div class="form-group">
              <input type="password" class="form-control" name="password1" placeholder="Your password...">
            </div>
            <button type="submit" name="adminsubmit" class="btn btn-info btn-block btn-round">Login</button>
          </form>
          
          <div class="text-center text-muted delimiter">Admin only</div>
          <div class="d-flex justify-content-center social-buttons">
            
            </button>
          </di>
        </div>
      </div>
    </div>
      
  </div>
</div>
<!-- End login modal -->


   <!-- Vendor JS Files -->
  <script src="assets/vendor/jquery/jquery.min.js"></script>
  <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="assets/vendor/jquery.easing/jquery.easing.min.js"></script>
  <script src="assets/vendor/php-email-form/validate.js"></script>
  <script src="assets/vendor/owl.carousel/owl.carousel.min.js"></script>
  <script src="assets/vendor/venobox/venobox.min.js"></script>
  <script src="assets/vendor/aos/aos.js"></script>

  <!-- Template Main JS File -->
  <script src="assets/js/main.js"></script>
  
  

</body>

</html>
