<?php

include '../db_connect.php';

$id = $_POST['id'];
$key = $_POST['key'];

$security_key = decrypData($key);


if ( $security_key== 'Jobayer121415'){

        $con = dbConnect(); 

		$sql = "DELETE FROM notification_table WHERE id = '$id'";
		$result = mysqli_query($con, $sql);
		
		 
        if ($result) {
            echo "Successfully";
        } else {
            echo "Query Error";
        }

}

//===================================================================

function decrypData ($text){
      
	$encoded = $text;
	$decoded = base64_decode($encoded);
    $decrypted = openssl_decrypt($decoded, 'AES-128-ECB', '0175526800812345', OPENSSL_RAW_DATA);
    return $decrypted;
	
}

?>