public function index() { if (!isset($_GET['p'])) { $_GET['p'] = 1; } if (!isset($_GET['q'])) { $_GET['q'] = ""; } if (!isset($_GET['criterio'])) { $_GET['criterio'] = "alumno_cca.nombres"; } $obj = new alumno_cca(); $data = array(); //"alumno_cca.idalumno" => "codigo" $data['data'] = $obj->alumnos_matriculados($_GET['q'], $_GET['p'], $_GET['criterio']); // print "<pre>"; print_r($data); print "</pre>\n";exit(); $data['query'] = $_GET['q']; $data['pag'] = $this->Pagination(array('rows' => $data['data']['rowspag'], 'url' => 'index.php?controller=recepcion_cca&action=index', 'query' => $_GET['q'])); $cols = array("Id", "Nombres y Apellidos", "Identificacion"); $opt = array("alumno_cca.nombres" => "nombres"); $data['a'] = $_GET['a']; $data['grilla_cca'] = $this->grilla_cca("alumno_cca", "recepcion_cca", "lista_requisitos", $cols, $data['data']['rows'], $opt, $data['pag'], true); $view = new View(); $view->setData($data); $view->setTemplate('../view/recepcion_cca/_Index.php'); $view->setLayout('../template/Layout.php'); $view->render(); }
public function index() { if (!isset($_GET['p'])) { $_GET['p'] = 1; } if (!isset($_GET['q'])) { $_GET['q'] = ""; } if (!isset($_GET['criterio'])) { $_GET['criterio'] = "alumno_cca.nombres"; } $obj = new alumno_cca(); $data = array(); //"alumno_cca.idalumno" => "codigo" if (isset($_GET['a'])) { $data['data'] = $obj->alumnos_matriculados($_GET['q'], $_GET['p'], $_GET['criterio']); $data['query'] = $_GET['q']; $data['pag'] = $this->Pagination(array('rows' => $data['data']['rowspag'], 'url' => 'index.php?controller=alumno_cca&action=index&a=b', 'query' => $_GET['q'])); $cols = array("Id", "Nombres y Apellidos", "Identificacion"); $opt = array("alumno_cca.nombres" => "nombres"); $data['a'] = $_GET['a']; $data['grilla_cca'] = $this->grilla_cca("alumno_cca", "cronograma_cca", "index", $cols, $data['data']['rows'], $opt, $data['pag'], true); } else { $data['data'] = $obj->index($_GET['q'], $_GET['p'], $_GET['criterio']); $data['query'] = $_GET['q']; $data['pag'] = $this->Pagination(array('rows' => $data['data']['rowspag'], 'url' => 'index.php?controller=alumno_cca&action=index', 'query' => $_GET['q'])); $cols = array("Id", "Nombres", "Apellidos", "Identificacion", "Tipo alumno "); $opt = array("alumno_cca.nombres" => "nombres"); $data['grilla_cca'] = $this->grilla_cca("alumno_cca", NULL, NULL, $cols, $data['data']['rows'], $opt, $data['pag'], false, false, true, true); } $view = new View(); $view->setData($data); if (isset($_GET['a'])) { $view->setTemplate('../view/alumno_cca/_Index.php'); $view->setLayout('../template/List.php'); return $view->render(); } else { $view->setTemplate('../view/alumno_cca/_Index.php'); $view->setLayout('../template/Layout.php'); $view->render(); } }