Jump to content

Recommended Posts

Posted

hello, im use this module, but between to 50 files i want pagination....

<div class="table-responsive">
            <table class="table table-hover">
            <thead >
                <tr align="center">
                    <th>Tipo de Aeronave</th>
                    <th>Matricula</th>
                    <th>Rango</th>
                    <th>Aerolinea</th>
                    <th>Pasajeros</th>
                    <th>Carga Maxima</th>
                    <th>Detalles</th>
                </tr>
            </thead>
            <tbody>
                <?php if($aircrafts != null){ 
                    foreach($aircrafts as $aircrafts){?>
                    <tr align="center">
                        <td><?php print $aircrafts->fullname;?></td>
                        <td><?php print $aircrafts->registration;?></td>
                        <td><?php print $aircrafts->range;?> <b>Nm </b></td>
                        <td><?php print $aircrafts->airline;?> </td>
                        <td><?php print $aircrafts->maxpax;?> </td>
                        <td><?php print $aircrafts->maxcargo;?> <b>lbs</b></td>
                        <td><a href="<?php echo url('fleet/view/'.$aircrafts->id); ?>"><button class="btn btn-success">Ver</button></a></td>
                    </tr>
                <?php }}?>
            </tbody>
        </table>
        <div class="pagination">
            <?php $query = "SELECT * FROM phpvms_aircrafts";
                $total_registros = $aircrafts->id;
                $total_pagina = ceil($aircraft->id/'20');

                print '<a href="https://oneworldv.com/index.php/fleet?pagina=1">'.' Primera '.'</a>';

                for($i=1; $i<=$total_paginas; $i++){
                    print '<a href="https://oneworldv.com/index.php/fleet?pagina='.$i.'">'.$i.'</a>';
                }
                print '<a href="https://oneworldv.com/index.php/fleet?pagina=$total_paginas">'.' Ultima '.'</a>';
            ?>
        </div>
    </div>
</main>
</section>

but i cant to run....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...