<?php

require_once realpath(dirname(__FILE__)).'../../config.php';
require_once '../classes/NE_Lib.php';

if( (defined('SESSION_NAME') && SESSION_NAME == 'CLIENTEXEC') || (!defined('SESSION_NAME')) ) {
    $sessionDirName = realpath(dirname(__FILE__)."/../../");
    //TODO4.2 use different sessions for admin and public to allow users to log into both without overwriting session
    session_name(md5($sessionDirName));
    //session_name(NE_Lib::getSessionPre().md5($sessionDirName));
} else {
    //TODO4.2 use different sessions for admin and public to allow users to log into both without overwriting session
    //session_name(NE_Lib::getSessionPre().SESSION_NAME);
    session_name(SESSION_NAME);
}

//session_name(defined('SESSION_NAME')? SESSION_NAME : 'CLIENTEXEC');

session_start();

if (!isset($_SESSION['groupId']) || $_SESSION['groupId'] != 2) die('Information only viewable by logged-in administrators.');

phpinfo();

?>
