<?php
	session_start();
	if($_SESSION['unohs'] == null){
		header("location:index.php?msg=unauthorized");
	}
?>
<?php
	include ("conn.php");
?>
<?php include 'header.php'; ?>

      <div class="main-panel">
        <div class="content-wrapper">
          <div class="row">
            <div class="col-sm-12 mb-4 mb-xl-0">
              <h4 class="font-weight-bold text-dark">Manage Withdraw</h4>
            </div>
          </div> 		  		  		  			
		  <div class="row">
            <div class="col-sm-12">
				<form id="formID" name="formID" method="post" action="#" enctype="multipart/form-data">
					<table id="example1" class="table table-bordered table-striped">
						<thead>
							<tr>
								<th>Sr.No</th>
								<th>User Mobile</th>
								<th>Amount</th>
								<th>Payout Type</th>
                              	<th>Order ID</th>
								<th>Req. Date</th>
								<th>Action</th>
							</tr>
						</thead>
						<tbody>
						<?php
							$Query=mysqli_query($conn,"select *,(select `mobile` from `shonu_subjects` where `id`=`hintegedukolli`.`balakedara`)as user 
							from `hintegedukolli` where `sthiti`='0' order by shonu desc");
							$i=0;
							$total=0; 
							while($row=mysqli_fetch_array($Query)){
								$i++;
								$total+=$row['motta'];
						?>  
								<tr>
									<td><?php echo $i; ?></td>
									<td><?php echo $row["user"]; ?></td>
									<td><?php echo number_format($row['motta'],2);?></td>
									<td><?php echo 'bank'; ?></td>
                                  	<td><?php echo $row["dharavahi"]; ?></td>
									<td><?php echo date('d-m-Y', strtotime($row['dinankavannuracisi']));?></td>
									<td><a href="withdrawal-accept-reject.php?id=<?php echo $row['shonu']; ?>" data-toggle="tooltip" title="Accept/Reject"><i class="fa fa-eye" style="font-size:20px;"></i></a></td>
								</tr>
						<?php 
							}
						?>
					   
						</tbody>
					</table>
				</form>			  			  
            </div>			
          </div>		  
		</div>
	<!--	<footer class="footer">
			<div class="d-sm-flex justify-content-center justify-content-sm-between">
				<span class="text-muted d-block text-center text-sm-left d-sm-inline-block">Copyright © 51gameplay.online 2024</span>
			</div>
		</footer> -->
      </div>     
    </div>
  </div>  

  <script>
	$(function () {
		$('#example1').DataTable({
		  "paging": true,
		  "lengthChange": false,
		  "searching": true,
		  "ordering": false,
		  "info": true,
		  "autoWidth": true,
		  "pageLength": 100
		});
	});
  </script>
</body>

</html>