<?php
session_start();
if(phpversion()>=8.0) {
	require_once '../mpdf8/autoload.php';
}
else {
	require_once '../mpdf/autoload.php';
}

if($_SESSION['eval_pdf']=="eleve") { 
	$orientation = 'P'; 
}
else { $orientation = 'L'; }

$mpdf = new \Mpdf\Mpdf([
	'orientation' => $orientation,
	'setAutoTopMargin' => 'pad'
]);

$html = '<style>
body {font-family: sans-serif;
	font-size: 10pt;
}
h1 {
	font-size:13pt;
}
.eval {
	display:block;
	overflow:auto;
	min-width:1000px;
}
.evalele_left {
	display:inline-block;
	width:430px;
	margin-top:100px;
	vertical-align:top;
	float:left;
}
.evalele_right {
	display:inline-block;
	width:430px;
	margin-top:70px;
	vertical-align:top;
	float:right;
}
.eval_thead {
	width: 3000px;
	/*display: block;*/
	/*overflow: auto;*/
	/*overflow : -moz-scrollbars-horizontal;*/
}
.eval_tbody {
	display: block;
	height: 400px;
	overflow-y: auto;
	/*overflow-x:display;*/
	width: 2500px;
	text-align:left;
}
.eval_tbody_past {
	height:auto;
}
.eval_th {
	min-width:350px;
	max-width:350px;
	background-color:#F2EFFB;
	text-align:left;
}
.eval_th_ele {
	border:0;
}
.eval_sav {
	min-width:350px;
	max-width:350px;
	text-align:left;
}
.elechrome {
	/*Safari et chrome */
	-webkit-transform: rotate(-180deg);
	-webkit-writing-mode: vertical-rl;
	border:0;
	height:200px;
}
.eleve {
	text-rotate:90;
    /* pour tous */
    padding: 3px 1px 5px 15px;
	border: 1px grey solid;
	min-width:52px; /*-6*/
	max-width:52px;
	z-index:5;
}
.evalc {
	min-width:58px;
	max-width:58px;
}
table {
	border-collapse:collapse;
}
table.evalt, thead.evalt, th.evalt, tbody.evalt {
	border:1px solid black;
}
td.evaltd {
	border:1px solid black;
	text-align:center;
	width:20px;
}
td.evalniv0, option.evalniv0, span.evalniv0 {
	background-color:#eee;
	color:#eee;
}
td.evalniv1, option.evalniv1, span.evalniv1 {
	background-color:red;
	color:red;
}
td.evalniv2, option.evalniv2, span.evalniv2 {
	background-color:orange;
	color:orange;
}
td.evalniv3, option.evalniv3, span.evalniv3 {
	background-color:yellow;
	color:yellow;
}
td.evalniv4, option.evalniv4, span.evalniv4 {
	background-color:green;
	color:green;
}
td.evalpastniv0 {
	background-color:#eee;
	color:#eee;
}
td.evalpastniv1 {
	background-color:#f3a2a2;
	color:#f3a2a2;
}
td.evalpastniv2 {
	background-color:#f7d68d;
	color:#f7d68d;
}
td.evalpastniv3 {
	background-color:#f7ffb5;
	color:#f7ffb5;
}
td.evalpastniv4 {
	background-color:#b0ff9f;
	color:#b0ff9f;
}
td {
	border:1px solid black;
}
.noprint {
	display:none;
}
</style>
'.$_SESSION['evaluationright'];
$mpdf->WriteHTML($html);
$mpdf->Output('evaluation_'.$_SESSION['namepdf'].'.pdf', \Mpdf\Output\Destination::DOWNLOAD);
?>