<?php

	if (!defined('IN_HUGLO')) {
		exit;
	}

	session_start();

	if(isset($_GET['logout']) and $_GET['logout'] == 'logout') {
		$_SESSION = array();
		session_destroy();
	}

	if(!eregi('index.php', $_SERVER['PHP_SELF']) and ((!isset($_SESSION['users_id']) or empty($_SESSION['users_id'])) or (!isset($_SESSION['users_login']) or empty($_SESSION['users_login'])))) {
		header('Location: index.php');
		exit;
	}

?>