<?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");
    $id=$_REQUEST['id'];
    $sql=mysqli_query($con,"update category_master set status='0' where id='$id'");
    if($sql)
	{
	?>
<script>
    setTimeout(function() {
        swal({
            title: "Successfully",
            text: "Category is Activated!",
            type: "success"
        }, function() {
           window.location = "category_master.php";
        });
    }, 100);
</script>  
    <?php
	}	
	else
	{
	?>
<script>
    setTimeout(function() {
        swal({
            title: "Not",
            text: "Category is Activate!",
            type: "error"
        }, function() {
          window.location = "category_master.php";
        });
    }, 100);
</script> 	  
	<?Php
	}	
?>	
<script src="../js/sweet-alert.js"></script>