<?php include('../includes/connection.php');
@session_start();

if(!isset($_SESSION['admin_login'])) {
  header("Location: login.php");
  }

$catsum = mysqli_fetch_assoc(mysqli_query($DB_CONN,"SELECT count(id) as totalshipping from shipping"));
$ads = mysqli_fetch_assoc(mysqli_query($DB_CONN,"SELECT count(id) as totalvault from vault"));

 include('header.php');


  ?>
      <div id="content-wrapper">

        <div class="container-fluid">

          <!-- Breadcrumbs-->
          <ol class="breadcrumb">
            <li class="breadcrumb-item">
              <a href="#">Dashboard</a>
            </li>
            <li class="breadcrumb-item active">Overview</li>
          </ol>

          <!-- Icon Cards-->
          <div class="row">
            <div class="col-xl-4 col-sm-6 mb-4">
              <div class="card text-white bg-primary o-hidden h-100">
                <div class="card-body">
                  <div class="card-body-icon">
                    <i class="fas fa-fw fa-comments"></i>
                  </div>
                  <div class="mr-5"> <?php echo $catsum['totalshipping']; ?> </div>
                </div>
                <a class="card-footer text-white clearfix small z-1" href="view_shipping.php">
                  <span class="float-left">Total Shipping</span>
                  <span class="float-right">
                    <i class="fas fa-angle-right"></i>
                  </span>
                </a>
              </div>
            </div>

            <div class="col-xl-4 col-sm-6 mb-4">
              <div class="card text-white bg-warning o-hidden h-100">
                <div class="card-body">
                  <div class="card-body-icon">
                    <i class="fas fa-fw fa-list"></i>
                  </div>
                  <div class="mr-5"> <?php echo $ads['totalvault']; ?>  </div>
                </div>
                <a class="card-footer text-white clearfix small z-1" href="view_vault.php">
                  <span class="float-left"> Total Vault </span>
                  <span class="float-right">
                    <i class="fas fa-angle-right"></i>
                  </span>
                </a>
              </div>
            </div>

          </div>
        </div>
 
<?php include('footer.php'); ?>