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

 if(isset($_SESSION['loan_crm_username']) && isset($_SESSION['loan_crm_password']))
{
	
	
	
	 
	 $delete_type = $_GET['delete_type'];
	 $message_id = $_GET['message_id'];
	 
	 if($delete_type == 'delete_for_me')
	 {
	 mysqli_query($conn,"update `messages` set delete_for_lead_owner = 1  where  id = $message_id ");
	 }
	 
	 if($delete_type == 'delete_for_everyone')
	 {
		 
		 mysqli_query($conn,"update `messages` set delete_for_everyone = 1  where  id = $message_id ");
      
	  }
	
	
	
	
	
 }
 
 ?>