<?php
    require ("../connection.php");
    require ("../user.php");
?>
<link rel="stylesheet" href="../css/sweet-alert.css" /> 
<?php
    $user=$_SESSION['user'];
    $cur_date=date("Y-m-d h:i:s");
    $user_id=$_REQUEST['user_id'];
    $sql=mysqli_query($con,"update branch_master set status='0' where id='$user_id'");
    if($sql)
	{
	?>
<script>
    setTimeout(function() {
        swal({
            title: "Successfully",
            text: "Branch is Activated!",
            type: "success"
        }, function() {
           window.location = "branch_master_view.php";
        });
    }, 100);
</script>  
    <?php
	}	
	else
	{
	?>
<script>
    setTimeout(function() {
        swal({
            title: "Not",
            text: "Branch is Activate!",
            type: "error"
        }, function() {
          window.location = "branch_master_view.php";
        });
    }, 100);
</script> 	  
	<?Php
	}	
?>
<script src="../js/sweet-alert.js"></script>