<?php

include ("header.php");

$sql="SELECT * FROM `contactarnos` WHERE con_activo = 1";

$resultado = mysqli_query($mysqli, $sql);

?>



        <div class="content-wrapper">

            <!-- START PAGE CONTENT-->

            <div class="page-heading">

                <h1 class="page-title">Forma de Contactarnos</h1>

                <ol class="breadcrumb">

                    <li class="breadcrumb-item">

                    <button onclick="location.href='ncontactarnos.php'" type="button" class="btn btn-primary">Nuevo</button>

                    </li>

                    

                </ol>

            </div>

            <div class="page-content fade-in-up">

                <div class="ibox">

                    <div class="ibox-head">

                        <div class="ibox-title">Listado</div>

                    </div>

                    <div class="ibox-body">

                        <table class="table table-striped table-bordered table-hover" id="dataTablePacientes" cellspacing="0" width="100%">

                            <thead>

                                <tr>

                                        <th> NOMBRE </th>

                                        <th> DESCRIPCION </th>

                                        <th> MOD </th>

                                        <th> BORRAR </th>

                                    </tr>

                            </thead>

                                <tbody>          

                                    <?php $NUM=0;while($row = mysqli_fetch_array($resultado)) { $NUM=$NUM+1?>

                                    <tr>

                                        <td><?php echo $row['con_nombre']; ?></td>

                                        <td> <?php echo $row['con_descripcion']; ?></td>                                              

                                        <td> <a href="ncontactarnos.php?id=<?php echo $row['con_id']; ?>&edt=1"><div class="icon-item"><i class="fa fa-edit"></i></div></a> </td>

                                        <td> <a href="#" data-href="ncontactarnos.php?id=<?php echo $row['con_id'] . '&borrar=1'; ?>" data-toggle="modal" data-target="#confirm-delete"><div class="icon-item"><i class="fa fa-trash"></i></div></a> </td>

                                    </tr>

                                    <?php } ?>

                                </tbody>

                        </table>

                </div>

            </div>                

<?php 

    include ('footer.php');

?>