<?PHP
 $txnid= $_GET['txnId'];




	session_start();
$privilage = $_SESSION['privilage'];

if (!(isset($_SESSION['login']) && $_SESSION['login'] != '')) {
	header ("Location: ../login.php");
}

else if($privilage == "Priviledge" or $privilage == "Sales Rep" or $privilage == "Sales Rep" or $privilage == "Receptionist" or $privilage == "Inventory Manager" or $privilage == "Secetary"/*or $privilage == "Manager"*/)
{
	
	header ("Location: not_authorized.php");
	
}

?>







	<html>
		
			<title>Delete</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->	
		 <link href="css/bootstrap-4.4.1.css" rel="stylesheet">
		
		
		
	<head>



	</head>
		
		<style>
		
		
				.loader {
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid blue;
  border-right: 16px solid green;
  border-bottom: 16px solid red;
  border-left: 16px solid pink;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 1s linear infinite;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
		
		</style>
		
		
		
		
		
	<body onLoad="spinner()">


		

			
	<div class="jumbotron" style="text-align: center">
		
		
		<h3><b><span style="color: #EC0408">Are you sure you want to REVERSE this transaction?</b></h3>
		</span> <br> Transaction ID<?php echo $txnid;?>
		
		
		
			<table style="margin: auto;width: 100%" >
					
		
	<tr>
				<td>
				
		 				<a href="dashboard.php"><input type="submit" value="NO" class="btn btn-danger" style= "width:100%; height: 70px" name = "NO" onClick="spinner()"></a>
					
				</td>
					
				<td>
					
		 			<a href="delete.php?txnId=<?php echo $txnid?>">	<input type="button"  value="YES" class="btn btn-danger" style= "width:100%; height: 70px" onClick="spinner()" > </a>
				</td>
	
	</tr>

			
			</table>
	
		
			</div>
			
			<div class="loader" id="spin" style="margin: auto"></div>
	

	</body>
	</html>


<script>


		function spinner() {
  
			var x = document.getElementById("spin");
	
	
	
  if (x.style.display === "none") {
    x.style.display = "block ";
	  
	  
  }
	else {
    x.style.display = "none";
  }
	
	
}
	
		



</script>