<?php
include('config.php');
checkSession();
checkadmin($sdata['usertype']);
?>
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <title>Super Admin - Dashboard | <?php echo $webdata['webname']; ?></title>
      <link rel="icon" type="image/png" sizes="16x16" href="assets/img/icon.png">
      <!-- Common Plugins -->
      <link href="assets/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
      <!-- Vector Map Css-->
      <link href="assets/lib/vectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet" />
      <!-- Chart C3 -->
      <link href="assets/lib/chart-c3/c3.min.css" rel="stylesheet">
      <link href="assets/lib/chartjs/chartjs-sass-default.css" rel="stylesheet">
      <!-- Sweet Alerts -->
      <link href="assets/lib/sweet-alerts2/sweetalert2.min.css" rel="stylesheet">
      <!-- DataTables -->
      <link href="assets/lib/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css">
      <link href="assets/lib/datatables/responsive.bootstrap.min.css" rel="stylesheet" type="text/css">
      <link href="assets/lib/toast/jquery.toast.min.css" rel="stylesheet">
      <!-- Custom Css-->
      <link href="assets/scss/style.css" rel="stylesheet">
      <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
      <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
      <![endif]-->
	  <style>
	   @media print {
            html,body {
                display: none;
            }
        }
		</style>
   </head>
   <body>
     <?php 
     include('nav.php');
     ?>    <!-- ============================================================== -->
      <!-- 						Content Start	 						-->
      <!-- ============================================================== -->
      <div class="row page-header">
         <div class="col-lg-6 align-self-center">
            <h2>Dashboard</h2>
            <ol class="breadcrumb">
               <li class="breadcrumb-item"><a href="#">Home</a></li>
               <li class="breadcrumb-item">Dashboard</li>
               <li class="breadcrumb-item active"><?php echo $sdata['name'] ?>	</li>
            </ol>
         </div>
		          <div class="col-lg-6 align-self-center text-right">
            <a href="add-user.php" class="btn btn-success box-shadow btn-icon btn-rounded"><i class="fa fa-plus"></i> Create New User</a>
         </div>
		       </div>
      <section class="main-content">
                  <div class="row">
            <div class="col-sm-12">
               <div class="card">
                  <div class="card-header card-default">
                     <h3>Wallet & Users</h3><hr>
                  </div>
                  <!---------------Balance ---------------->
                                    <div class="card-body">
				  <div class="row">
				      														<div class="col">
																<div class="widget bg-info padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $sdata['child_point']; ?></h4>
											<div class="margin-b-0 ">Child Balance</div>
										</div>
									</div>
								</div>
							</div>
																					<div class="col">
																<div class="widget bg-info padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $sdata['balance']; ?></h4>
											<div class="margin-b-0 ">Balance</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
							<div class="widget bg-info padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $sdata['mobile_point']; ?></h4>
											<div class="margin-b-0 ">Mobile Token</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
							<div class="widget bg-info padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $sdata['ippb_wallet']; ?></h4>
											<div class="margin-b-0 ">IPPB WALLET</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
							<div class="widget bg-info padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $sdata['ippb_kyc_wallet']; ?></h4>
											<div class="margin-b-0 ">IPPB KYC</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
																<div class="widget bg-info padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalusers; ?></h4>
											<div class="margin-b-0 ">Total Users</div>
										</div>
									</div>
								</div>
							</div>

						</div>
                  </div>
                  <!----------------end balance--------------->
                  
                                                     <!------------ippb child--------------->
                                     <div class="card-header card-default">
                     <h3>IPPB Account  Opening</h3><hr>
                  </div>
                                   <div class="card-body">
				  <div class="row">

							<div class="col">
																<div class="widget bg-warning padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $ippbtotalapplications; ?></h4>
											<div class="margin-b-0">Total IPPB Application</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
																<div class="widget bg-success padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $ippbtotalcompleted; ?></h4>
											<div class="margin-b-0">Total IPPB Completed</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
																<div class="widget bg-danger padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $ippbtotalrejected; ?></h4>
											<div class="margin-b-0">Total IPPB Rejected</div>
										</div>
									</div>
								</div>
							</div>
						</div>
                  </div>
                 <!------------ippb end------------->
                 
                                                                      <!------------ippb kyc--------------->
                                     <div class="card-header card-default">
                     <h3>IPPB Account KYC</h3><hr>
                  </div>
                  <div class="card-body">
				  <div class="row">

						<div class="col">
						<div class="widget bg-warning padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $ippb_kyctotalapplications; ?></h4>
											<div class="margin-b-0"> IPPB Kyc Application</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
																<div class="widget bg-success padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $ippb_kyctotalcompleted; ?></h4>
											<div class="margin-b-0"> IPPB Kyc Completed</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
																<div class="widget bg-danger padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $ippb_kyctotalrejected; ?></h4>
											<div class="margin-b-0"> IPPB Kyc Rejected</div>
										</div>
									</div>
								</div>
							</div>
						</div>
                  </div>
                 <!------------ippb kyc end------------->
                  
                    <div class="card-header card-default">
                     <h3>Demographic System Management</h3><hr>
                  </div>
                  <div class="card-body">
				  <div class="row">

							<div class="col">
																<div class="widget bg-warning padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalapplications; ?></h4>
											<div class="margin-b-0">Total Applications</div>
										</div>
									</div>
								</div>
							</div>
						
							<div class="col">
																<div class="widget bg-success padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalcompleted; ?></h4>
											<div class="margin-b-0"> Total Completed</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
																<div class="widget bg-danger padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalrejected; ?></h4>
											<div class="margin-b-0">Total Rejected</div>
										</div>
									</div>
								</div>
							</div>
						</div>
                  </div>
                  <!-------Child Data-------------->
                                    <div class="card-header card-default">
                     <h3>Child Systmen Management</h3><hr>
                  </div>
                <div class="card-body">
				  <div class="row">
							<div class="col">
																<div class="widget bg-warning padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalchildapplications; ?></h4>
											<div class="margin-b-0">Total Child Applications</div>
										</div>
									</div>
								</div>
							</div>
						
							<div class="col">
																<div class="widget bg-success padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalchildcompleted; ?></h4>
											<div class="margin-b-0"> Total Child Completed</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
																<div class="widget bg-danger padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalchildrejected; ?></h4>
											<div class="margin-b-0">Total Child Rejected</div>
										</div>
									</div>
								</div>
							</div>
						</div>
                  </div>
                  <!-----------end child data------------->
                  
                                    <!-------mobile Data-------------->
                                    <div class="card-header card-default">
                     <h3>Mobile Systmen Management</h3><hr>
                  </div>
                <div class="card-body">
				  <div class="row">
							<div class="col">
																<div class="widget bg-warning padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalmobiledapplications; ?></h4>
											<div class="margin-b-0">Total Mobile Applications</div>
										</div>
									</div>
								</div>
							</div>
						
							<div class="col">
																<div class="widget bg-success padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalmobilecompleted; ?></h4>
											<div class="margin-b-0"> Total Mobile Completed</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col">
																<div class="widget bg-danger padding-15">
									<div class="row row-table">
										<div class="col-xs-8 padding-15 text-center">
											<h4 class="mv-0"><?php echo $totalmobilerejected; ?></h4>
											<div class="margin-b-0">Total Mobile Rejected</div>
										</div>
									</div>
								</div>
							</div>
						</div>
                  </div>
                  <!-----------end mobile data------------->
               </div>
            </div>
         </div>

                  	<?php 
                        include('footer.php');
                     ?>
         
         </section>
      <!-- ============================================================== -->
      <!-- 						Content End		 						-->
      <!-- ============================================================== -->
      <!-- Common Plugins -->
      <script src="assets/lib/jquery/dist/jquery.min.js"></script>
      <script type="text/javascript" src="model/js/capture.js"></script>
      <script src="assets/lib/bootstrap/js/popper.min.js"></script>
      <script src="assets/lib/bootstrap/js/bootstrap.min.js"></script>
      <script src="assets/lib/pace/pace.min.js"></script>
      <script src="assets/lib/jasny-bootstrap/js/jasny-bootstrap.min.js"></script>
      <script src="assets/lib/slimscroll/jquery.slimscroll.min.js"></script>
      <script src="assets/lib/nano-scroll/jquery.nanoscroller.min.js"></script>
      <script src="assets/lib/metisMenu/metisMenu.min.js"></script>
      <script src="assets/js/custom.js"></script>
      <!--Chart Script-->
      <script src="assets/lib/chartjs/chart.min.js"></script>
      <script src="assets/lib/chartjs/chartjs-sass.js"></script>
      <!--Vetor Map Script-->
      <script src="assets/lib/vectormap/jquery-jvectormap-2.0.2.min.js"></script>
      <script src="assets/lib/vectormap/jquery-jvectormap-us-aea-en.js"></script>
      <!-- Chart C3 -->
      <script src="assets/lib/chart-c3/d3.min.js"></script>
      <script src="assets/lib/chart-c3/c3.min.js"></script>
      <!-- Datatables-->
      <script src="assets/lib/datatables/jquery.dataTables.min.js"></script>
      <script src="assets/lib/datatables/dataTables.responsive.min.js"></script>
      <script src="assets/lib/toast/jquery.toast.min.js"></script>
      <script src="assets/js/dashboard.js"></script>
      <!--Sweet Alerts-->
      <script src="assets/lib/sweet-alerts2/sweetalert2.min.js"></script>
    <!--   <script> -->
	  	//       document.addEventListener('contextmenu', event => event.preventDefault());
    //             doc