ok

Mini Shell

Direktori : /home2/selectio/public_html/frames-hub/
Upload File :
Current File : /home2/selectio/public_html/frames-hub/dashboard.php

<?php include('header.php'); ?>
		<div class="page-wrapper">
			<div class="page-content">
<?php 
$conditions='';
    if($_SESSION['frames_hub']['id']){
        $id = $_SESSION['frames_hub']['id'];
        $conditions.='and client_id='.$id;  
    }
$sql="SELECT COUNT(id) as orders
,(select COUNT(id) from shipment WHERE DATE(shipment_date) = DATE(NOW() - INTERVAL 1 DAY) $conditions) as yesterday_orders
,(select COUNT(id) from shipment WHERE shipment_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE() $conditions) as last_30days_total_orders
,(select COUNT(id) from shipment WHERE shipment_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()  and shipment_updated_status>0 and shipment_updated_status<3 $conditions) as last_30days_pending_orders
,(select COUNT(id) from shipment WHERE shipment_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()  and shipment_updated_status>2 and shipment_updated_status<8 $conditions) as last_30days_intransit_orders
,(select COUNT(id) from shipment WHERE shipment_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()  and shipment_updated_status=8 $conditions) as last_30days_delivered_orders
,(select COUNT(id) from shipment WHERE shipment_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()  and shipment_updated_status=9 $conditions) as last_30days_ndr_orders
,(select COUNT(id) from shipment WHERE shipment_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()  and shipment_updated_status=10 $conditions) as last_30days_rto_orders
FROM `shipment` where 1=1 $conditions";

    $statement = $pdo->prepare($sql);
    $statement->execute();
    $orders_info = $statement->fetchAll(PDO::FETCH_ASSOC);


?>			    
<!--start overview details-->
<!--start Order Info-->
<div class="row">
    

    
    
    
                   <div class="col-md-12 col-xl-3">
					 <div class="card radius-10 ">
						<div class="card-body cards-hi">
							<div class="d-flex align-items-center">
							    <div id="chart1">
							        <img src="assets/img/order/create_order.png" style="width: 55px;">
							    </div>
								<div class="me-auto" style="padding-left:10px;">
									<p class="mb-0 text-black">Total Orders</p>
									<h4 class="my-1 text-black"><?php if(isset($orders_info[0]['orders'])){ echo $orders_info[0]['orders'];}else{ echo "0";} ?></h4>
									<p class="mb-0 font-12 text-black">+<?php if(isset($orders_info[0]['yesterday_orders'])){ echo $orders_info[0]['yesterday_orders'];}else{ echo "0";} ?> orders in yesterday</p>
								</div>
								
							</div>
						</div>
					 </div>
				   </div>
				   <div class="col-md-12 col-xl-9">
					<div class="card radius-10 ">
					   <div class="card-body cards-hi bg-beige">
					       
					       <div class="row">
					           <div class="col-md-12 col-xl-12 col-sm-12">
					               <b class="my-1 text-black">Shipments Details</b> <span class="font-8">Last 30 days</span><br><br>
					           </div>
					           <div class="col-md-4 col-xl-2 col-sm-2 center">
					               <div class="widgets-icons  mx-auto bg-light-info text-info mb-3" style="font-size:18px;"><?php if(isset($orders_info[0]['last_30days_total_orders'])){ echo $orders_info[0]['last_30days_total_orders'];}else{ echo "0";} ?>	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">Total Shipments</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-2 col-sm-2 center">
					               <div class="widgets-icons  mx-auto bg-light-info text-info mb-3" style="font-size:18px;"><?php if(isset($orders_info[0]['last_30days_pending_orders'])){ echo $orders_info[0]['last_30days_pending_orders'];}else{ echo "0";} ?>	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">Pickup Pending</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-2 col-sm-2 center">
					               <div class="widgets-icons  mx-auto bg-light-info text-info mb-3" style="font-size:18px;"><?php if(isset($orders_info[0]['last_30days_intransit_orders'])){ echo $orders_info[0]['last_30days_intransit_orders'];}else{ echo "0";} ?>	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">In-Transit</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-2 col-sm-2 center">
					               <div class="widgets-icons  mx-auto bg-light-info text-info mb-3" style="font-size:18px;"><?php if(isset($orders_info[0]['last_30days_delivered_orders'])){ echo $orders_info[0]['last_30days_delivered_orders'];}else{ echo "0";} ?>	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">Delivered</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-2 col-sm-2 center">
					               <div class="widgets-icons  mx-auto bg-light-info text-info mb-3" style="font-size:18px;"><?php if(isset($orders_info[0]['last_30days_ndr_orders'])){ echo $orders_info[0]['last_30days_ndr_orders'];}else{ echo "0";} ?>	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">NDR Pending</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-2 col-sm-2 center">
					               <div class="widgets-icons  mx-auto bg-light-info text-info mb-3" style="font-size:18px;"><?php if(isset($orders_info[0]['last_30days_rto_orders'])){ echo $orders_info[0]['last_30days_rto_orders'];}else{ echo "0";} ?>	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">RTO</span>
					               </div>
					            </div>
					       </div>
					       
						   
					   </div>
					</div>
				  </div>
				</div>
