public function mostraGrid()
 {
     $total_reg = "10";
     // número de registros por página
     $pagina = $_SESSION['pagina'];
     if (!$pagina) {
         $pc = "1";
     } else {
         $pc = $pagina;
     }
     $inicio = $pc - 1;
     $inicio = $inicio * $total_reg;
     //list all records
     $model_eventos = new eventoModel();
     $eventos_res = $model_eventos->getEventoLimit(null, $inicio, $total_reg);
     //Full table Scan :( or :)
     //send the records to template sytem
     $this->smarty->assign('listevento', $eventos_res);
     $query_total = $model_eventos->getCountEvento();
     $total_registros = $query_total[0]['total'];
     //pega o valor
     $html = $this->paginador($pc, $total_registros, 'evento');
     return $html;
 }