public function index()
 {
     if (!isset($_GET['p'])) {
         $_GET['p'] = 1;
     }
     if (!isset($_GET['q'])) {
         $_GET['q'] = "";
     }
     if (!isset($_GET['criterio'])) {
         $_GET['criterio'] = "idevento";
     }
     $obj = new evento_proyeccion_social();
     $data = array();
     $datos = $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=evento_proyeccion_social&action=index', 'query' => $_GET['q']));
     $cols = array("CODIGO", "TEMA DE EVENTO", "TIPO", "FECHA", "LUGAR", "PREACTIVIDADES");
     $opt = array("evento_proyeccion_social.DescripcionTipoColegio" => "Nombre Tipo Colegio");
     $data['grilla'] = $this->grilla("evento_proyeccion_social", $cols, $data['data']['rows'], $opt, $data['pag'], true, true);
     $view = new View();
     $view->setData($data);
     $view->setTemplate('../view/evento_proyeccion_social/_Index.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }
 public function delete()
 {
     $obj = new evento_proyeccion_social();
     $p = $obj->delete($_GET['id']);
     if ($p[0]) {
         header('Location: index.php?controller=evento_proyeccion_social');
     } else {
         $data = array();
         $view = new View();
         $data['msg'] = $p[1];
         $data['url'] = 'index.php?controller=evento_proyeccion_social';
         $view->setData($data);
         $view->setTemplate('../view/_Error_App.php');
         $view->setLayout('../template/Layout.php');
         $view->render();
     }
 }