<?php

include './dao/DAO.php';
$dao = new dao();
$id = $_GET["id"];
$activar = $_GET["activar"];
$sqlActivar = "UPDATE clientes set activo = '" . $activar . "' WHERE idclientes = '" . $id . "'";
try {
    $dao->ejecutarSentencia($sqlActivar);
    $sql = "SELECT * FROM clientes";
    try {
        $informacion = $dao->traerInformacion1($sql);
        ?>
        <table class="table ">
            <thead>
            <th>Imagen</th>
            <th>Activo</th>
        </thead>
        <?php 
        while ($rs = mysql_fetch_array($informacion)) {
            ?>
            <tr>
                <td><a><?php 
            echo $rs["ruta"];
            ?>
</a></td>
                <td><?php 
            if ($rs["activo"] == 0) {
                ?>
<a onclick="activar(<?php 
                echo $rs[0];