<?php 
include("../connection.php");
include("../user.php");
$user=$_SESSION['user'];
?>
<link rel="stylesheet" href="../css/sweet-alert.css" /> 
<?php

    $id=$_REQUEST['id'];
    $description=$_REQUEST['description'];
	$outgoingto=$_REQUEST['outgoingto'];
	$location=$_REQUEST['location'];
	$make=$_REQUEST['make'];
	$serialno=$_REQUEST['serialno'];
	$model=$_REQUEST['model'];
	$capacity=$_REQUEST['capacity'];
	$equipment_id=$_REQUEST['equipment_id'];
	$maintenance=$_REQUEST['maintenance'];
	$value=$_REQUEST['asset_value'];
	$asset_master=mysqli_query($con,"UPDATE `asset_master` SET `maintenance`='$maintenance',`description`='$description',`outgoingto`='$outgoingto',`location`='$location',`make`='$make',`serialno`='$serialno',`model`='$model',`capacity`='$capacity',`equipment_id`='$equipment_id',`value` = '$value',`status`='0' WHERE `id`='$id'");
	
	
	
if($asset_master)
	{
	?>
	<script>
	
	
    setTimeout(function() {
        swal({
            title: "Successfully",
            text: "Asset Updated!",
            type: "success"
        }, function() {
         window.location = "asset_master.php";
        });
    }, 100);
</script>  
    <?php
	}	
	else
	{
	?>
	<script>
    setTimeout(function() {
        swal({
            title: "Not",
            text: "Asset is not Updated!",
            type: "error"
        }, function() {
        window.location = "asset_master.php";
        });
    }, 100);
</script> 	  
	<?Php
	}	
?>

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

