<?php
include('Inc/EnteteHTTP.php');
include('Inc/Classes/bo/page.php');
include('Inc/Classes/bo/connexion.php');
include("Inc/Classes/ihm/ihmentreprise.php");
session_start();
define('PAGE_TYPE',PG_TP_ENT);
define('PAGE_MODE',PG_MD_AFF);
$page=new Page('Entreprise');
$page->debut();

if ( isset($_SESSION[SESS_USER_ID]) ) {
  $idObj=$_GET['id'];
  $page->setMenu();
  $page->debutContenu();
  Connexion::openDB($mdb2);

  $obj = new Task($idObj);
  $rep=$obj->load($mdb2);
  if ($rep==-1) {
    printf(STR_REQ_SELECT_ECHEC);
  } else if ($rep>=0) {
    IHMEntreprise::show($mdb2,$obj);
  }
  
  Connexion::closeDB($mdb2);
  $page->finContenu();
} else {
  $page->accesInterdit();
}
$page->fin();
