<?php

session_start();

require_once "../env.inc.php";
require_once "../access.inc.php";
require_once "../conf.inc.php";
require_once DIR_PHP_LAYOUTS . "header.php";

if($_SERVER['HTTP_HOST'] == DOMAIN_EVENTS){
    if(session::isConnect("salarie")) {
        header("Location: /home.php");
        exit();
    } else {
        define("TITLE", "CSE Invent : Identification");
        get::page("login");
    }
} elseif ($_SERVER['HTTP_HOST'] == DOMAIN_CONTROL) {
    if(session::isConnect()) {
        header("Location: /home.php");
        exit();
    } else {
        define("TITLE", "CSE Invent : Contrôleur Identification");
        get::page("login");
    }
}
