<link rel="stylesheet" href="../css/sweet-alert.css" /> 
<?php
require ("../connection.php");
require ("../user.php");
$user=$_SESSION['user'];
$cur_date=date("Y-m-d h:i:s");

$id=$_REQUEST['id'];

$up_sql=mysqli_query($con,"update mail_config set status='1'");

$sql=mysqli_query($con,"update mail_config set status='0' where id='$id'");

if($sql)
	{
	?>
	<script>
	
	
    setTimeout(function() {
        swal({
            title: "Successfully",
            text: "Mail is Activated!",
            type: "success"
        }, function() {
           window.location = "mail_master.php";
        });
    }, 100);
</script>  
    <?php
	}	
	else
	{
	?>
	<script>
    setTimeout(function() {
        swal({
            title: "Not",
            text: "Mail is Activate!",
            type: "error"
        }, function() {
          window.location = "mail_master.php";
        });
    }, 100);
</script> 	  
	<?Php
	}	
?>
</html>

		
  <script src="../js/sweet-alert.js"></script>