<?php
include("common/connection.php");
//login_check();
$Lead_Req_Id=base64_decode($_REQUEST['Lid']);

?>

<!doctype html>
<html class="no-js" lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Current Leads | KPS Institute of Polytechnic</title>
    <?php include("headerlink.php"); ?> 
     <link rel="stylesheet" href="css/form/all-type-forms.css">
 
</head>

<body style="background-color:#e7eff9">




					<div align="center" class="sparkline9-hd" style="background-color:#f9f9f9; padding:10px 0">
                    		<div class="main-sparkline9-hd">
                            		<h1>COMMUNICATION ACTIVITY</h1>
                               </div></div>



   								 <div class="heide_1">
                                 <p style="text-align:center;color:#000000"></p>
                                 </div>
    
 
                                     
                                     
                                <div class="main-sparkline9-hd" style=" padding-top:25px;padding-right:10px; background-color:#e7eff9; padding-left:10px; padding-bottom:25px">
                                     
                              	 <?php
								 $communicated_sql="select * from communication_master where Lead_ID='".$Lead_Req_Id."' order by Date_Of_Communication desc";
								 $communicated_query=mysqli_query($con,$communicated_sql);
								 if(mysqli_num_rows($communicated_query)>0)
								 {
								 while($communicate=mysqli_fetch_array($communicated_query))
								 {
									 if($communicate['Communication_Type']=='Call')
									 {
									  $icon="fa fa-phone";
									  $title='CALL';
									 }
									 else if($communicate['Communication_Type']=='Email')
									 {
									  $icon="fa fa-envelope icon_fix_1";
									  $title='EMAIL';
									 }
									 else if($communicate['Communication_Type']=='Whatsapp')
									 {
									  $icon="fa fa-whatsapp";
									  $title='WHATSAPP';
									 }
									  else if($communicate['Communication_Type']=='Sms')
									 {
									  $icon="fa fa-comments";
									  $title='SMS';
									 }
								 ?>
                                 
                                 <div class="single-review-st-text">
                                       
                               		 <div class="social-media-in side_icon" style="padding-top:10px; margin-right:15px">
                                    <a href="#"  style="height:32px; width:32px">
                                     <i class="<?php echo $icon; ?>" style="font-size:20px; line-height:32px" title="<?php echo $title; ?>" data-toggle="tooltip"></i>
                                    </a> 
                                 </div>
                                
                                
                               		 <div class="review-ctn-hf"  style="margin-left:0; background-color:#FFFFFF;
                                border-radius:18px; padding:15px; width:290px">
                                    <P>
                                    <i class="fa fa-clock-o" aria-hidden="true" style="font-size:16px; margin-right:2px"></i>
                                    <span style="color:rgba(0,0,0,0.65)"><?php echo date('M d,Y h:i a',strtotime($communicate['Date_Of_Communication'])); ?></span></p>
                                    
                                    <P><strong>Called By : </strong><?php echo ucwords(strtolower($communicate['Communicator_ID'])); ?></p>
                                    
                                    <P><strong>Status : </strong><?php echo $communicate['Status']; ?></p>
                                    <?php if($communicate['Status']=='Call Later')
										{
										?>
										<P><strong>Next Callback Date : </strong><?php echo date('M d,Y',strtotime($communicate['Next_Callback_Date'])); ?></p>
                                        <P><strong>Next Callback Time : </strong><?php echo $communicate['Next_Callback_Time']; ?></p>
										<?php
										}
									?>
                                    <?php 
									if($communicate['Communication_Type']=='Call')
									{
										$sub_msg='Response';
										if($communicate['Response']=='')
											{ $msg="No Response";}
										else
										{ $msg=$communicate['Response'];}									
									}
									else
									{
										$sub_msg='Content';
										if($communicate['Content']=='')
										{ $msg="No Content";}
										else
										{ $msg=$communicate['Content'];}
									} 
									?>
                                    <div align="justify" class="heide_1" ><strong><?php echo $sub_msg; ?> : </strong><span  style="color:rgba(0,0,0,.6)">
                                   <?php echo $msg; ?> </span></div>
                                                                                                                                               
                                </div>
                                                               
                                 </div>
                                 <?php
								 }
								 }
								 else
								 {
								 ?> 
                                 
                                 
                                 <div class="single-review-st-text">
                                       
                               		  
                                
                                
                               		 <div class="review-ctn-hf" style="margin-left:0; background-color:#FFFFFF;
                                border-radius:18px; padding:15px; width:100%">
                         
                                    
                                                                       
                                    <p><strong style="color:#EF2C2C;"><center>NOT COMMUNICATED YET </center></strong></p>
                                                                                                             
                                                                                                                                               
                                </div>
                                                               
                                 </div>
                                 
                                <?php
								}
								?>
                            	</div>
                                
                                
                                
                  
                     
             

     <!-- jquery
		============================================ -->
     
       <script src="js/vendor/jquery-1.12.4.min.js"></script>
    <!-- bootstrap JS
		============================================ -->
    <script src="js/bootstrap.min.js"></script>
    <!-- wow JS
		============================================ -->
    <script src="js/wow.min.js"></script>
    <!-- price-slider JS
		============================================ -->
    <script src="js/jquery-price-slider.js"></script>
    <!-- meanmenu JS
		============================================ -->
    <script src="js/jquery.meanmenu.js"></script>
    <!-- owl.carousel JS
		============================================ -->
    <script src="js/owl.carousel.min.js"></script>
    <!-- sticky JS
		============================================ -->
    <script src="js/jquery.sticky.js"></script>
    <!-- scrollUp JS
		============================================ -->
    <script src="js/jquery.scrollUp.min.js"></script>
    
    <script src="js/scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="js/scrollbar/mCustomScrollbar-active.js"></script>

      <!-- datepicker JS
		============================================ -->
    <script src="js/datepicker/jquery-ui.min.js"></script>
    <script src="js/datepicker/datepicker-active.js"></script>
    
    
    
    <!-- mCustomScrollbar JS
		============================================ -->
    <script src="js/scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="js/scrollbar/mCustomScrollbar-active.js"></script>
    <!-- metisMenu JS
		============================================ -->
    <script src="js/metisMenu/metisMenu.min.js"></script>
    <script src="js/metisMenu/metisMenu-active.js"></script>
    <!-- peity JS
		============================================ -->
    <script src="js/peity/jquery.peity.min.js"></script>
    <script src="js/peity/peity-active.js"></script>
    <!-- sparkline JS
		============================================ -->
    <script src="js/sparkline/jquery.sparkline.min.js"></script>
    <script src="js/sparkline/sparkline-active.js"></script>
    <!-- tab JS
		============================================ -->
    <script src="js/tab.js"></script>
    <!-- plugins JS
		============================================ -->
    <script src="js/plugins.js"></script>
    <!-- main JS
		============================================ -->
    <script src="js/main.js"></script>
    <!-- tawk chat JS
		============================================ -->
    <script src="js/tawk-chat.js"></script>
   <!-- form validate JS
		============================================ -->
    <script src="js/form-validation/jquery.form.min.js"></script>
    <script src="js/form-validation/jquery.validate.min.js"></script>
    <script src="js/form-validation/form-active.js"></script>
    
    
 <script>
$(document).ready(function() {
   $("body").tooltip({ 
   	selector: '[data-toggle=tooltip]' 
	 });
});
 
</script>   
     
    
</body>

</html>