<?php
//DB Data
include '../../ASEngine/AS.php';
if(!$login->isLoggedIn())
    header("Location: ../../login.php");
$user = new ASUser(ASSession::get("user_id"));
$userInfo = $user->getInfo();

//basic include files
require_once("../../../db.php");

//variables
$email_id = $_GET['emailid'];
$email_status = $_GET['mailstatus'];

mysqli_query($conn, "UPDATE email_recipients SET active = '$email_status' WHERE id = '$email_id' ");

mysqli_close($conn);

header("Location: ../../mailerconfig.php?emailtemplatemsn=".$email_status."&tab=2");
?>