<div class="container-fluid my-3">

    <form action="<?php echo base_url('Consultazione_co2/creaTabellaReportMacchinario/' ); ?>" method="post">
        <div class="row">
            <div class="form-group col-sm-2">
                <input type="date" class="form-control" placeholder="Data" name="data" aria-describedby="basic-addon3" value="<?php echo $this->session->data_co2; ?>">
            </div>
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" data-translate="lbl4" placeholder="Articolo" name="articolo" aria-describedby="basic-addon3" value="<?php echo $this->session->articolo_co2; ?>">
            </div>
            <div class="form-group col-sm-3">
                <input type="text" class="form-control" data-translate="lbl5" placeholder="Descrizione articolo" name="descrizione_articolo" aria-describedby="basic-addon3" value="<?php echo $this->session->descrizione_articolo_co2; ?>">
            </div>
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" data-translate="lbl6" placeholder="Matricola" name="matricola" aria-describedby="basic-addon3"  value="<?php echo $this->session->matricola_co2; ?>" >
            </div>
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" data-translate="lbl18" placeholder="Operatore" name="utente" aria-describedby="basic-addon3" value="<?php echo $this->session->utente_co2; ?>">
            </div>

            <div class="form-group col-sm-1 text-right">
                <button type="submit" class="btn btn-info " name="search" style="width: 100%; height: 100%"><i class="fas fa-search"></i>&nbsp;</button>
            </div>

        </div>
    </form>
    <table id="tabella_co2" class="display table table-hover" >
        <thead>
            <tr>
                <th data-translate="lbl8">Data</th>
                <th data-translate="lbl9">Ora</th>
                <th data-translate="lbl10">Articolo</th>
                <th data-translate="lbl11">Descrizione Articolo</th>
                <th data-translate="lbl12">Matricola</th> 
                <th data-translate="lbl13">Peso estintore (Kg)</th> 
                <th data-translate="lbl18">Operatore</th> 
            </tr>
            <!--"Date" [1]=> string(4) "Time" [2]=> string(14) "Tipo Estintore" [3]=> string(19) "Matricola Estintore"
            [4]=> string(18) "Peso Estintore [g]" [5]=> string(10) "n.ro Cicli" [6]=> string(4) "Fase" 
            [7]=> string(12) "Tipo Polvere" [8]=> string(13) "Lotto Polvere" [9]=> string(9) "Operatore"-->
        </thead>
        <tbody>
            <?php
    //            var_dump($report_macchinario);
            foreach ($report_macchinario as $key => $rp) {
                echo '<tr>';
                    echo '<td>' .$rp->date. '</td>';
                    echo '<td>' .$rp->time. '</td>';
                    echo '<td>' .$rp->articolo. '</td>';
                    echo '<td>' .$rp->descrizione_articolo. '</td>';
                    echo '<td>' .$rp->matricola. '</td>';
                    echo '<td>' .$rp->peso. '</td>';
                    echo '<td>' .$rp->utente. '</td>';
                echo '</tr>';
            }
            ?>
        </tbody>
    </table>
    <p><?php echo $links; ?></p>
</div>