break;
    case "etal":
        //$output .= getetallist($client,$range);
        list($liste, $ar_ids_etal) = getetallist($client, $range);
        $output .= $liste;
        break;
    case "amarrage":
        //$output .= getamarragelist($client,$range);
        list($lista, $ar_ids_amarrage) = getamarragelist($client, $range);
        $output .= $lista;
        break;
    default:
        //$output .= getcantinelist($client,$range);
        //$output .= getetallist($client,$range);
        //$output .= getamarragelist($client,$range);
        list($listc, $ar_ids_cantine) = getcantinelist($client, $range);
        list($liste, $ar_ids_etal) = getetallist($client, $range);
        list($lista, $ar_ids_amarrage) = getamarragelist($client, $range);
        $output .= $listc;
        $output .= $liste;
        $output .= $lista;
        break;
}
$output .= "</table>";
foreach ($ar_ids_cantine as &$id) {
    $ids_cantine .= $id . ",";
}
foreach ($ar_ids_etal as &$id) {
    $ids_etal .= $id . ",";
}
foreach ($ar_ids_amarrage as &$id) {
    $client = " AND `idclient`='" . $_GET['client'] . "'";
}
if ($list) {
    $output = "<div style='display: inline-block; height:inherit; overflow:auto;margin: 0px auto;'><table><tr><th>Type de Facture</th><th>Client</th><th width=500px>Facture</th><th>PDF</th><th>D&eacute;validation</th></tr>";
    switch ($type) {
        case "cantine":
            $output .= getcantinelist($client);
            break;
        case "etal":
            $output .= getetallist($client);
            break;
        case "amarrage":
            $output .= getamarragelist($client);
            break;
        default:
            $output .= getcantinelist($client);
            $output .= getetallist($client);
            $output .= getamarragelist($client);
            break;
    }
    $output .= "</table></div>";
} else {
    $output = "<div style='display: inline-block; height:inherit; overflow:auto;margin: 0px auto;'><table><tr><th>Type de Facture</th><th>Client</th><th width=500px>Devis</th><th>PDF</th><th>Validation/Rejet</th></tr>";
    switch ($type) {
        case "cantine":
            $output .= getcantinevalidate($client);
            break;
        case "etal":
            $output .= getetalvalidate($client);
            break;
        case "amarrage":