<?php
include("auth.php");
?>
<?php include("header.php");?>

            <!-- HEADER DESKTOP-->

            <!-- MAIN CONTENT-->
         


            
<?php include("menu-new.php");?>
<div class="main-content">
                <div class="section__content section__content--p30">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="overview-wrap">
                                    <h2 class="title-1">Dashboard</h2>
                                </div>
                            </div>
                        </div>


     
                        <div class="row m-t-25">
                            <div class="col-sm-6 col-lg-3">
                                <div class="overview-item overview-item--c1">
                                    <div class="overview__inner">
                                        <div class="overview-box clearfix">
                                            <div class="icon">
                                            </div>
                                            <div class="text">
                                                <h2><?php
include("dbcon.php");

$result= mysqli_query($db,"SELECT  count(*) AS totalsum FROM members");

$row = mysqli_fetch_assoc($result); 

$total = $row['totalsum'];

echo $total;

?></h2>
                                                <span>Members</span>
                                            </div>
                                        </div>
                                        <div class="overview-chart">
                                            <canvas id="widgetChart1"></canvas>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                          
                            <div class="col-sm-6 col-lg-3">
                                <div class="overview-item overview-item--c2">
                                    <div class="overview__inner">
                                        <div class="overview-box clearfix">
                                            <div class="icon">
                                            </div>
                                            <a href="all_progress_breakdown.php">
                                            <div class="text">
                                                <h2><?php
include("dbcon.php");

$result= mysqli_query($db,"SELECT  count(*) AS totalsum FROM transaction_history");

$row = mysqli_fetch_assoc($result); 

$total = $row['totalsum'];

echo $total;

?></h2>
                                            <span>Transaction History</span>
                                            </div>
                                            </a>
                                        </div>
                                        <div class="overview-chart">
                                            <canvas id="widgetChart2"></canvas>
                                        </div>
                                    </div>
                                </div>
                            </div>
                           
                           
                           <div class="col-sm-6 col-lg-3">
                                <div class="overview-item overview-item--c2">
                                    <div class="overview__inner">
                                        <div class="overview-box clearfix">
                                            <div class="icon">
                                            </div>
                                            <a href="all_transaction_history.php">
                                            <div class="text">
                                                <h2><?php
include("dbcon.php");

$result= mysqli_query($db,"SELECT  count(*) AS totalsum FROM progress_breakdown");

$row = mysqli_fetch_assoc($result); 

$total = $row['totalsum'];

echo $total;

?></h2>
                                            <span>Progress Breakdown</span>
                                            </div>
                                            </a>
                                        </div>
                                        <div class="overview-chart">
                                            <canvas id="widgetChart2"></canvas>
                                        </div>
                                    </div>
                                </div>
                            </div>
                           
                           
                            

            
                        
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- END MAIN CONTENT-->
            <!-- END PAGE CONTAINER-->
        </div>
    </div>

 

    <!-- Jquery JS-->
    <script src="vendor/jquery-3.2.1.min.js"></script>
    <!-- Bootstrap JS-->
    <script src="vendor/bootstrap-4.1/popper.min.js"></script>
    <script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
    <!-- Vendor JS       -->
    <script src="vendor/slick/slick.min.js">
    </script>
    <script src="vendor/wow/wow.min.js"></script>
    <script src="vendor/animsition/animsition.min.js"></script>
    <script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
    </script>
    <script src="vendor/counter-up/jquery.waypoints.min.js"></script>
    <script src="vendor/counter-up/jquery.counterup.min.js">
    </script>
    <script src="vendor/circle-progress/circle-progress.min.js"></script>
    <script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
    <script src="vendor/chartjs/Chart.bundle.min.js"></script>
    <script src="vendor/select2/select2.min.js">
    </script>

    <script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>

    <!-- Main JS-->
    <script src="js/main.js"></script>
    <script src="../js/user.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
    
    <script type="text/javascript">
        new Morris.Line({
            // ID of the element in which to draw the chart.
            element: 'myfirstchart',
            // Chart data records -- each entry in this array corresponds to a point on
            // the chart.
            data: [
                
            ],
            // The name of the data record attribute that contains x-values.
            xkey: 'year',
            // A list of names of data record attributes that contain y-values.
            ykeys: ['value'],
            // Labels for the ykeys -- will be displayed when you hover over the
            // chart.
            labels: ['Value'],

            resize: true
        });

        convert();

        $("#withdrawButton").click(function(e){
            e.preventDefault()

            var loading_html = '<div style="height:150px;width:150px;margin: 0 auto;"><img style="width: 100%;" src="https://i.ya-webdesign.com/images/minimalist-transparent-loading-gif-6.gif" /></div>'

            swal.fire({
                title: "<h5></h5>", 
                html: loading_html,  
                showConfirmButton: false,
                showCancelButton: false,
                allowOutsideClick: false
            })

            setTimeout(()=>{
                swal.fire('Unable to complete request', 'Please upgrade your account', 'warning')
            }, 2000)
        })

    </script>

                        
                  
                    </div>
                </div>
            </div>
            <!-- END MAIN CONTENT-->
            <!-- END PAGE CONTAINER-->
        </div>

    </div>

    <!-- Jquery JS-->
            
                        

</body>

</html>
<!-- end document-->
