<?php 
	if(!isset($_SESSION))
		session_start();
	if (!isset($_SESSION['usuarioLogin']) || $_SESSION['usuarioLogin'] == ""){
		session_unset();
		session_destroy();
		header("Location: login.php");
		exit();
	}
?>
<?php
	require_once('../../Connections/catalogo.php');
	if (isset($_GET['idUsuario']) && $_GET['idUsuario'] != ''){
		$query = "DELETE FROM usuarios WHERE id = " . $_GET['idUsuario'];
		$mysqli->query($query);
	}
	
	$urlReferer = $_SERVER['HTTP_REFERER'];
	header("Location: " . $urlReferer);
	exit();
?>