View file public_html/logout.php

File size: 527B
<?
session_start();

if(!(isset($_SESSION["username"]) && isset($_SESSION["password"])))
{
	?>
	<script type="text/javascript">
	location.replace("login.php");
	</script>
	<noscript>
	<meta http-equiv="refresh" content="0; url=login.php">
	</noscript>
	<?
	exit();
}else{
	unset($_SESSION["username"]);
	unset($_SESSION["password"]);

	?>
	<script type="text/javascript">
	location.replace("index.php");
	</script>
	<noscript>
	<meta http-equiv="refresh" content="0; url=index.php">
	</noscript>
	<?
}