Código de: paginas/home.php
<!-- Home -->
<div id="home">
<div class="h3 text-success" style="margin-top: 0px;">
<i class="<?= $S->icone ?>"></i>
<span> Publicidades / Gerenciar </span>
</div>
<hr>
<div class="table-toolbar">
<div class="row">
<div class="col-md-6">
<div class="btn-group">
<a href="<?= SDIR ?>novo">
<button id="sample_editable_1_new" class="btn green no-shadow no-radius no-transform font-s13"> Novo Cadastro
<i class="fa fa-plus"></i>
</button>
</a>
</div>
</div>
</div>
<div class="visible-xs" style="height: 45px;"><div class="clearfix"></div></div>
</div>
<table class="table table-striped table-hover table-bordered" id="sample_editable_1">
<thead>
<tr>
<th width="1%" class="text-center"><i class="fa fa-arrows-v disabled"></i></th>
<th width="<?= $SIZE->p20 ?>"> Seção </th>
<th width="<?= $SIZE->titulo ?>"> Nome </th>
<th width="<?= $SIZE->btn ?>"> Status </th>
<th width="<?= $SIZE->btn ?>"> Editar </th>
<th width="<?= $SIZE->btn ?>"> Deletar </th>
</tr>
</thead>
<span id="controle-ajax" class="hidden" acao="" action="<?= SDIR.'!/imagem' ?>"></span>
<? if($IMAGEM->blocos) { foreach($IMAGEM->blocos as $k => $b) { ?>
<? if($b->secao != $IMAGEM->blocos[$k-1]->secao) { ?><tbody class="sortable" action="<?= SDIR.'!/imagem' ?>"><? } ?>
<tr ID="<?= $b->id ?>" secao="<?= $b->secao_id ?>">
<td class="text-center" width="<?= $SIZE->btn ?>">
<div class="btn btn-xs btn-default no-transform no-shadow no-radius font-s13">
<i class="fa fa-arrows-v disabled"></i>
<b><span class="top"><?= $b->ordem ?></span></b>
</div>
</td>
<td width="<?= $SIZE->p20 ?>"><?= $b->secao ?></td>
<td width="<?= $SIZE->titulo ?>"><?= '<b>'.$b->legenda.'</b>' ?></td>
<td width="<?= $SIZE->btn ?>">
<? if ($b->status == 1) { ?>
<button status="<?= $b->id ?>" secao="<?= $b->id ?>" btnAtivo="<?= $b->id ?>" tipo="desativar" type="button" class="btn btn-xs btn-success no-transform no-shadow no-radius font-s13"><i class="fa fa-check"></i> Ativo</button>
<button status="<?= $b->id ?>" secao="<?= $b->id ?>" btnInativo="<?= $b->id ?>" tipo="ativar" type="button" class="btn btn-xs btn-default no-transform no-shadow no-radius font-s13" style="display: none;"><i class="fa fa-close"></i> Inativo</button>
<? } else { ?>
<button status="<?= $b->id ?>" secao="<?= $b->id ?>" btnAtivo="<?= $b->id ?>" tipo="desativar" type="button" class="btn btn-xs btn-success no-transform no-shadow no-radius font-s13" style="display: none;"><i class="fa fa-check"></i> Ativo</button>
<button status="<?= $b->id ?>" secao="<?= $b->id ?>" btnInativo="<?= $b->id ?>" tipo="ativar" type="button" class="btn btn-xs btn-default no-transform no-shadow no-radius font-s13"><i class="fa fa-close"></i> Inativo</button>
<? } ?>
</td>
<td width="<?= $SIZE->btn ?>">
<a href="<?= SDIR.'editar/'.$b->id ?>" type="button" class="btn btn-xs btn-success no-transform no-shadow no-radius font-s13">Editar</a>
</td>
<td width="<?= $SIZE->btn ?>">
<button type="button" class="delete btn btn-xs btn-danger no-transform no-shadow no-radius font-s13">Excluir</button>
</td>
</tr>
<? if($b->secao != $IMAGEM->blocos[$k+1]->secao) { ?></tbody><? } ?>
<? } } ?>
</table>
</div>
<? $JS .= '<script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>'; ?>