<?php 
session_start();
include '../db.php';
error_reporting(0);
include("../all_query.php");



 if(isset($_SESSION['loan_crm_username']) && isset($_SESSION['loan_crm_password']))
{
	
	
	     $caller_id = $_SESSION['loan_crm_username'];
	
	 
     $newCDRQ = mysqli_query($conn,"select *from `call_reponse`  where caller_id = '$caller_id' and  is_read = '0'    ");
	  
	 while($cdrData = mysqli_fetch_assoc($newCDRQ))
	 {
		 
		 $cdr_id = $cdrData['id'];
		 
		 
		 
		 
		 ?>
		 
		 <h5>Call Disconnected - <?php echo $cdrData['uniqueid']; ?></h5>
		 
		 <table class="table table-bordered">
		 <thead>
		 <tr>
		  
		 <th>Name</th>
		 <th>Mobile</th>
		 <th>CDR Status</th>
		 </tr>
		  </thead>
		  
		  <tbody>
		 <tr>
 
		 <td><?php echo $cdrData['customer_name']; ?></td>
		 <td><?php echo $cdrData['customer_mobile']; ?></td>
 		 <td><?php echo $cdrData['call_status']; ?></td>
		 </tr>
		 </tbody>
		 
		 </table>
		 
		 
		 <?php
		 
		 
		 
		 
		 
		 
		 
		 
		 
		 mysqli_query($conn,"update `call_reponse` set is_read = '1' where id  = $cdr_id ");
 
		 
	 }
	
	
	
	
	
	
	
 }
	
	
	?>