<?php

session_start();
$dircheck = substr($_SERVER["REQUEST_URI"], 0, strrpos($_SERVER["REQUEST_URI"], "/"));
$dircheck2 = substr($dircheck, 1);
$valid = $_GET["sair"] . substr($dircheck, 1);
$_SESSION[$dircheck2] = NULL;
$_SESSION[$valid] = NULL;
unset($_SESSION[$dircheck2]);
unset($_SESSION[$valid]);
header("location:index.php");
?>