<?php 	
    include_once('../../config.php');   	
    include_once(ABS_PATH.'/admin/login_check.php');     
    include ABS_PATH.'/admin/header.php';	
    ?>  

<script>
$(function() {
		$( "#dateselect" ).datepicker(); 
});

function del_record(val)
{

	var r = confirm("Do you really want to delete record !");
	if (r == true) {    
	$.ajax({
	type: 'POST',
	url: "../ajax/default.php",
	//async: false,			 
	data: {del_city_names:1,val:val},	  
	success: function(ajaxresult){	     
		location.reload();	 	
	},
	error: function(XMLHttpRequest, textStatus, errorThrown) { 
	alert('Error');
	}
	});
	
	}	
	
}

</script>
		 
		<div class="col-md-10">  
  			<div class="content-box-large">
  				<div class="panel-heading">
					<div class="panel-title"><h3>Daily Joing  Report </h3></div>
					
					 
					 <div align="left"> 
					 <form method="post" autocomplete="off">  
					
					<div class="col-sm-2">
						<input name="dateselect" id="dateselect" class="form-control"   placeholder="Date"  > 
					</div>
					
					 
					<input   class="btn btn-warning"  type="submit" value="Apply" name="filterSub"/>
					
					</form>
						
					</div>


					
					<div align="right"> 
					
					<input type="button"    class="btn btn-warning" name="btnback" id="btnback" value=" Add New User " onClick="javascript:location.href='#';" />
					</div>
					
				</div>
				
  				<div class="panel-body">
  					<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
						<thead>
							<tr>
								<th>Name</th>   
								<th>Values </th>   
							</tr>
						</thead>
						<tbody>
						 
						 
					    	<?php 
							    if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
                                $stmt=$conn->prepare("SELECT amt FROM `UI__DChstr`  where  `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amt; 
                                        
                                        
                                        
							    
							?>
							
							<tr class="odd gradeX"> 
								<td> <a href="dailyTopups.php?Tdate=<?php echo $lst;?>">Todays  Topup </a></td>    
								<td>  <?php echo $amt;?></td>    
							</tr>    
							
							
							<?php 
                                
                                if(isset($_POST['filterSub'])) 
									$lst = date("d-m-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-m-Y");   
								 
                                  $stmt=$conn->prepare("SELECT id FROM UI__Rgst  where `RegOn` like '%$lst%' ");   
//                                $stmt->bindValue(':RegOn',    , PDO::PARAM_STR);  
                                $stmt->execute();
                                $ct = $stmt->rowCount();
							?>  
							
							<tr class="odd gradeX"> 
								<td> <a href="dailyRegi.php?Tdate=<?php echo $lst;?>"> Todays Joining </a></td>    
								<td>   <?php echo $ct;?> </td>     
							</tr>  
							
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y"); 
								
                                $stmt=$conn->prepare("SELECT * FROM `UI__WithDraw`  where payout=1  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                              
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amt; 
                                        
                                $stmt=$conn->prepare("SELECT * FROM `UI__WithDrawForD`  where payout=1  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                               
                               // foreach($moneytransfer as $mpp)
                                      //  $amt += $mpp->amt;         
							    
							?>
							
						    <tr class="odd gradeX"> 
							<td> <a href="dailyWith.php?Tdate=<?php echo $lst;?>"> Todays UPI Withdraw </a></td>    
							<td>  <?php echo $amt;?> </td>        
							</tr>    
							
							<?php  
								if(isset($_POST['filterSub']))  
								{ 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
									$lst1 = date("Y-m-d", strtotime($_POST['dateselect']));
								}
								else
								{
									
									$lst =  date("d-M-Y");
									$lst1 = date("Y-m-d");
								}
								 
                                $stmt=$conn->prepare("SELECT * FROM `moneytransfer`  where bankTrnfer = 1 and (`last_update` like '%$lst%'  || `last_update` like '%$lst1%'  ) ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                            
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount;  
                                        
                                        
                                 $stmt=$conn->prepare("SELECT * FROM `moneytransferForD`  where bankTrnfer = 1 and (`last_update` like '%$lst%'  || `last_update` like '%$lst1%'  ) ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount; 
							?>
							
							 <tr class="odd gradeX"> 
								<td> <a href="dailyBankt.php?Tdate=<?php echo $lst;?>&Tdate1=<?php echo $lst1;?>"> Todays IMPS Transfer </a></td>    
								<td>   <?php echo $amt;?> </td>     
							</tr>  
							
							
								<?php  
								if(isset($_POST['filterSub']))  
								{ 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
									$lst1 = date("Y-m-d", strtotime($_POST['dateselect']));
								}
								else
								{
									
									$lst =  date("d-M-Y");
									$lst1 = date("Y-m-d");
								}
								 
                                $stmt=$conn->prepare("SELECT * FROM `moneytransfer`  where bankTrnfer = 0 and (`last_update` like '%$lst%'  || `last_update` like '%$lst1%'  ) ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                            
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount;  
							?>
							
							 <tr class="odd gradeX"> 
								<td> <a href="dailyBanktT.php?Tdate=<?php echo $lst;?>&Tdate1=<?php echo $lst1;?>"> Todays NEFT Transfer </a></td>    
								<td>   <?php echo $amt;?> </td>     
							</tr>  
							
							
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
                                $stmt=$conn->prepare("SELECT * FROM `UI__WithDraw`  where TWhm!=''  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amt; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="dailyIdtoId.php?Tdate=<?php echo $lst;?>"> Todays Id To Id Transfer </a></td>    
								<td>   <?php echo $amt;?> </td>        
							</tr>  
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
                                $stmt=$conn->prepare("SELECT reward FROM `UI__Reward`  where  `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->reward; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="dailyrewards.php?Tdate=<?php echo $lst;?>"> Todays Rewards </a></td>    
								<td>   <?php echo $amt;?> </td>        
							</tr>  
							
							
							
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
                                $stmt=$conn->prepare("SELECT Amt FROM `UI__Tpm`  where  `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->Amt; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="dailyspot.php?Tdate=<?php echo $lst;?>"> Todays Spot  </a></td>    
								<td>   <?php echo $amt;?> </td>        
							</tr>  
							
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
								
                                $stmt=$conn->prepare("SELECT amount FROM `UI__DailyROIGene`  where  `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="dailyRoi.php?Tdate=<?php echo $lst;?>"> Todays ROI  Income </a></td>    
								<td>   <?php echo $amt;?> </td>        
							</tr>  
							
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
                                $stmt=$conn->prepare("SELECT Tamt FROM `UI__Bns`  where  `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->Tamt; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="dailyLeveli.php?Tdate=<?php echo $lst;?>"> Todays Level Income </a></td>    
								<td>   <?php echo  number_format((float)($amt), 2, '.', '') ;?> </td>        
							</tr>  
							
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
								
                                $stmt=$conn->prepare("SELECT *  FROM `UI__AtwReserse`  where  `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->Amt; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="atwCance.php?Tdate=<?php echo $lst?>"> Todays ATW  Cancel </a></td>    
								<td>   <?php echo  $amt ;?> </td>      
							</tr>  
							
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
								
                                $stmt=$conn->prepare("SELECT *  FROM `UI__Atw`  where  status!=1 and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->Amt; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="atwdeposite.php?Tdate=<?php echo $lst?>"> Todays ATW  Deposite </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
							
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
								
								 
                                $stmt=$conn->prepare("SELECT *  FROM `UI__Fundtransfer`  where  UTR = 'Babnking'  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amt; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="pGreports.php?Tdate=<?php echo $lst?>"> Todays PG  Deposite </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
							
								
							<?php 
							     if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y");   
								
								
								 
                                $stmt=$conn->prepare("SELECT *  FROM `UI__Recharges`  where   `last_update` like '%$lst%' and status=1  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount; 
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="rechargereports.php?Tdate=<?php echo $lst?>"> Recharges </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
							
							<?php 
							  	if(isset($_POST['filterSub']))  
								{ 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
									$lst1 = date("Y-m-d", strtotime($_POST['dateselect']));
								}
								else
								{
									
									$lst =  date("d-M-Y");
									$lst1 = date("Y-m-d");
								}
								 
                                $stmt=$conn->prepare("SELECT * FROM `moneytransfer`  where grapPay = 1 and bankTrnfer = 1 and (`last_update` like '%$lst%'  || `last_update` like '%$lst1%'  ) ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                            
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount;  
                                        
                                        
                                 $stmt=$conn->prepare("SELECT * FROM `moneytransferForD`  where grapPay = 1 and  bankTrnfer = 1 and (`last_update` like '%$lst%'  || `last_update` like '%$lst1%'  ) ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount; 
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="rechargereports.php?Tdate=<?php echo $lst?>"> Grap Pay - 1 IMPS </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
							<?php 
							  	if(isset($_POST['filterSub']))  
								{ 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
									$lst1 = date("Y-m-d", strtotime($_POST['dateselect']));
								}
								else
								{
									
									$lst =  date("d-M-Y");
									$lst1 = date("Y-m-d");
								}
								 
                                $stmt=$conn->prepare("SELECT * FROM `moneytransfer`  where grapPay = 2 and bankTrnfer = 1 and (`last_update` like '%$lst%'  || `last_update` like '%$lst1%'  ) ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                            
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount;  
                                        
                                        
                                 $stmt=$conn->prepare("SELECT * FROM `moneytransferForD`  where grapPay = 2 and  bankTrnfer = 1 and (`last_update` like '%$lst%'  || `last_update` like '%$lst1%'  ) ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount; 
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="rechargereports.php?Tdate=<?php echo $lst?>"> Grap Pay - 2 IMPS </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
							
							<?php 
							      if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y"); 
								
                                $stmt=$conn->prepare("SELECT * FROM `UI__WithDraw`  where payout=1 and grapPay =1  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                              
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amt; 
                                        
                               /* $stmt=$conn->prepare("SELECT * FROM `UI__WithDrawForD`  where payout=1  and grapPay = 1  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                               
                               // foreach($moneytransfer as $mpp)
                                      //  $amt += $mpp->amt;   */  
							    
							?>
							
							 <tr class="odd gradeX">
							    
								<td> <a href="gpayUpi1.php?Tdate=<?php echo $lst?>"> Grap Pay - 1 UPI </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
							
							<?php 
							      if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
								else
									$lst =  date("d-M-Y"); 
								
								
								 
                                $stmt=$conn->prepare("SELECT * FROM `UI__WithDraw`  where payout=1 and grapPay = 2  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                              
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amt; 
                                        
                                /*$stmt=$conn->prepare("SELECT * FROM `UI__WithDrawForD`  where payout=1  and grapPay = 2  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                               
                               // foreach($moneytransfer as $mpp)
                                      //  $amt += $mpp->amt; */    
							    
							?>
							 <tr class="odd gradeX">
							    
								<td> <a href="gpayUpi2.php?Tdate=<?php echo $lst?>"> Grap Pay - 2 UPI </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
							
							
						 	 <?php 
						 	 
						 	    
							    if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
							    else
									$lst =  date("d-M-Y"); 
								
								  
                                $stmt=$conn->prepare("SELECT * FROM `UI__ConirmQr`  where  type = 0 and  `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                              
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->Amt; 
                                        
                                /*$stmt=$conn->prepare("SELECT * FROM `UI__WithDrawForD`  where payout=1  and grapPay = 2  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                               
                               // foreach($moneytransfer as $mpp)
                                      //  $amt += $mpp->amt; */    
							    
							?>
							 <tr class="odd gradeX">
							    
								<td> <a href="Collection.php?Tdate=<?php echo $lst?>">  Qr Collection </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
							
							
							
						 	 <?php 
						 	 
						 	    
							    if(isset($_POST['filterSub'])) 
									$lst = date("d-M-Y", strtotime($_POST['dateselect'])); 
							    else
									$lst =  date("d-M-Y"); 
								
								  
                                $stmt=$conn->prepare("SELECT * FROM `UI__DailyROIGeneClone`  where  paidStatus = 0 and  `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                              
                                
                                $amt = 0;
                                foreach($moneytransfer as $mpp)
                                        $amt += $mpp->amount; 
                                        
                                /*$stmt=$conn->prepare("SELECT * FROM `UI__WithDrawForD`  where payout=1  and grapPay = 2  and `Tdate` like '%$lst%'  ");   
                                //$stmt->bindValue(':cuurentId',  $_SESSION['userId'] , PDO::PARAM_STR);  
                                $stmt->execute(); 
                                $moneytransfer = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                
                               
                               // foreach($moneytransfer as $mpp)
                                      //  $amt += $mpp->amt; */    
							    
							?>
							 <tr class="odd gradeX">
							    
								<td> <a href="dPout.php?Tdate=<?php echo $lst?>">  Payout </a></td>    
								<td>   <?php echo  $amt ;?> </td>        
							</tr>  
							
						 
						</tbody>
					</table>
  				</div>
  			</div>



		  </div>
		</div>
    </div>

<?php  include ABS_PATH.'/admin/footer.php';	?>    