Uname:
Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software:
Apache
PHP version:
7.4.33 [ PHP INFO ] PHP os:
Linux
Server Ip:
54.36.31.145
Your Ip:
216.73.216.182
User:
homesquasz (91404) | Group:
users (100)
Safe Mode:
OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl
<?php
try
{
$html2pdf = new HTML2PDF('L', 'A4', 'fr', true, 'UTF-8', array(10, 10,10, 10));
$html2pdf->pdf->SetDisplayMode('fullpage');
ob_start();
?>
<style type="text/css">
<!--
table{width:100% !important;}
table tr td{ text-align:center; padding: 5px; }
table tr th{text-align:center;padding: 5px;}
table tr .title{font-size:10pt; font-weight: bold;}
table tr .content{text-align:left; font-size:10pt;}
h2{
text-align: center;
}
-->
</style>
<page backtop="30mm" backbottom="7mm" footer="page" >
<page_header footer='page' >
<table cellspacing="0" align="center" style="margin-bottom:40px; width: 100%;height:30%; text-align:center;text-align: center; font-size: 10pt;" align="center">
<tr>
<td rowspan="3" style="width: 33%; text-align: center;border: solid 1px black;"><h2>Groupe Hammami</h2></td>
<td rowspan="3" style="width: 33%; text-align: center;border: solid 1px black;font-weight: bold; font-size:20pt;">Liste des missions</td>
<td style="width: 33%; text-align: center;border: solid 1px black;text-transform: uppercase;"></td>
</tr>
<tr>
<td style="text-align: center;border: solid 1px black;text-transform: uppercase;"></td>
</tr>
<tr>
<td style="text-align: center;border: solid 1px black;text-transform: uppercase;">Page [[page_cu]] </td>
</tr>
</table>
</page_header>
<table class="table table-striped" id="datamission" align="center" border="1">
<thead>
<tr>
<th>Date<br> demande</th>
<th>Type<br>mission </th>
<th>Utilisateur</th>
<th>Destination</th>
<th>Date depart</th>
<th>Date fin</th>
<th>Total</th>
<th>Transport </th>
<th>Objet mission </th>
<th>Interim </th>
<th>Etat</th>
</tr>
</thead>
<tbody>
<?php foreach($mission as $key=>$d){ ?>
<tr <?php echo ($key%2==0)?"style='background:#eff0f1;'":""?>>
<td><?php echo date("d/m/Y",strtotime($d['creationdate'])); ?></td>
<td><?php echo $d['typemission']; ?></td>
<td><?php echo $d['name']." ".$d['prenom']; ?></td>
<td><?php echo $d['destination']; ?></td>
<td><?php echo date("d/m/Y H:i",strtotime($d['datedebut'])); ?></td>
<td><?php echo date("d/m/Y H:i",strtotime($d['datefin'])); ?></td>
<td> <?php
$datetime1 = new DateTime($d['datedebut']);
$datetime2 = new DateTime($d['datefin']);
$interval = $datetime1->diff($datetime2);
echo $interval->d." jours ".$interval->h." Heures";
?></td>
<td><?php echo $d['transport']; ?></td>
<td><?php echo $d['objetmission']; ?></td>
<td><?php echo $d['interim']; ?></td>
<td>
<?php
$etat_values = array(
'0'=>'En Attente',
'1'=>'Confirmée',
'2'=>'Rejetée',
'3'=>'Annulée',
);
echo $etat_values[$d["etat"]];
?>
</td>
</tr>
<tr>
<td colspan="11"><?php echo $d['description']; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output("exportation.pdf");
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}
?>