<?php include "../parts/header.php"; ?>
<?php $activeMenu = "dashboard"; ?>
<?php include "../parts/sidepanel.php"; ?>
<?php include "../opendb.php" ?>

<?php
$course_count = $conn->query("SELECT COUNT(*) AS cnt FROM course")->fetch_assoc()['cnt'];
$gallery_count = $conn->query("SELECT COUNT(*) AS cnt FROM gallery")->fetch_assoc()['cnt'];
$testimonial_count = $conn->query("SELECT COUNT(*) AS cnt FROM testimonials")->fetch_assoc()['cnt'];
$testimonial_count    = $conn->query("SELECT COUNT(*) AS cnt FROM notification")->fetch_assoc()['cnt'];
?>
			<h4 class="page-title">Dashboard</h4>
			<div class="row">
				<div class="col-md-3">
					<div class="card card-stats card-warning">
						<div class="card-body ">
							<div class="row">
								<div class="col-5">
									<div class="icon-big text-center">
										<i class="la la-book"></i>
									</div>
								</div>
								<div class="col-7 d-flex align-items-center">
									<div class="numbers">
										<p class="card-category">Course</p>
										<h4 class="card-title"><?= $course_count ?></h4>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-3">
					<div class="card card-stats card-success">
						<div class="card-body ">
							<div class="row">
								<div class="col-5">
									<div class="icon-big text-center">
										<i class="la la-bar-chart"></i>
									</div>
								</div>
								<div class="col-7 d-flex align-items-center">
									<div class="numbers">
										<p class="card-category">Gallery</p>
										<h4 class="card-title"><?= $gallery_count ?></h4>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-3">
					<div class="card card-stats card-danger">
						<div class="card-body">
							<div class="row">
								<div class="col-5">
									<div class="icon-big text-center">
										<i class="la la-newspaper-o"></i>
									</div>
								</div>
								<div class="col-7 d-flex align-items-center">
									<div class="numbers">
										<p class="card-category">Testimonials</p>
										<h4 class="card-title"><?= $testimonial_count ?></h4>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-3">
					<div class="card card-stats card-primary">
						<div class="card-body ">
							<div class="row">
								<div class="col-5">
									<div class="icon-big text-center">
										<i class="la la-bell"></i>
									</div>
								</div>
								<div class="col-7 d-flex align-items-center">
									<div class="numbers">
										<p class="card-category">Notifications</p>
										<h4 class="card-title"><?= $testimonial_count ?></h4>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!-- <div class="col-md-3">
					<div class="card card-stats">
						<div class="card-body ">
							<div class="row">
								<div class="col-5">
									<div class="icon-big text-center icon-warning">
										<i class="la la-pie-chart text-warning"></i>
									</div>
								</div>
								<div class="col-7 d-flex align-items-center">
									<div class="numbers">
										<p class="card-category">Number</p>
										<h4 class="card-title">150GB</h4>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-3">
					<div class="card card-stats">
						<div class="card-body ">
							<div class="row">
								<div class="col-5">
									<div class="icon-big text-center">
										<i class="la la-bar-chart text-success"></i>
									</div>
								</div>
								<div class="col-7 d-flex align-items-center">
									<div class="numbers">
										<p class="card-category">Revenue</p>
										<h4 class="card-title">$ 1,345</h4>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-3">
					<div class="card card-stats">
						<div class="card-body">
							<div class="row">
								<div class="col-5">
									<div class="icon-big text-center">
										<i class="la la-times-circle-o text-danger"></i>
									</div>
								</div>
								<div class="col-7 d-flex align-items-center">
									<div class="numbers">
										<p class="card-category">Errors</p>
										<h4 class="card-title">23</h4>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-3">
					<div class="card card-stats">
						<div class="card-body">
							<div class="row">
								<div class="col-5">
									<div class="icon-big text-center">
										<i class="la la-heart-o text-primary"></i>
									</div>
								</div>
								<div class="col-7 d-flex align-items-center">
									<div class="numbers">
										<p class="card-category">Followers</p>
										<h4 class="card-title">+45K</h4>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div> -->
			</div>
		</div>
	</div>
				
<?php include "../parts/footer.php"; ?>