<?
    require_once('../control/include/user.php');
	require_once('../control/include/mysql.php');
	require_once('../control/include/functions.php');
	require_once('../control/include/fb.php');
	
	ob_start();
	session_start();
	
	// SETUP MYSQL HANDLERS
	$mysqldb1 = new mysql($host, $user, $pswd, $db); $mysqldb1->connect(); $mysqldb1->select();
	
	$query = "DELETE FROM contact_category_link WHERE contact_category_id=".decrypt(urldecode($_GET['contact_category_id']), $domain)." AND contact_id=".decrypt(urldecode($_GET['contact_id']), $domain);
    fb($query);
	$unsubscribed = $mysqldb1->query($query);
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow, noarchive">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Unsubscribe</title>
</head>
<body>
    <h2>Unsubscribe</h2>
    <p>Thank you for subscribing to our newsletter in the past. We value your support.</p>
    <? if ($unsubscribed) { ?>
    <h3>You have been unsubscribed from our newsletter.</h3>
    <? } else { ?>
    <h3>An error has occurred. You have not been unsubscribed from our newsletter.</h3>
    <? } ?>
    
</body>
</html>