<?php
include '../connect.php';
	

	//$query = "SELECT COUNT(`tempahanID`) as jumlah FROM `tempahan_kenderaan` WHERE `status`!= 'BATAL' OR `status`!= 'LULUS';";
	$query = "SELECT COUNT(`tempahanID`) as jumlah FROM `tempahan_kenderaan` WHERE `status`= 'SEDANG DIPROSES' or `status`= 'SENARAI MENUNGGU';";
	$fetch = mysqli_query($conn,$query);
	$get = mysqli_fetch_array($fetch);
	
	$query1 = "SELECT COUNT(`kad_pengenalan`) AS jumlah 
           FROM `user` 
           WHERE (`status` = '' OR `status` IS NULL)";
	$fetch1 = mysqli_query($conn,$query1);
	$get1 = mysqli_fetch_array($fetch1);

?>
<!-- ======= Header ======= -->
  <header id="header" class="header fixed-top d-flex align-items-center">

    <div class="d-flex align-items-center justify-content-between">
      <a href="" class="logo d-flex align-items-center">
        <img src="assets/img/logo_mainpp.png" alt="">
        <span class="d-none d-lg-block" style="font-size:18px;">Sistem Tempahan</span>
      </a>
      <i class="bi bi-list toggle-sidebar-btn"></i>
    </div><!-- End Logo -->

    <nav class="header-nav ms-auto">
      <ul class="d-flex align-items-center">
        <li class="nav-item dropdown pe-3">

			<a class="dropdown-item d-flex align-items-center" onclick="logout()">
				<i class="bi bi-box-arrow-right" ></i>
				<span>Log Keluar</span>
			</a>        
        </li><!-- End Profile Nav -->

      </ul>
    </nav><!-- End Icons Navigation -->      
    

  </header><!-- End Header -->

  <!-- ======= Sidebar ======= -->
  <aside id="sidebar" class="sidebar" >

    <ul class="sidebar-nav" id="sidebar-nav">
		<li class="nav-item">
			<a class="nav-link collapsed" href="../mainMenu.php">
			  <i class="bi bi-house-fill"></i>
			  <span>Menu Utama</span>
			</a>
		  </li><!-- End Dashboard Nav -->
		
		<li class="nav-item">
			<a class="nav-link collapsed" href="DashboardKenderaan.php">
			  <i class="bi bi-grid"></i>
			  <span>Dashboard</span>
			</a>
		  </li><!-- End Dashboard Nav -->
		  <li class="nav-item">
				<a class="nav-link collapsed " href="approvePage.php">
				  <i class="bi bi-person-plus-fill"></i>
				  <span>Permohonan Pendaftaran Baru</span>
				  <div class="card-icon rounded-circle d-flex align-items-center justify-content-center" style="color:red;">
                      <?php echo $get1['jumlah']?>
				  </div>
				</a>
			  </li><!-- End permohonan Nav -->
		   <li class="nav-item">
			<a class="nav-link collapsed " href="tempahanKenderaan.php">
			  <i class="bi bi-door-closed-fill"></i>
			  <span>Tempahan Kenderaan</span>
			</a>
		  </li><!-- End tempahan Nav -->
		  <li class="nav-item">
			<a class="nav-link collapsed " href="listSemakKelulusan.php">
			  <i class="bi bi-journal-text"></i>
			  <span>Semak Kelulusan Tempahan </span>
			   <div class="card-icon rounded-circle d-flex align-items-center justify-content-center" style="color:red;">
                      <?php echo $get['jumlah']?>
               </div>
			</a>
		  </li><!-- End kelulusan Nav -->
		
		  <li class="nav-item">
			<a class="nav-link collapsed " href="daftarPemandu.php">
			  <i class="bi bi-person-plus"></i>
			  <span>Daftar Pemandu</span>
			</a>
		  </li><!-- End tambah pemandu Nav -->
		  <li class="nav-item">
			<a class="nav-link collapsed " href="daftarKenderaan.php">
			  <i class="ri-car-fill"></i>
			  <span>Daftar Kenderaan</span>
			</a>
		  </li><!-- End tambah kenderaan Nav -->
		  <li class="nav-item">
        <a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="collapse" href="#">
          <i class="bi bi-layout-text-window-reverse"></i><span>Laporan</span><i class="bi bi-chevron-down ms-auto"></i>
        </a>
        <ul id="tables-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
		  <li>
            <a href="printLaporanSesi.php">
              <i class="bi bi-circle"></i><span>Laporan Tempahan (Harian)</span>
            </a>
          </li>
          <li>
            <a href="printLaporanBulanan.php">
              <i class="bi bi-circle"></i><span>Laporan Tempahan (Bulanan)</span>
            </a>
          </li>
		  <li>
            <a href="printLaporanTahunan.php">
              <i class="bi bi-circle"></i><span>Laporan Tempahan (Tahunan)</span>
            </a>
          </li>
          <li>
            <a href="printLaporanByKenderaan.php">
              <i class="bi bi-circle"></i><span>Laporan Tempahan (Kenderaan)</span>
            </a>
          </li>
        </ul>
      </li><!-- End laporan Nav -->  
	  <li class="nav-item">
		<a class="nav-link collapsed" href="transaksiLog.php">
		   <i class="bi bi-code-square"></i>
		  <span>Transaksi Log Pengguna </span>
		</a>
	  </li><!-- End transaksi log Page Nav --> 
    </ul>

  </aside><!-- End Sidebar-->

  