ok

Mini Shell

Direktori : /home2/selectio/www/frames-hub/ui-pages/
Upload File :
Current File : //home2/selectio/www/frames-hub/ui-pages/admin-home-data.php

<?php 
include "api/config/config.php";

$current_date = date('Y-m-d');
$datetime = date("Y-m-d", strtotime( date( 'Y-m-d' )." -7 days"));

$statement = $pdo->prepare("SELECT * FROM customer where status='1'");
$result=$statement->execute();
$query = $statement->fetchAll(PDO::FETCH_ASSOC);
$total_customer_data = $statement->rowCount();


$statement1 = $pdo->prepare("SELECT * FROM frames");
$result1=$statement1->execute();
$query1 = $statement1->fetchAll(PDO::FETCH_ASSOC);
$total_frames_data = $statement1->rowCount();

$statement2 = $pdo->prepare("SELECT * FROM `frames` WHERE date BETWEEN '" .$datetime."' and '".$current_date."'");
$result2=$statement2->execute();
$query2 = $statement2->fetchAll(PDO::FETCH_ASSOC);
$last_sevendays_frames_data = $statement2->rowCount();
?>

<div class="row row-cols-1 row-cols-md-2 row-cols-xl-4">
                   <div class="col">
					 <div class="card radius-10 border-start border-0 border-4 border-info">
						<div class="card-body">
							<div class="d-flex align-items-center">
								<div>
									<p class="mb-0 text-secondary">Total Customer</p>
									<h4 class="my-1 text-info"><?=$total_customer_data?></h4>
								</div>
								<div class="widgets-icons-2 rounded-circle bg-gradient-blues text-white ms-auto"><i class='bx bxs-users'></i>
								</div>
							</div>
						</div>
					 </div>
				   </div>
				   <div class="col">
					<div class="card radius-10 border-start border-0 border-4 border-danger">
					   <div class="card-body">
						   <div class="d-flex align-items-center">
							   <div>
								   <p class="mb-0 text-secondary">Total Customers Powers</p>
								   <h4 class="my-1 text-danger"><?=$total_frames_data?></h4>
							   </div>
							   <div class="widgets-icons-2 rounded-circle bg-gradient-burning text-white ms-auto"><i class='bx bxs-cart'></i>
							   </div>
						   </div>
					   </div>
					</div>
				  </div>
				  <div class="col">
					<div class="card radius-10 border-start border-0 border-4 border-success">
					   <div class="card-body">
						   <div class="d-flex align-items-center">
							   <div>
								   <p class="mb-0 text-secondary">Last 7 Days Sales Frames</p>
								   <h4 class="my-1 text-success"><?=$last_sevendays_frames_data?></h4>
							   </div>
							   <div class="widgets-icons-2 rounded-circle bg-gradient-ohhappiness text-white ms-auto"><i class='bx bxs-bar-chart-alt-2' ></i>
							   </div>
						   </div>
					   </div>
					</div>
				  </div>
				</div>
				

Zerion Mini Shell 1.0