<div class="box-header"> <h3 class="box-title">Listagem de locais</h3> <a class="btn btn-info btn-flat pull-right" href="ViewLocaisObj.php" title="Atualizar resultados" data-toggle="tooltip" data-placement="left"><i class="fa fa-refresh"></i></a> </div><!-- /.box-header --> <div class="box-body"> <table id="dataT" class="table table-bordered table-hover"> <thead> <tr> <th>Locais</th> <th>Opções</th> </tr> </thead> <tbody> <?php $listar = new Local(); $list = $listar->listar(); if ($list != null) { foreach ($list as $line) { ?> <tr class="odd gradeX"> <form name="view" action="EditLocalObj.php" method="post"> <td><?php echo $line->sala; ?> </td> <td> <input type='hidden' name='id' value='<?php echo $line->id; ?> '>
<?php /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Controle de jogadores e fichas de poker, na modalidade cash game. */ /* Desenvolvido por: Reinaldo Silveira */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ include_once "../header.php"; require "../verifica.php"; include_once "../../model/class.local.php"; include_once "../../controller/class.local.php"; $local = new Local(); $locais = $local->listar(); $cont = 0; ?> <script type="text/javascript" src="../js/jquery.dataTables.min.js"></script> <script type="text/javascript" src="../js/jquery-DT-pagination.js"></script> <script type="text/javascript"> /* Table initialisation */ $(document).ready(function() { $('#listagem').dataTable( { "bSort": true, //sorting "iDisplayLength": 10, //records per page "sDom": "t<'row'<'col-md-6'i><'col-md-6'p>>", "sPaginationType": "bootstrap" }); }); </script> <style>
public static function dropdown($fieldname, $selected = '') { $template = new Template(); $template->assignParam('fieldname', $fieldname); $template->assignParam('selected', $selected); $template->assignParam('objetos', Local::listar()); return $template->render("local/dropdown.phtml", true); }