<?php  
require_once '../php/admin.php'; 
// require_once '../php/c.php';




?>


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
				<script src="../../assets/plugins/jquery/jquery.min.js"></script>
    <script src="assets/js/jquery-1.10.2.js"></script>
 
	
	
      <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Users</title>
	<!-- BOOTSTRAP STYLES-->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
     <!-- FONTAWESOME STYLES-->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
     <!-- MORRIS CHART STYLES-->
   
        <!-- CUSTOM STYLES-->
    <link href="assets/css/custom.css" rel="stylesheet" />
     <!-- GOOGLE FONTS-->
   <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
     <!-- TABLE STYLES-->
    <link href="assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
</head>
<body>
    <div id="wrapper">
        <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html">Binary admin</a> 
            </div>
  <div style="color: white;
padding: 15px 50px 5px 50px;
float: right;
font-size: 16px;">  Date : <?php echo date('d M Y',time()); ?> &nbsp; <a href="../logout/" class="btn btn-danger square-btn-adjust">Logout</a> </div>
        </nav>   
           <!-- /. NAV TOP  -->
                <nav class="navbar-default navbar-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="main-menu">
				<li class="text-center">
                    <img src="assets/img/find_user.png" class="user-image img-responsive"/>
					</li>
				
					
                    <li >
							<a  class="active-menu"   href="../users/index.php"><i class="fa fa-user"></i> Users</a>
						</li>
						<li class="">
							<a href="../withdraw/index.php"><i class=" icon-wallet"></i> Withdraws</a>
						</li>
						<li class=" ">
							<a href="../deposit/index.php"><i class=" icon-wallet"></i> Deposits</a>
						</li>
						<li class=" ">
							<a  class="" href="../notice/index.php"><i class=" icon-wallet"></i>Notifications</a>
						</li>
						<li  class="">
							<a   href="../balan/index.php"><i class="fa fa-cog"></i> Set Balance</a>
						</li><li  class="">
							<a   href="../bon/index.php"><i class="fa fa-cog"></i> Set Bonus</a>
						</li>
						<li  class="">
							<a   href="../plan/index.php"><i class="fa fa-cog"></i> Upgrade PLan</a>
						</li>
							<li class=" ">
							<a href="../trades/index.php"><i class="fa fa-cog"></i> Trades</a>
						</li>
						
						 <li  class=""> 
							 <a class=" "  href="../upcode/index.php"><i class="fa fa-cog"></i> code</a> 
						 </li> 
						 
						<li class=" ">
							<a href="../settings/index.php"><i class="fa fa-cog"></i> Settings</a>
						</li>	
						
						<!--<li class=" ">-->
						<!--	<a href="../cpass/index.php"><i class="fa fa-cog"></i> Change Password</a>-->
						<!--</li>-->
                        </ul>
                      </li>  
                  
                </ul>
               
            </div>
            
        </nav>  
        <!-- /. NAV SIDE  -->
        <div id="page-wrapper" >
            <div id="page-inner">


               <div class="row">
                    <div class="col-md-12">
                     <h3 class="text-info">Welcome <i class="fa fa-user"></i> Admin,</h3>   
                     <hr>
                    </div>
					 
					

					
                    <div class="col-md-4">
                     <!--<h2 class="pl-4"><i class="fa fa-user"></i> Users </h2>  -->
                        <div class="d-flex">
                              <button onclick="location.href='../users'" class="btn btn-primary btn-block"><i  class="fa fa-users"></i> USERS</button>

                        </div>
                        <br>
                    </div>
                    
                    
                      <div class="col-md-4">
                     <!--<h2 class="pl-4"><i class="fa fa-user"></i> Users </h2>  -->
                        <div class="d-flex">
                              <button onclick="location.href='../deposit'" class="btn btn-success btn-block"><i  class="fa fa-money"></i> Deposits</button>

                        </div>
                        <br>
                    </div>
                    
                      <div class="col-md-4">
                     <!--<h2 class="pl-4"><i class="fa fa-user"></i> Users </h2>  -->
                        <div class="d-flex">
                              <button onclick="location.href='../withdraw'" class="btn btn-warning btn-block"><i  class="fa fa-money"></i> Withdrawals</button>

                        </div>
                        <br>
                    </div>
                    
                     <div class="col-md-4">
                     <!--<h2 class="pl-4"><i class="fa fa-user"></i> Users </h2>  -->
                        <div class="d-flex">
                              <button onclick="location.href='../settings'" class="btn btn-danger btn-block"><i  class="fa fa-gear"></i> Settings</button>

                        </div>
                        <br>
                    </div>
                    
                    
				  <hr/>	 
			</div>		
