 <?php
    include "../config/setup.php";
    session_start();
    if(!isset($_SESSION['main'])){
        header('Location:../../');
    }
    
    include "head.php";
?>
	<div class="wrapper">
		<div class="main-header">
			<!-- Logo Header -->
			<?php include('logo.php');?>
			<!-- End Logo Header -->

			<!-- Navbar Header -->
		    <?php include('v_topbar.php');?>
			<!-- End Navbar -->
		</div>

		<!-- Sidebar -->
	<?php include('v_sidebar.php');?>
		<!-- End Sidebar -->

		<div class="main-panel">
			<div class="content">
				<div class="panel-header bg-primary-gradient">
					<div class="page-inner py-5">
						<div class="d-flex align-items-left align-items-md-center flex-column flex-md-row">
							<div>
								<h2 class="text-white pb-2 fw-bold">Dashboard</h2>
								<!--<h5 class="text-white op-7 mb-2">Customer statistics</h5>-->
							</div>
							<div class="ml-md-auto py-2 py-md-0">
								<!--<a href="Customer_Master.php" class="btn btn-white btn-border btn-round mr-2">Manage Customer</a>-->
								<!--<a href="order_master_on_process.php" class="btn btn-secondary btn-round">Manage Orders</a>-->
							</div>
						</div>
					</div>
				</div>
				<div class="page-inner mt--5">
					<div class="row mt--2">
						 <div class="col-sm-6 col-md-6">
							<div class="card card-stats card-warning card-round">
							   <a href="category_Master.php">
								<div class="card-body">
									<div class="row">
										<div class="col-5">
											<div class="icon-big text-center">
											<i class="fas fa-cube"></i>
											</div>
										</div>
										<div class="col-7 col-stats">
											<div class="numbers">
												<p class="card-category">Category</p>
												<h4 class="card-title"><?php
$visitor=mysqli_query($config,"select count(Main_Category_id) from main_category  ");
$vis=mysqli_fetch_array($visitor);

echo $vis[0];
?>
    </h4>
											</div>
										</div>
									</div>
								</div>
								</a>
							</div>
						</div>
						<div class="col-sm-6 col-md-6">
							<div class="card card-stats card-info card-round">
								
								<a href="sub_category_Master.php">
								<div class="card-body">
									<div class="row">
										<div class="col-5">
											<div class="icon-big text-center">
												<i class="fas fa-cubes"></i>
											</div>
										</div>
										<div class="col-7 col-stats">
											<div class="numbers">
												<p class="card-category">Sub Category</p>
												<h4 class="card-title"><?php
$subscribe=mysqli_query($config,"select count(Sub_Category_id) from sub_category  ");
$sub=mysqli_fetch_array($subscribe);

echo $sub[0];
?></h4>
											</div>
										</div>
									</div>
								</div>
								
								</a>
								
							</div>
						</div>
						
						
				 
						 
					</div>
					 <div class="card-title">Today Enquiries</div>
					<div class="row">
						
						<div class="col-sm-6 col-md-3">
							<div class="card card-stats card-round" style=" background-color: #0bbb33;">
								<!--<a href="product_master.php">-->
								<div class="card-body ">
									<div class="row">
										<div class="col-5">
											<div class="icon-big text-center">
												<i class="fas fa-cubes text-warning" style="color:#f7f7f7!important;"></i>
											</div>
										</div>
									
								
										<div class="col-7 col-stats">
											<div class="numbers">
												<h3 style="  color: #ffffff;" >Total Enquiry</h3>
												
												
												<h4 class="card-title" style="  color:#f1f1f1;"  ><?php
												$orderdate=date('Y-m-d');
$total_product=mysqli_query($config,"select count(enquiryId) from enquiry ");
$tot=mysqli_fetch_array($total_product);

