<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
	<title>Home | Admin Panel</title>

	<!-- Favicons -->
<<link rel="shortcut icon" type="image/x-icon" href="assets/img/logo.png">

	<!-- Bootstrap CSS -->
	<link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.min.css">

	<!-- Fontawesome CSS -->
	<link rel="stylesheet" href="assets/plugins/fontawesome/css/fontawesome.min.css">
	<link rel="stylesheet" href="assets/plugins/fontawesome/css/all.min.css">
	 
	<!-- Animate CSS -->
	<link rel="stylesheet" href="assets/css/animate.min.css">

	<!-- Main CSS -->
	<link rel="stylesheet" href="assets/css/admin.css">

</head>

<body>
	<div class="main-wrapper">
	
		<!-- Header -->
	<?php include 'include/header.php'; ?>
		<!-- /Header -->
		
		<!-- Sidebar -->
		<?php include 'include/leftmenu.php'; ?>
		<!-- /Sidebar -->
		
		<div class="page-wrapper">
			<div class="content container-fluid">
			
				<!-- Page Header -->
				<div class="page-header">
					<div class="row">
						<div class="col-12">
							<h3 class="page-title text-white">Welcome <?php echo $_SESSION['account_name']; ?>!</h3>
						</div>
					</div>
				</div>
				<!-- /Page Header -->
			
				
				<div class="row">
				  
				   <?php 
				   $per=0;
        			$str="SELECT clossing_date,SUM(payment_amt) as payment_amt,SUM(comm_business_amt) as comm_business_amt,SUM(total_comm_amt) as total_comm_amt FROM `tbl_plot_emi_payment` WHERE closingstatus=1 and clossing_date>='2022-02-01' GROUP by clossing_date ORDER by clossing_date desc limit 0,1";
        			 $result=mysqli_query($connection,$str);
					$row=mysqli_fetch_array($result);
					$total_paid_amt=$row['payment_amt'];
					$comm_business_amt=$row['comm_business_amt'];
					$total_comm_amt=$row['total_comm_amt'];
					if($total_comm_amt>0 && $comm_business_amt>0)
					{
					    $per=round($total_comm_amt*100/$comm_business_amt,2,PHP_ROUND_HALF_EVEN );
					}
        			?>
					<div class="col-xl-4 col-sm-6 col-12">
					    <a href="#" style="color:#333" target="_blank">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-qrcode"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $total_paid_amt; ?></h5>
										<h6 class="text-muted">Last Clossing <br><?php echo date("d-M-y",strtotime($row['clossing_date'])); ?></h6>
									</div>
								</div>
							</div>
						</div></a>
					</div>
					<div class="col-xl-4 col-sm-6 col-12">
					    <a href="#" style="color:#333" target="_blank">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-qrcode"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $comm_business_amt; ?> </h5>
										<h6 class="text-muted">80-50 %<br><?php echo date("d-M-y",strtotime($row['clossing_date'])); ?></h6>
									</div>
								</div>
							</div>
						</div></a>
					</div>
					<div class="col-xl-4 col-sm-6 col-12">
					    <a href="#" style="color:#333" target="_blank">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-qrcode"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $total_comm_amt; ?> (<?php echo $per; ?>%)</h5>
										<h6 class="text-muted">Total Comm. Amt<br><?php echo date("d-M-y",strtotime($row['clossing_date'])); ?></h6>
									</div>
								</div>
							</div>
						</div></a>
					</div>
					
					 <?php 
        			$str="SELECT IFNULL(SUM(payment_amt),0) as payment_amt FROM tbl_plot_emi_payment WHERE closingstatus=0 ";
        	     	$unlcosedEMI=get_value($str)
        			?>
        			<div class="col-xl-4 col-sm-6 col-12">
					    <a href="PendingEMIPayment" style="color:#333" target="_blank">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-qrcode"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $unlcosedEMI; ?> </h5>
										<h6 class="text-muted">Unclosed EMI<br>Payment</h6>
									</div>
								</div>
							</div>
						</div></a>
					</div>
					<?php 
        			$str="SELECT IFNULL(SUM(payment_amt),0) as payment_amt FROM tbl_plot_emi_payment WHERE closingstatus=0 and booking_registred=0";
        	     	$UnregistredEMI=get_value($str)
        			?>
        			<div class="col-xl-4 col-sm-6 col-12">
					    <a href="PendingRegistryEMI" style="color:#333" target="_blank">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-qrcode"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $UnregistredEMI; ?> </h5>
										<h6 class="text-muted">Pending Registry <br>EMI Payment</h6>
									</div>
								</div>
							</div>
						</div></a>
					</div>
					
					<?php 
        			$str="SELECT IFNULL(SUM(income_amt),0) as income_amt FROM tbl_member_income_dtails WHERE paid_status=0 ";
        	     	$unpaidIncome=get_value($str)
        			?>
        			<div class="col-xl-4 col-sm-6 col-12">
					    <a href="UnpaidIncome" style="color:#333" target="_blank">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-qrcode"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $unpaidIncome; ?> </h5>
										<h6 class="text-muted">Unpaid Income</h6>
									</div>
								</div>
							</div>
						</div></a>
					</div>
					
						<?php 
				$str="Select count(*) as cnt from tbl_memberreg";
				$TotalUser=	get_value($str);
				?>
					<div class="col-xl-4 col-sm-6 col-12">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="far fa-user"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $TotalUser; ?></h5>
										<h6 class="text-muted">Total Users</h6>
									</div>
								</div>
							</div>
						</div>
					</div>
						<?php 
            				$str="Select count(*) as cnt from tbl_memberreg where status=1";
            				$ActiveUser=get_value($str);
            			?>
					<div class="col-xl-4 col-sm-6 col-12">
					    <a href="ActiveUserList" style="color:#333" target="_blank">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-user-shield"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $ActiveUser; ?></h5>
										<h6 class="text-muted">Active User</h6>
									</div>
								</div>
							</div>
						</div></a>
					</div>
					<?php 
        				$str="Select count(*) as cnt from tbl_memberreg where status!=1";
        				$BlockedUser=get_value($str);
        			?>
					<div class="col-xl-4 col-sm-6 col-12">
					    <a href="InactiveUserList" style="color:#333" target="_blank">
						    <div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-qrcode"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $BlockedUser; ?></h5>
										<h6 class="text-muted">Inactive User</h6>
									</div>
								</div>
							</div>
						</div>
						</a>
					</div>
					
					<?php 
        				$str="Select count(*) as cnt from tbl_memberreg where is_customer=1";
        				$totalCustomer=get_value($str);
        			?>
					<div class="col-xl-4 col-sm-6 col-12">
					    <a href="ActiveCustomer" style="color:#333" target="_blank">
						    <div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="fas fa-qrcode"></i>
									</span>
									<div class="dash-widget-info">
										<h5><?php echo $totalCustomer; ?></h5>
										<h6 class="text-muted">Total Customer</h6>
									</div>
								</div>
							</div>
						</div>
						</a>
					</div>
					

						<?php 
						$PendingWithdraw=0;
        				$str="Select IFNULL(sum(net_amt),0) as net_amt  from  tbl_member_income_dtails  where paid_status=0 ";
        				$unpaidIncome=get_value($str);
         			?>
					<div class="col-xl-4 col-sm-6 col-12">
					    <a href="#" style="color:#333" target="_blank">
						<div class="card">
							<div class="card-body">
								<div class="dash-widget-header">
									<span class="dash-widget-icon bg-primary">
										<i class="far fa-credit-card"></i>
									</span>
									<div class="dash-widget-info">
										<h5> <?php echo $unpaidIncome; ?></h5>
										<h6 class="text-muted">Unpaid Income</h6>
									</div>
								</div>
							</div>
						</div></a>
					</div>
					


                    </div>
                    
 
			</div>
		</div> 
	</div>

	<!-- jQuery -->
	<script src="assets/js/jquery-3.5.0.min.js"></script>

	<!-- Bootstrap Core JS -->
	<script src="assets/js/popper.min.js"></script>
	<script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>

	<!-- Slimscroll JS -->
	<script src="assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>

	<!-- Custom JS -->
	<script src="assets/js/admin.js"></script>

</body>


<!-- Mirrored from truelysell-admin.dreamguystech.com/template/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 19 Jun 2021 18:03:25 GMT -->
</html>