<?php 
  session_start();
  $hostname = getenv('HTTP_HOST');
  $root = 'http' . '://' . $_SERVER['HTTP_HOST'] . '/';
  DEFINE('BASE_URL', $root);     
    
  if (!isset($_SESSION['is_logged_in'])) {   
  	   session_destroy();  
       header("Location:index.php");
       die();     // just to make sure no scripts execute
  }

  
?>