<?php
require_once './admin_header.php';
require_once './PHP_Code/connection.php';
?>

<link href="./custom_js/new_css.css" rel="stylesheet">

<div class="app-main__outer">
    <div class="app-main__inner">
        <div class="tabs-animation">
            <div class="row">
                <div class="col-sm-12 col-md-6 col-xl-4">
                    <div class="card mb-3 widget-chart" id="total_challan" style="background: linear-gradient(135deg, #d075d1, #feb47b, #86fde8);">
                        <div class="widget-chart-content">
                            <div class="icon-wrapper rounded">
                                <div class="icon-wrapper-bg bg-warning" style="background-color: white !important"></div>
                                <i class="fa fa-user text-warning" style="color: white !important"></i>
                            </div>
                            <div class="widget-numbers">
                                <?php
                                $query = 'select COUNT(DISTINCT village_id) as total_record from  tbl_village_info where flag="1"';
                                $result = mysqli_query($con, $query);
                                if (mysqli_num_rows($result) > 0) {
                                    while ($row = mysqli_fetch_assoc($result)) {
                                        ?>
                                        <span style="color: white !important"> <?php echo $row["total_record"]; ?></span>
                                        <?php
                                    }
                                } else {
                                    
                                }
                                ?>
                            </div>
                            <div class="widget-subheading fsize-1 pt-2 opacity-10 text-warning font-weight-bold">
                                <h3><b style="color: white !important">Total Village Detail</b></h3>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="col-sm-12 col-md-6 col-xl-4">
                    <div class="card mb-3 widget-chart" id="total_head" style="background: linear-gradient(135deg, #4e54c8, #8f94fb, #7efff5);">
                        <div class="widget-chart-content">
                            <div class="icon-wrapper rounded">
                                <div class="icon-wrapper-bg bg-danger" style="background-color: white !important"></div>
                                <i class="fa fa-user text-danger" style="color: white !important"></i>
                            </div>
                            <div class="widget-numbers">
                                <?php
                                $query = 'select COUNT(DISTINCT village_id) as total_record1 from  tbl_household_data where flag="1"';
                                $result = mysqli_query($con, $query);
                                if (mysqli_num_rows($result) > 0) {
                                    while ($row = mysqli_fetch_assoc($result)) {
                                        ?>
                                <span style="color: white !important"> <?php echo $row["total_record1"]; ?></span>
                                        <?php
                                    }
                                } else {
                                    
                                }
                                ?>
                            </div>
                            <div class="widget-subheading fsize-1 pt-2 opacity-10 text-danger font-weight-bold">
                                <h3><b style="color: white !important">Total Family Detail</b></h3>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>





<?php
require_once './admin_footer.php';
?>