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

<script>
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>Failed  Request List   </h3></div>
					
					<div align="right">  
					    <a   class="btn btn-warning"  value="Update User List" href="../wallet/neftpaidUser.php" />
					            NEFT Paid Users
					    </a>
					</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>User Id</th> 
								<th>Name</th>   
								<th>Pin</th>  
								<th>Amount</th>  
								<th>Type</th>  
								<th>Acc Holder</th>  
								<th>Account No</th>  
								<th>IFSC</th>  
								<th>Date</th>
								<th>UTR</th>
								<th>Status</th>
								<th>Action</th>
								<th>Pay</th>
								<th>Reject</th>
								 
							</tr>
						</thead>
						<tbody>
							<?php 
                                    $stmt=$conn->prepare("select  * from   UI__TxnFailUsers  where  impnft=0 and status!=1 order by id desc ");  
                                    //$stmt->bindValue(':Ttime', $InTime , PDO::PARAM_STR);
                                    $stmt->execute(); 
                                    $AllUsers = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                    $sr = 1; 
                                 
								  foreach($AllUsers as $users)
								  {   
							   
                                    $stmt=$conn->prepare("select  * from   UI__Rgst where cuurentId=:custId ");  
                                    $stmt->bindValue(':custId', $users->custId , PDO::PARAM_STR);
                                    $stmt->execute();   
                                    $userName = $stmt->fetch(PDO::FETCH_OBJ); 
                                    
                                     if($users->status==0) 
                                    {

							?>
							<tr class="odd gradeX"  <?php if($users->response!='') { ?>style="color:red;" <?php } ?>>
								<td><?php echo $sr++;?> </td>
								<td><?php echo $users->custId;?></td>
								<td><?php echo $userName->nm;?></td> 
								<td><?php echo $userName->UserPin;?></td>
								<td><?php echo  $users->amt ;?>  </td> 
								<td><?php   if($users->type==1) echo "Bank Tranfer";  ?>  </td> 
								<td><?php   echo $users->holder;  ?>  </td> 
								<td><?php   echo $users->accno;  ?>  </td> 
								<td><?php   echo $users->ifsc;  ?>  </td> 
								<td><?php echo $users->Tdate;?></td>
								<td><?php   echo $users->UTR;  ?>  </td> 
								<td><?php   if($users->status==1) echo "Paid"; else echo "Unpaid";  ?>  </td> 
								<td> <?php   if($users->status==0)  {?><a href="UsdtxnFaildedit.php?FailedUpdate=<?php echo $users->id;?>">Update</a>  
								
								
                                            <?php 
                                            if($users->response!='')
                                            {
                                                $ghp = json_decode($users->response);
                                                echo $ghp->message;
                                            } 
                                    ?>
								<?php   } ?> </td> 
								 
								 <td>
								    <?php   if($users->status!=1) { ?>  
								        <a href="../wallet/customPay.php?PyId=<?php echo $users->id;?>">Pay</a> 
								    <?php }?> 
								    </td>     
							    <td>  
                                        <?php   if($users->status!=1) { ?>  
                                        <a href="../wallet/rejectImps.php?PyId=<?php echo $users->id;?>&serKy=jspdfpofnpprimv00nF">Reject</a>
                                        <?php }?> 
								 </td>     
							</tr>  
							<?php  
                                    } 
								  }
							?>
						</tbody>
					</table>
  				</div>
  			</div>



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

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