<?php

include "main.php";

isconnected();

?>

<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->

    <!-- Title -->
    <title>SMS Sender</title>

    <!-- Favicon -->
    <link rel="icon" href="img/core-img/favicon.png">

    <!-- Master Stylesheet [If you remove this CSS file, your file will be broken undoubtedly.] -->
    <link rel="stylesheet" href="style.css">

</head>

<body>
    <!-- Preloader Start -->
    <div id="preloader">
        <div class="preload-content">
            <div id="hasro-load"></div>
        </div>
    </div>
    <!-- Preloader End -->

    <!-- ======================================
    ******* Page Wrapper Area Start **********
    ======================================= -->
    <div class="ecaps-page-wrapper">
        <!-- Sidemenu Area -->
        <?php
		
		include "menu.php";
		
		$SQL = "SELECT COUNT(*) FROM numero";
		$r = $pdo->query($SQL);
		$rr = $r->fetch();
		
		$countnumber = $rr[0];
		
		$SQL = "SELECT COUNT(*) FROM groupe";
		$r = $pdo->query($SQL);
		$rr = $r->fetch();
		
		$countgroupe = $rr[0];
		
		?>

            <!-- Main Content Area -->
            <div class="main-content">
                <div class="container-fluid">
                    <div class="row justify-content-center">
                        <div class="col-sm-6 col-lg-4">
                            <div class="card box-margin">
                                <div class="card-body">
                                    <div class="float-right"><i class="fa fa-id-badge text-danger font-30"></i></div><span class="badge badge-danger">Nombre de numéros disponible dans la base</span>
                                    <h4 class="my-3"><?php echo $countnumber; ?></h4>
                                </div>
                                <!--end card-body-->
                            </div>
                            <!--end card-->
                        </div>
                        <!--end col-->
                        <div class="col-sm-6 col-lg-4">
                            <div class="card box-margin">
                                <div class="card-body">
                                    <div class="float-right"><i class="fa fa-bar-chart-o font-30"></i></div><span class="badge badge-secondary">Nombre de groupes</span>
                                    <h4 class="my-3"><?php echo $countgroupe; ?></h4>
                                   
                                </div>
                                <!--end card-body-->
                            </div>
                            <!--end card-->
                        </div>
                        
                    </div>
               

                    

                <!-- Footer Area -->
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-12">
                            <!-- Footer Area -->
                            
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- ======================================
    ********* Page Wrapper Area End ***********
    ======================================= -->

    <!-- Must needed plugins to the run this Template -->
    <script src="js/jquery.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/bundle.js"></script>
    <script src="js/default-assets/setting.js"></script>

    <!-- Active JS -->
    <script src="js/default-assets/active.js"></script>

    <script src="js/default-assets/ammap.min.js"></script>
    <script src="js/default-assets/radar.js"></script>
    <script src="js/default-assets/widget-page-chart-active.js"></script>

    <script src="js/default-assets/apexchart.min.js"></script>
    <script src="js/default-assets/dashboard-active.js"></script>


</body>

</html>