<!--end Order Info-->
<!--start Revenue & NDR Info-->
<div class="row">
                   <!--<div class="col-md-12 col-xl-3">
					 <div class="card radius-10 ">
						<div class="card-body cards-hi">
							<div class="d-flex align-items-center">
							    <div id="chart1">
							        <img src="assets/img/order/recharge.png" style="width: 55px;">
							    </div>
								<div class="me-auto" style="padding-left:10px;">
									<p class="mb-0 text-black">Today's Revenue</p>
									<h4 class="my-1 text-black">₹ 0</h4>
									<p class="mb-0 font-12 text-black">₹0 Revenue in yesterday</p>
								</div>
								
							</div>
						</div>
					 </div>
				   </div>-->
				   <div class="col-md-12 col-xl-12">
					<div class="radius-10 ">
					   <div class="card card-body cards-his bg-gray">
					       <div class="row">
					           <div class="col-md-12 col-xl-12 col-sm-12">
					               <b class="text-black">NDR Details</b> <span class="font-8">Last 30 days</span><br><br>
					           </div>
					           <div class="col-md-4 col-xl-3 col-sm-3 center">
					               <div class="widgets-icons  mx-auto bg-light-white  text-info mb-3" style="font-size:18px;">0	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">Total NDR</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-3 col-sm-3 center">
					               <div class="widgets-icons  mx-auto bg-light-white  text-info mb-3" style="font-size:18px;">0	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">Your Reattempt Request</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-3 col-sm-3 center">
					               <div class="widgets-icons  mx-auto bg-light-white  text-info mb-3" style="font-size:18px;">0	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">Buyer Reattempt Request</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-3 col-sm-3 center">
					               <div class="widgets-icons  mx-auto bg-light-white  text-info mb-3" style="font-size:18px;">0	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">NDR Delivered</span>
					               </div>
					            </div>
					         
					       </div>
					       
						   
					   </div>
					</div>
				  </div>
				</div>
<!--end Revenue & NDR Info-->

<!--start COD Status Info-->
<div class="row">
                   <!--<div class="col-md-12 col-xl-3">
					 <div class="card radius-10 ">
						<div class="card-body cards-hi">
							<div class="d-flex align-items-center">
							    <div id="chart1">
							        <img src="assets/img/order/recharge.png" style="width: 55px;">
							    </div>
								<div class="me-auto" style="padding-left:10px;">
									<p class="mb-0 text-black">Average Shipping</p>
									<h4 class="my-1 text-black">₹ 0</h4>
									<p class="mb-0 font-12 text-black">in Last 30 Days</p>
								</div>
								
							</div>
						</div>
					 </div>
				   </div>-->
				   <div class="col-md-12 col-xl-12">
					<div class="radius-10 ">
					   <div class="card card-body cards-his bg-green">
					       <div class="row">
					           <div class="col-md-12 col-xl-12 col-sm-12">
					               <b class="text-black">COD Details</b> <span class="font-8">Last 30 days</span><br><br>
					           </div>
					           <div class="col-md-4 col-xl-3 col-sm-3 center">
					               <div class="widgets-icons mx-auto bg-light-white  text-info mb-3" style="font-size:18px;">₹ 0	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">Total COD<br>(Last 30 Days)</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-3 col-sm-3 center">
					               <div class="widgets-icons  mx-auto bg-light-white  text-info mb-3" style="font-size:18px;">₹ 0	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">COD Available</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-3 col-sm-3 center">
					               <div class="widgets-icons  mx-auto bg-light-white  text-info mb-3" style="font-size:18px;">₹ 0	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">COD Pending<br>(Greater than 8 days)</span>
					               </div>
					            </div>
					             <div class="col-md-4 col-xl-3 col-sm-3 center">
					               <div class="widgets-icons  mx-auto bg-light-white  text-info mb-3" style="font-size:18px;">₹ 0	</div>
					               <div class="center">
					                   <span class="my-0 text-black" style="font-size:12px;">Last COD Remitted</span>
					               </div>
					            </div>
					         
					       </div>
					       
						   
					   </div>
					</div>
				  </div>
				</div>
