echo '                      
                <table class="table table-striped table-bordered very-small-text">
                                            <thead>
                                              <tr>
                                                <th>Heure</th>
                                                <th>Prix</th>
                                                <th>EAN / ISBN</th>
                                                <th>Titre</th>
                                                <th>Auteur</th>
                                                <th>Editeur</th>
                                                <th>Edition</th>
                                              </tr>
                                            </thead>
                                            <tbody>';
foreach ($rows as $key => $value) {
    $Reassort->setIdProd($value['id_table']);
    $Reassort->findReaStat();
    echo '<tr>';
    echo '<td>' . $value['heure'] . '</td>';
    echo '<td>' . $value['prix'] . '</td>';
    echo '<td class="' . $value['code'] . '">' . substr($value['code'], 0, 17) . '</td>';
    echo '<td>' . $value['titre'] . '</td>';
    echo '<td>' . $value['auteur'] . '</td>';
    echo '<td>' . $value['editeur'] . '</td>';
    echo '<td>' . $value['edition'] . '</td>';
    echo '</tr>';
    echo '<script>$(".' . $value['code'] . '").barcode("' . $value['code'] . '", "code128", {barWidth:1, barHeight:15})</script>';
}
echo '    </tbody>

                      </table>';
<?php

require_once __DIR__ . "/../class/Reassort.class.php";
if (isset($_POST)) {
    $Reassort = new Reassort();
    $Reassort->setIdProd($_POST['id']);
    $Reassort->setRestant($_POST['restant']);
    $Reassort->setPris($_POST['pris']);
    echo $Reassort->updateReaStat();
}