<?php

  #  Author       :  Ted Koch
  #  Project      :  Troyce Manager Portal
  #  Filename     :  mymanager_settings.php
  #  Version      :  1.0

  #  Create date  :  16 november 2001
  #  Change date  :  21 october 2002

  #  Description  :  Incudes the manager variables.

#  ob_start("ob_gzhandler");
#  ob_start();

  session_start();
  include_once ("mymanager_settings_no_sessions.php");

  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  header("Cache-Control: no-store, no-cache, must-revalidate");
  header("Cache-Control: post-check=0, pre-check=0", false);
  header("Pragma: no-cache");
  
  if ($_SESSION['session_i3a_version']) {
		require_once ($abs_inc_path.strtolower($_SESSION['session_i3a_version'])."/class.authorisation_v1_0.php");
		require_once ($abs_inc_path.strtolower($_SESSION['session_i3a_version'])."/i3a_functions.php");
		require_once ($abs_inc_path."i3a_functions.php");
		$i3a_classname = "core_".$_SESSION['session_i3a_version'];
		$g_obj_i3a = new $i3a_classname();
  }

  # Redirect when the session variables are lost
  if (is_numeric(strpos(strToLower($SCRIPT_NAME), "/intra/")) && !$_SESSION["session_language_code"]) {
      # Sessions are lost
      die(Header("Location: /sessions_lost.htm"));
  }


  # Redirect during maintenance of the manager portal
  if($mymanager_not_available && stristr(strToLower($SCRIPT_NAME),"/intra/") && !stristr(strToLower($SCRIPT_NAME),"logout.php") && !stristr(strToLower($SCRIPT_NAME),"content_button.php")  && !stristr(strToLower($SCRIPT_NAME),"menu_button.php")){
      # User id lost
      die(Header("Location: /intra/logout.php"));
  }

?>