include '../config.php';
//classes loading end
session_start();
if (isset($_SESSION['userMerlaTrav']) and $_SESSION['userMerlaTrav']->profil() == "admin") {
    //classes managers
    $idProjet = 0;
    $projetManager = new ProjetManager($pdo);
    $contratEmployeManager = new ContratEmployeManager($pdo);
    $contratDetaislManager = new ContratDetailsManager($pdo);
    $employesManager = new EmployeManager($pdo);
    if (isset($_GET['idContratEmploye']) and $_GET['idContratEmploye'] > 0 and $_GET['idContratEmploye'] <= $contratEmployeManager->getLastId()) {
        $idProjet = $_GET['idProjet'];
        $idContratEmploye = $_GET['idContratEmploye'];
        $projet = $projetManager->getProjetById($idProjet);
        $contratEmploye = $contratEmployeManager->getContratEmployeById($idContratEmploye);
        $contratDetails = $contratDetaislManager->getContratDetailsByIdContratEmploye($idContratEmploye);
        $totalPaye = $contratDetaislManager->getContratDetailsTotalByIdContratEmploye($idContratEmploye);
    }
    ob_start();
    ?>
<style type="text/css">
    p, h1, h3{
        text-align: center;
        text-decoration: underline;
    }
    table {
            border-collapse: collapse;
            width:100%;
        }
        
        table, th, td {