public function listar($campo = 'Nombre', $orden = 'asc', $limit = '15', $offset = 0) { $this->permisos('admin'); $this->pagina = 'alumnos'; $this->menu = 'menu_alumnos'; $this->titulo = $this->pagina; $this->estilo = array('backend', 'tablas'); $this->javascript = array('marcar_checkbox', 'confirmacion'); $datos['buscador'] = array('class' => 'search-query input-medium', 'type' => 'text', 'name' => 'buscador', 'placeholder' => "Buscar", 'autofocus' => 'autofocus'); $datos['boton'] = array('class' => 'btn', 'id' => 'buscador', 'name' => 'button', 'value' => 'Buscar'); $datos['borrar'] = array('class' => 'btn btn-danger confirm-toggle', 'id' => 'borrar', 'value' => 'Borrar selección', 'data-confirm' => "¿Estás seguro?"); $datos['backend'] = TRUE; $numero = Alumno_model::numero(); /*if($numero == 0){ $this->registrar(); } else{*/ $datos['numero'] = $numero; $opciones = $this->seleccion($numero); $datos['opciones'] = $opciones; if ($this->input->post('cantidad') != '') { if ($opciones[$this->input->post('cantidad')] == 'Todo') { $limit = $numero; } else { $limit = $opciones[$this->input->post('cantidad')]; } } $datos['elementos'] = $limit; if ($this->input->post('cantidad') != '') { $datos['limit'] = $this->input->post('cantidad'); } else { $aux = 0; if ($limit % 5 != 0) { $aux = 1; } $datos['limit'] = floor($limit / 5) - 1 + $aux; } $datos['fields'] = array('Expediente' => 'Nº Expediente', 'Nombre' => 'Nombre', 'Email' => 'Email', 'Telefono' => 'Teléfono', 'Estado' => 'Estado'); $config = array(); $config['base_url'] = base_url() . "admin/alumno/" . $campo . "/" . $orden . "/" . $limit . "/"; $config['total_rows'] = $numero; $config['per_page'] = $limit; $config['uri_segment'] = 6; $config['prev_link'] = 'anterior'; $config['next_link'] = 'siguiente'; $config['first_link'] = '<<'; $config['last_link'] = '>>'; $config['num_tag_open'] = '<li class="disable">'; $config['num_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</a></li>'; $config['prev_tag_open'] = '<li>'; $config['prev_tag_close'] = '</li>'; $config['next_tag_open'] = '<li>'; $config['next_tag_close'] = '</li>'; $config['first_tag_open'] = '<li>'; $config['first_tag_close'] = '</li>'; $config['last_tag_open'] = '<li>'; $config['last_tag_close'] = '</li>'; $this->pagination->initialize($config); $datos['links'] = $this->pagination->create_links(); $datos['campo'] = $campo; $datos['orden'] = $orden; $this->mostrar($datos); //} }
?> </td> <?php } ?> </tr> <?php } ?> </table> <div id="editor" class="dialog"> <span class="close"></span> <h2><?php echo Alumno_model::nombreCompleto($alumno); ?> - <?php echo $anio; ?> (<span class="materia"></span>)</h2> <table class="decorated"> <tr> <?php foreach ($this->Nota_model->columnas as $pos => $val) { ?> <?php if ($val == $this->Nota_model->col_pago && $this->session->userdata('usuario_tipo') == 'profe') { continue; } ?>