<?php
 session_start(); 

	if(!isset($_SESSION['tulsilogin']))
	{
		header('Location: index.php');
		return;
	}
	
	include("connect.php");
	date_default_timezone_set("Asia/Kolkata");
	$mdate= date('Y-m-d H:i:s');
	
	
	
	
	
	$umid=$_POST['umid'];
	$meetingrecordinglink=$_POST['meetingrecordinglink'];
	$meetingmid =$_POST['meetingmid'];
	$meetingremark =$_POST['meetingremark'];
	$meetingtime =$_POST['meetingtime'];
	
	
	 $eve2 = "update res_meeting_master set  meetingcloseddatetime='$mdate',meetingremark='$meetingremark',meetingtime='$meetingtime',  meetingrecordinglink='$meetingrecordinglink' where meetingmid=$meetingmid ";
	
	
	if ($conn->query($eve2) === TRUE)
	{
		$last_id = $conn->insert_id;
		
		
		foreach ($umid as $one_by_one_sid) 
			{
			
			
			$sql1="update res_meetingallocation_detail set muserstatus='Attended' where meetingmid=$meetingmid and umid=$one_by_one_sid";
			$re4 = mysqli_query($conn, $sql1);
			}
		
		$_SESSION['msg'] = "Record has been updated successfully";
	}
	else
	{
		$_SESSION['msg1'] = "Error";
	}
	
	
		header("Location: meeting.php");
	
?>	