public function index()
 {
     if (!isset($_GET['p'])) {
         $_GET['p'] = 1;
     }
     if (!isset($_GET['q'])) {
         $_GET['q'] = "";
     }
     if (!isset($_GET['criterio'])) {
         $_GET['criterio'] = "nombre_funcion";
     }
     $obj = new Funcion();
     $data = array();
     $data['data'] = $obj->index($_GET['q'], $_GET['p'], $_GET['criterio']);
     $data['query'] = $_GET['q'];
     $data['p11ag'] = $this->Pagination(array('rows' => $data['data']['rowspag'], 'url' => 'index.php?controller=funcion&action=index', 'query' => $_GET['q']));
     $cols = array("idfuncion", "nombre_funcion");
     $opt = array("funcion.nombre_funcion" => "Nombre Funcion");
     $data['grilla'] = $this->grilla("Funcion", $cols, $data['data']['rows'], $opt, $data['pag'], true, true);
     $view = new View();
     $view->setData($data);
     $view->setTemplate('../view/funcion/_Index.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }