<thead> <th>Código</th><th>Nombre</th><th>Descripción</th><th>Estatus</th><?php if ($consultar || $eliminar) { echo '<th>Acción</th>'; } ?> </thead> <tbody> <?php require_once '../clases/clase_item.php'; $lobjItem = new clsItem(); $laItems = $lobjItem->consultar_items_inactivas(); for ($i = 0; $i < count($laItems); $i++) { $dependencia = false; $lobjItem->set_Item($laItems[$i][0]); $dependencia = $lobjItem->consultar_dependencia(); if ($laItems[$i][4]) { $laItems[$i][4] = 'Activo'; } elseif (!$laItems[$i][4]) { $laItems[$i][4] = 'Inactivo'; } echo '<tr>'; echo '<td>' . $laItems[$i][0] . '</td>'; echo '<td>' . $laItems[$i][1] . '</td>'; echo '<td>' . $laItems[$i][3] . '</td>'; echo '<td>' . $laItems[$i][4] . '</td>'; if ($consultar || $eliminar) { echo '<td>'; if ($consultar && $laItems[$i][4] == 'Activo') { echo '<a class="btn btn-info" href="#" title="Consultar" onclick="buscar(' . $laItems[$i][0] . ')"><i class="icon-search icon-white"></i></a> '; }