<?php
	$queryNF=mysqli_query($conn,"select * from notification where Status='Active' ORDER BY id DESC");
	$dataNF=mysqli_fetch_array($queryNF);
?>

<?php
if (isset($_POST['ReadNF']))
{
	$query = mysqli_query($conn, "INSERT INTO notification_log(id, empid, Employee_Full_Name, StatusFrom)
	VALUES('".$_POST['id']."', '".$_POST['empid']."', '".$_POST['Employee_Full_Name']."','".$_POST['StatusFrom']."')");
	
	echo '<script>window.location.href="birthday.php";</script>'; exit;
	
	//echo "<pre>"; print_r($_POST); exit;
	/* if ($query == true) {
		echo '<script>window.location.href="birthday.php";</script>'; exit;
		}
	else {
		echo "Error: " . $query . "<br>" . mysqli_error($conn);
		} */
}
?>


<?php 
	echo'<div class="hotdeal-r">
		<div class="alert alert-warning alertr">
			<button type="button" class="naeemclosebtn" data-bs-dismiss="alert">&times;</button>
			<!--<b class="">'.$dataNF['NotificationTitle'].'</b>-->
			<img src="../assets/img/birthday1.gif" alt="icon" class="w-100">
			<!--<a href="birthday.php" type="submit" class="btn btn-primary btn-sm">Read More ...</a>-->
			
			<form action="" method="post" enctype="multipart/form-data">
				<input type="hidden" name="id" value="'.$dataNF['id'].'">
				<input type="hidden" name="empid" value="'.$fetch1['empid'].'">
				<input type="hidden" name="Employee_Full_Name" value="'.$fetch1['Employee_Full_Name'].'">
				<input type="hidden" name="StatusFrom" value="Read More Popup" >
				<button class="btn btn-primary btn-sm" type="submit" name="ReadNF">Click Here</button>
			</form>
		
		</div>
		</div>';
?>


