<?php 	
    include_once('../../config.php');   	
    include_once(ABS_PATH.'/admin/login_check.php');    
    include ABS_PATH.'/admin/header.php';    
     $result =  mysql_query("select *  from biddings where  optionType = 25  order by id DESC") ;      
?>  

<script>
function PaidAmt(val)
{

	var r = confirm("Do you really want to update record !");
	if (r == true) {    
	$.ajax({
	type: 'POST',
	url: "../ajax/default.php",
	//async: false,			 
	data: {PaidAmount: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>Withdraw Request Details  </h3></div>
					
					<div align="right">  <input type="button"    class="btn btn-warning" name="btnback" id="btnback" value="Export" onClick="javascript:location.href='#';" />
					 <input type="button"    class="btn btn-warning" name="btnback" id="btnback" value="Add Withdraw" onClick="javascript:location.href='addWithdraw.php';" />
					</div>
					
			 		
				</div>
				
  				<div class="panel-body">
  					<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
						<thead>
							<tr>
								<th>Sr</th>
								<th>Name </th>
								<th>Mobile </th>
								<th>Points</th>
								<th>Date</th> 
								<th>Status</th>  
							</tr>
						</thead>
						<tbody>
							<?php   
								  $sr=1; 
								  while($row = mysql_fetch_object($result))
								  {      
								      
								      $WithD = mysql_fetch_object(mysql_query("select name,mobile from  players where custId = '$row->custId' "));
								     
							?>
							<tr class="odd gradeX"  >
								<td><?php echo $sr++;?> </td>
								<td><?php echo $WithD->name;   ?> </td>
								<td><?php echo $WithD->mobile;   ?> </td>
								<td><?php echo $row->Points;?>  </td>
								<td>
								<?php   
								        echo $row->Gdate;
								?> 
								</td>
								<td><?php if($row->wonFor==1) echo "<span style=color:green;'>Paid</span>"; else { ?> <a  style="color:red;" href="javascript:void(0);" onclick="PaidAmt(<?php echo $row->id;?>)">Pending</a><?php } ?>  </td> 
							</tr>  
							<?php } ?>
						</tbody>
					</table>
  				</div>
  			</div>



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

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