
<link rel="stylesheet" href="../css/sweet-alert.css" /> 


<?php 
include("../connection.php");
include("../user.php");
$user=$_SESSION['user'];

	$name=$_REQUEST['name'];
	$pswd=$_REQUEST['pswd'];
	$host=$_REQUEST['host'];
	$smtp=$_REQUEST['smtp'];
	$port=$_REQUEST['port'];
	$ishtml=$_REQUEST['ishtml'];
	$id=$_REQUEST['id'];
	
$mail_masters=mysqli_query($con,"UPDATE mail_config set username='$name',password='$pswd',host='$host',smtpsecure='$smtp',port='$port',ishtml='$ishtml',status='0' where id='$id'");
		
	
if($mail_masters)
	{
	?>
	<script>
	
	
    setTimeout(function() {
        swal({
            title: "Successfully",
            text: "completed!",
            type: "success"
        }, function() {
         window.location = "mail_master.php";
        });
    }, 100);
</script>  
    <?php
	}	
	else
	{
	?>
	<script>
    setTimeout(function() {
        swal({
            title: "Not",
            text: "completed!",
            type: "error"
        }, function() {
          window.location = "mail_master.php";
        });
    }, 100);
</script> 	  
	<?Php
	}	

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