<?php
@session_start();
include "control/activity.php";

 $dd = new activity();
 $loginStatus = $_SESSION['loginDetails'];


  if($loginStatus == null){
    echo "<script>window.open('login.php','_self')</script>";
  }



  
  $table = "admin_calculation";
  $condition = null;
  $getAdminDetails = $dd->single($table,$condition);
  

?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title><?= $getAdminDetails['title']; ?></title>
</head>
<body>

    <div class="main" id="main">
		  <?php include "menu.php"; ?>
    <div class="right"> 
  <div class="tab-content">


   <?php include "headermenu.php"; ?>


        <!-- Overview -->
         <div id="overview" class="tab-pane active"  >
                <div class="content" >
                  
               <div class="content-wrapper">
                 <div class="container-fluid">

                      <!--======================================================  Content  ====================================================-->                                            
                          <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                              <a href="dashboard.php">BET HISTORY</a>
                            </li>
                          </ol>

                          <div class="row">
                              <div class="col-xl-3 col-sm-6 mb-3">
                                  <form method="get">
                                    <input placeholder="Search By Mobile" name="mob"/><button>Search</button>
                                 </form>
                              </div>


                              <div class="col-xl-12 col-sm-12 mb-12">
                                   <table class="table">
                                       <tr>
                                         <th>Sr</th>
                                         <th>Periods</th>
                                         <th>Date</th>
                                         <th>Bet Amount</th>
                                         <th>Bet Type</th>
                                         <th>Loss OR Win</th>
                                       </tr>

                                       <?php
                                         @$mob = $_REQUEST['mob'];
                                         $table = "account_history INNER JOIN userdetails ON account_history.userKey = userdetails.userKey";
                                         $condition = " where userdetails.mobile='$mob' AND account_history.game_name='Wingo' OR account_history.game_name='k3' ORDER BY 1 DESC";
                                         $getHistory = $dd->fetch_multi($table,$condition);
                                         foreach($getHistory as $key){
                                            @$i++;
                                       ?>

                                       <tr>
                                         <td><?= $i; ?></td>
                                         <td><?= $key->periods; ?></td>
                                         <td><?= $key->action_date; ?></td>
                                         <td><?= $key->amount; ?></td>
                                         <td><?= $key->selected_number; ?></td>
                                         <td><?= $key->lossorprofit; ?></td>
                                       </tr>

                                       <?php } ?>
                                    </table>
                              </div>

                          </div>
  
                           
      <!--============  FIN DE L'AJOUT  ===============-->
      
      
      
     
      </div>
      <!-- /.container-fluid-->
       </div>  <!-- /content-wrapper-->


                </div>
                </div>
             </div><!--Right panel-->
</div><!--Main-->


</body>
</html>
<?php include "style.php" ?>


