<?php   
	include_once("../view/header-footer/header.php");  
?>  
  
  
  
   <!-- Features -->
   <div class="innerDeader">
      <div class="container">
          <a href="javascript:void(0);" id="go-back" class="goBack PaySound">
           <img src="<?php echo ROOTPATH;?>/images/Arrow 1.svg" alt="back">
       </a>
          <h4>P2P Request </h4>
     </div>    
   </div>
   <div class="innerBody">
       <div class="container">
         <di class="tableBox">
            <table>
                
                <tr>
                        <th   style="width:auto">S No.</th>
                        
                        <th   style="width:auto">By</th>  
                        
                        <th   style="width:auto">To</th>  
                        
                        <th   style="width:auto">Amount</th>  
                        
                        <th   style="width:auto">Date</th>  
                        
                        <th   style="width:auto">STATUS</th> 
                        
                        <th   style="width:auto">UTR</th> 
                        
                        <th   style="width:auto">Acc/UPI</th> 
                        
                        
                  
                        
                </tr>  
                
                    <?php 
                                $sr = 1;
                                foreach($Result as $dmm) 
                                {         
                                    $stmt=$conn->prepare("select  nm from  UI__Rgst  where cuurentId=:cuurentId");   
                                    $stmt->bindValue(':cuurentId',   $dmm->custId, PDO::PARAM_STR);  
                                    $stmt->execute();  
                                    $Result1 = $stmt->fetch(PDO::FETCH_OBJ);  
                                    
                                    
                                    $stmt=$conn->prepare("select  nm  from  UI__Rgst  where cuurentId=:cuurentId");   
                                    $stmt->bindValue(':cuurentId',   $dmm->ToCust, PDO::PARAM_STR);  
                                    $stmt->execute();  
                                    $Result2 = $stmt->fetch(PDO::FETCH_OBJ);  
                                    
                                ?>   
                     <tr>
                                <td><?php echo $sr++;?></td>
                                <td><?php echo $Result1->nm;?> </td>
                                <td><?php echo $Result2->nm;?></td>  
                                <td>&#8377;<?php echo $dmm->amt;?></td>    
                                <td><?php echo $dmm->Tdate;?></td>   
                                <td>
                                        <?php  
                                                if($dmm->status==1) 
                                                {
                                                    if($dmm->AccRej==1) 
                                                        echo "Accepted";
                                                    else
                                                        echo "Rejected";
                                                }else
                                                    echo "Pending";   
                                            ?> 
                                </td>     
                                    
                                <td> <?php echo $dmm->utr;?> </td>    
                                <td> <a href="viewp2pDetails.php?id=<?php echo $dmm->id?>&optType=<?php echo $dmm->optType?>&TrId=<?php echo $dmm->TrId?>"> View</a> </td>     
						    	</tr>
                    <?php                
                                } 
                               
                	?>  
              </table>
         </div>
       </div>
   </div>
     
</div>
 
<?php 
  include_once("../view/header-footer/footer.php");  
    unset($_SESSION['TpMsg']);