<?php if(isset($_SESSION['success'])){ ?>			<div class="alert alert-success">
  <strong>Success!</strong> <?php ucfirst($_SESSION['success']); ?>.
</div>

<?php unset($_SESSION['success']); } ?>
            <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">
    <?php $q="select count(*) from info where 1"; $r = mysqli_query($con,$q); $users = mysqli_R($r,0); ?>                    
    <?php $q="select sum(amount) from trans where type='deposit' "; $r = mysqli_query($con,$q); $total_deposit = mysqli_R($r,0); ?>                    
    <?php $q="select sum(amount) from trans where type='withdrawal' "; $r = mysqli_query($con,$q); $total_withdraw = mysqli_R($r,0); ?>                    
    <?php $q="select sum(profit) from info where 1 "; $r = mysqli_query($con,$q); $total_profit = mysqli_R($r,0); ?>                    
                        <div class="panel-body">
                            <div class="">
                                    <div class="row">
                                        <div class="col-md-3"> 
                                        <div class="bg-danger bordered text-center rounded" style="padding:1px 0px 1px 0px">
                                             <h3 class="text-white"><i class="fa fa-user"></i> USERS</h3>
                                            <h4><?php echo $users ; ?></h4>
                                        </div>
                                           
                                        </div>
                                        
                                          <div class="col-md-3"> 
                                       <div class="bg-success text-center" style="padding:1px 0px 1px 0px">
                                             <h3 class="text-white"> <i class="fa fa-money"></i> Deposits</h3>
                                            <h4>$<?php echo number_format($total_deposit,2) ; ?></h4>
                                        </div>
                                           
                                           
                                        </div>
                                        
                                          <div class="col-md-3"> 
                                        <div class="bg-warning text-center" style="padding:1px 0px 1px 0px">
                                             <h3 class="text-white"> <i class="fa fa-money"></i> Withdrawals</h3>
                                            <h4>$<?php echo number_format($total_withdraw,2); ?></h4>
                                        </div>
                                           
                                           
                                        </div>
                                        
                                        
                                          <div class="col-md-3"> 
                                        <div class="bg-info text-center" style="padding:1px 0px 1px 0px">
                                             <h3 class="text-white"> <i class="fa fa-money"></i> Profits</h3>
                                            <h4>$<?php echo number_format($total_profit,2); ?></h4>
                                        </div>
                                           
                                           
                                        </div>
                                        
                                          
                                         
                                         
                                        
                                        
                                    </div>
                            </div>
                            
                        </div>
                    </div>
                    <!--End Advanced Tables -->
                </div>
            </div>
                <br>
<script> <?php if(isset($words)){echo $words;}  ?> </script>
                <br>
				
             <!-- /. PAGE INNER  -->
            </div>
			
			
			
         <!-- /. PAGE WRAPPER  -->
     <!-- /. WRAPPER  -->
    <!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
    <!-- JQUERY SCRIPTS -->
	<script src="../../assets/plugins/jquery/jquery.min.js"></script>
    <script src="assets/js/jquery-1.10.2.js"></script>
      <!-- BOOTSTRAP SCRIPTS -->
    <script src="assets/js/bootstrap.min.js"></script>
    <!-- METISMENU SCRIPTS -->
    <script src="assets/js/jquery.metisMenu.js"></script>
     <!-- DATA TABLE SCRIPTS -->
    <script src="assets/js/dataTables/jquery.dataTables.js"></script>
    <script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
        <script>
            $(document).ready(function () {
                $('#dataTables-example').dataTable();
            });
			 
			
    </script>
	<?php   if(isset($maro)){echo $maro;}  ?>
         <!-- CUSTOM SCRIPTS -->
    <script src="assets/js/custom.js"></script>
    
   
</body>
</html>
