<?php

include ("header.php");

$sql="SELECT * FROM `productos` WHERE pro_activo = 1 and pro_tipo = 'servicios'";

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

?>



        <div class="content-wrapper">

            <!-- START PAGE CONTENT-->

            <div class="page-heading">

                <h1 class="page-title">Servicios</h1>

                <ol class="breadcrumb">

                    <li class="breadcrumb-item">

                    <button onclick="location.href='nservicios.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> PRECIO </th>

                                        <th> MODIFICAR </th>

                                        <th> BORRAR </th>

                                    </tr>

                            </thead>

                                <tbody>          

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

                                    <tr>

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

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

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

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

                                        <td> <a href="#" data-href="nservicios.php?id=<?php echo $row['pro_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');

?>