<?php
	require("settings.php");
	require_once("helper.php");

	session_start();
	html_start("Logout");

	if(isset($_SESSION["user"])) {
		$user = $_SESSION["user"];
		if(session_destroy()) {
			echo "Bye bye $user<BR><BR>\n";
			echo "You logged out successfull.<BR><BR>\n";
			echo "<A href=\"index.php\">Return to front page</A>";
		}else{
			echo "Something went really wrong!<BR><BR>\n";
			echo "Please close this window of your browser.";
		}
	} else {
		echo "Something went really wrong!<BR><BR>\n";
		echo "Please close this window of your browser.";
	}
?>
 </BODY>
</HTML>
