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


<?php 
include("../connection.php");
include("../user.php");
$user=$_SESSION['user'];
$cur_date=date('Y-m-d H:i:s');

?>

<?php

	
	$type=$_REQUEST['type'];
	$id=$_REQUEST['id'];
		$typ=mysqli_query($con,"UPDATE `type_master` SET `type`='$type',`status`='0',`modified_on`='$cur_date',`modified_by`='$user' WHERE `id`='$id'");
		//echo "UPDATE `type_master` SET `type`='$type',`status`='0',`modified_on`='$cur_date',`modified_by`='$user' WHERE `id`='$id'";
if($typ)
	{
	?>
	<script>
	
	
    setTimeout(function() {
        swal({
            title: "Successfully",
            text: "Department updated!",
            type: "success"
        }, function() {
      window.location = "type_master.php";
        });
    }, 100);
</script>  
    <?php
	}	
	else
	{
	?>
	<script>
    setTimeout(function() {
        swal({
            title: "Not",
            text: "Department updated!",
            type: "error"
        }, function() {
         window.location = "type_master.php";
        });
    }, 100);
</script> 	  
	<?Php
	}	
?>

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

