echo '<a id="btn_registrar" class="btn btn-success" href="?vista=sistema/registrar_noticia"><i class="icon-plus icon-white"></i> Registrar noticia</a>'; } ?> <table class="table table-striped table-hover table-bordered bootstrap-datatable datatable dataTable" id="filtro"> <thead> <th>Codigo</th><th>Titulo</th><th>Fecha</th><th>Estatus</th><?php if ($consultar || $eliminar) { echo '<th>Acción</th>'; } ?> </thead> <tbody> <?php require_once '../clases/clase_noticia.php'; $lobjNoticia = new clsNoticia(); $laNoticias = $lobjNoticia->consultar_noticias(); for ($i = 0; $i < count($laNoticias); $i++) { if ($laNoticias[$i][5]) { $laNoticias[$i][5] = 'Activo'; } elseif (!$laNoticias[$i][5]) { $laNoticias[$i][5] = 'Inactivo'; } echo '<tr>'; echo '<td>' . $laNoticias[$i][0] . '</td>'; echo '<td>' . $laNoticias[$i][1] . '</td>'; echo '<td>' . $laNoticias[$i][4] . '</td>'; echo '<td>' . $laNoticias[$i][5] . '</td>'; if ($consultar || $eliminar) { echo '<td>'; if ($consultar && $laNoticias[$i][5] == 'Activo') { echo '<a class="btn btn-info" href="#" title="Consultar" onclick="buscar(' . $laNoticias[$i][0] . ')"><i class="icon-search icon-white"></i></a> ';