<?php require_once '../Controler/HCSeccion.php'; session_start(); $control = new HCSeccion($_SESSION); $control->cargarSeccion(null); $result = $control->obtenerConsulta(); $dependencia = $control->getDependencias(); ?> <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/bootstrap.min.css"> <style> body { padding-top: 50px; padding-bottom: 20px; } </style> <link rel="stylesheet" href="css/bootstrap-theme.min.css"> <link rel="stylesheet" href="css/main.css">
<?php require_once '../Controler/HCSeccion.php'; session_start(); $nproceso = $_REQUEST['nproceso']; $control = new HCSeccion($_SESSION); switch ($nproceso) { case 1: // Registro de una seccion $arrseccion = $_POST['Json']; if ($arrseccion != null) { $control->cargarSeccion($arrseccion); try { $control->crearSeccion(); echo TRUE; break; } catch (Exception $e) { echo $e->getMessage(); } } else { //creacion de mensaje de respuesta (P) echo "Ingrese el nombre de la seccion"; break; } case 2: // consulta de una seccion $control->cargarSeccion(null); $result = $control->obtenerConsulta(); $dependencia = $control->ObtenerDependencias(FALSE); $arrayJson['seccion'] = $result; $arrayJson['dependencia'] = $dependencia;