echo $tot[0];
?></h4>
											
											
											
											</div>
											
											
											
											
										</div>
										
										
										
									</div>
								</div>
									<!--</a>	-->
								
							</div>
						</div>
						<div class="col-sm-6 col-md-3">
							<div class="card card-stats card-round" style=" background-color: #6861ce;">
							
							<a href="newenquiry.php">
								<div class="card-body ">
									
									<div class="row">
										<div class="col-5">
											<div class="icon-big text-center">
												<i class="fas fa-ticket-alt text-success" style="color:#f7f7f7!important;"></i>
											</div>
										</div>
										<div class="col-7 col-stats">
											<div class="numbers">
												<h3 style="  color: #ffffff;" > New Enquiry</h3>
												
												
												<h4 class="card-title" style="  color:#fff;"  ><?php
												$orderdate=date('Y-m-d');
												 $cc="select count(enquiryId) from enquiry where status = 0 ";
$order_product=mysqli_query($config,$cc);
$orders=mysqli_fetch_array($order_product);
echo $orders[0];

?></h4>
											
											</div>
										</div>
									</div>
								</div>
								
								</a>
							</div>
						</div>
						<div class="col-sm-6 col-md-3">
							<div class="card card-stats card-round" style=" background-color:#007bff;">
							
							<a href="viewedenquiry.php">
							
								<div class="card-body">
									<div class="row">
										<div class="col-5">
											<div class="icon-big text-center">
												<i class="fas fa-eye text-danger" style="color:#f7f7f7!important;"></i>
											</div>
										</div>
										<div class="col-7 col-stats ">
											<div class="numbers">
												<h3 style="  color: #ffffff;" >Viewed Enquiries</h3>
												
												
												<h4 class="card-title" style="  color:#fff;"  ><?php
												$orderdate=date('Y-m-d');
$order_delivered=mysqli_query($config,"select count(enquiryId) from enquiry where status = 1 ");

$orders=mysqli_fetch_array($order_delivered);
echo $orders[0];

?></h4>
										
											</div>
										</div>
									</div>
								</div>
								
								</a>
							</div>
						</div>
						
					
				  
					</div>
					 
				</div>
			</div>
			<?php include('footer.php')?>
		</div>
		
		 	</div>
	<!--   Core JS Files   -->
	<script src="../assets/js/core/jquery.3.2.1.min.js"></script>
	<script src="../assets/js/core/popper.min.js"></script>
	<script src="../assets/js/core/bootstrap.min.js"></script>

	<!-- jQuery UI -->
	<script src="../assets/js/plugin/jquery-ui-1.12.1.custom/jquery-ui.min.js"></script>
	<script src="../assets/js/plugin/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js"></script>

	<!-- jQuery Scrollbar -->
	<script src="../assets/js/plugin/jquery-scrollbar/jquery.scrollbar.min.js"></script>

	<script src="../assets/js/plugin/datatables/datatables.min.js"></script>
	<!-- Chart JS -->
	<script src="../assets/js/plugin/chart.js/chart.min.js"></script>

	<!-- jQuery Sparkline -->
	<script src="../assets/js/plugin/jquery.sparkline/jquery.sparkline.min.js"></script>

	<!-- Chart Circle -->
	<script src="../assets/js/plugin/chart-circle/circles.min.js"></script>

	<!-- Datatables -->
	<script src="../assets/js/plugin/datatables/datatables.min.js"></script>

	<!-- Bootstrap Notify -->
	<script src="../assets/js/plugin/bootstrap-notify/bootstrap-notify.min.js"></script>

	<!-- jQuery Vector Maps -->
	<script src="../assets/js/plugin/jqvmap/jquery.vmap.min.js"></script>
	<script src="../assets/js/plugin/jqvmap/maps/jquery.vmap.world.js"></script>

	<!-- Sweet Alert -->
	<script src="../assets/js/plugin/sweetalert/sweetalert.min.js"></script>

	<!-- Atlantis JS -->
	<script src="../assets/js/atlantis.min.js"></script>

	<script >
		$(document).ready(function() {
			$('#basic-datatables').DataTable({
			});

		 
 
			 
		});
	</script>
	 
</body>
</html>