<!--end COD Status Info-->

<!--Courier & Shipment Status & Delivery perfomrnec-->
 <div class="row row-cols-1 row-cols-md-2 row-cols-xl-2 row-cols-xxl-4">
                    <div class="col-md-3">
					 <div class="card radius-10">
						<div class="card-body card-hi" style="background-color: aliceblue;">
						    <b class="text-black">Couriers Split</b> <span class="font-8">Last 30 days</span><br><br>
								<div class="text-center" style="min-height:150px;">
								    
									<div class="widgets-icons rounded-circle mx-auto bg-light-primary text-primary mb-3" >
									    <img src="assets/img/icon/empty-box.png" style="width: 120px;margin-top:60%;">
									</div>
									
								</div>
								<h3 class="font-12 text-center text-info">Data not found for the selected filter.</h3>
							</div>
					 </div>
				   </div>
				   
				    <div class="col-md-3">
					 <div class="card radius-10">
						<div class="card-body card-hi" style="background-color: aliceblue;">
						    <b class="text-black">Overall Shipment Status</b> <span class="font-8">Last 30 days</span><br><br>
								<div class="text-center" style="min-height:150px;">
								    
									<div class="widgets-icons rounded-circle mx-auto bg-light-primary text-primary mb-3" >
									    <img src="assets/img/icon/empty-box.png" style="width: 120px;margin-top:60%;">
									</div>
									
								</div>
								<h3 class="font-12 text-center text-info">No Shipment in last 30 days.</h3>
							</div>
					 </div>
				   </div>
				   
				    <div class="col-md-3">
					 <div class="card radius-10">
						<div class="card-body card-hi" style="background-color: aliceblue;">
						    <b class="text-black">Delivery Performance</b> <span class="font-8">Last 30 days</span><br><br>
								<div class="text-center" style="min-height:150px;">
								    
									<div class="widgets-icons rounded-circle mx-auto bg-light-primary text-primary mb-3" >
									    <img src="assets/img/icon/empty-box.png" style="width: 120px;margin-top:60%;">
									</div>
									
								</div>
								<h3 class="font-12 text-center text-info">No Shipment Delivered in last 30 days.</h3>
							</div>
					 </div>
				   </div>

				</div>


<!--end overview details-->

			
			</div>
		</div>
		
		
		
		<style>
		    .center{
		        text-align:center;
		    }
		    .border-radius-30{
		        border-radius:30px;
		    }
		    .bg-gray{
		        background:gray;
		    }
		    .width-60{
		        width:60px;
		    }
		    .bg-beige{
		        background:beige
		    }
		    .bg-gray{
		        background:#DADAFC;
		    }
		    .bg-green{
		        background:#c2e7c7;
		    }
		    .padding-5{
		        padding:5px;
		    }
		    .font-12{
		        font-size:12px;
		    }
		    .font-8{
		        font-size:10px;
		    }
		    .widgets-icons {
                width: 100px;
                height: 35px;
		    }
		    .bg-light-white{
		        background:white;
		    }
		    .cards-hi{
		        min-height: 150px;
		        display: flex;
                align-items: center;
                justify-content: center;
		    }
		    .cards-his{
		        min-height: 150px;
                align-items: center;
                justify-content: center;
		    }
		     @media (min-width: 1200px){
.row-cols-xl-2>* {
    flex: 0 0 auto;
    width: 33%;
}
}
		</style>
<?php include('footer.php'); ?>

Zerion Mini Shell 1.0