<?php 
session_start();

require_once($_SERVER['DOCUMENT_ROOT'] . "/sys/access.php");

// Set the login id into session.
$return = $access->SessionLoginId(1);

if(!$access->CheckLogin()){
  $access->RedirectToURL("/login/login.php");
  exit;
}
else
  print_r ('logged in');
?>

<!DOCTYPE html>
<html lang="en">

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Language" content="en-us">
  
  <title>Controls Demo</title>
  <link rel="icon" type="image/x-icon" href="/favicon.ico">

  <link rel="stylesheet" href="/ext/bootstrap/bootstrap.min.css">
  <link rel="stylesheet" href="/ext/bootstrap/bootstrap-theme.min.css">
  <link rel="stylesheet" href="/site/css/stickythead.css">
  <link rel="stylesheet" href="/site/css/bootstrap.css">
  <link rel="stylesheet" href="/site/css/multiselect.css">
  <link rel="stylesheet" href="/site/css/slider.css">
  <link rel="stylesheet" href="/site/css/style.css">

  <script src="/ext/jquery/jquery-3.1.1.min.js"></script>
  <script src="/ext/bootstrap/bootstrap.min.js"></script>
  <script src="/ext/jquery/jquery.stickytableheaders.min.js"></script>
  <script src="/site/js/main.js"></script>

</head>
<body>
<div class='container'>

<?php 
define("PUBLIC_ACCESS", 1);

// Location of class definitions
$docRoot = $_SERVER['DOCUMENT_ROOT'];
$toolkit = "$docRoot/toolkit";

// Class definitions for the menu generator 
require_once ("$docRoot/sys/panel.php");

//$_SESSION['projectworkday'] = 0; 
//$_SESSION['loginworkday'] = 0; 
//$_SESSION['workday'] = 0; 

$lo_id = (isset($_SESSION['login'])) ? $_SESSION['login'] : 0;

$menu = new MainMenu('homepage', $lo_id);
$afterMenu  = $menu->after();
echo $afterMenu

?>
    
</div>

</body>
</html>