/** * This is construct base of the class. * * A public constructor; initializes the variable $instanceDataBase. * */ public function __construct($instanceDataBase) { parent::__construct($instanceDataBase); KindBrother::setDataOperationBusiness($instanceDataBase); KindBrother::getBusiness(); KindBrother::getDescriptionBusiness(); }
}); </script> <?php $action = 'LIST'; if (isset($_POST['ACTION'])) { $action = $_POST['ACTION']; } else { if (isset($_GET['ACTION'])) { $action = $_GET['ACTION']; } } $user = new User($registry[$nameDataBase]); $catalog = new MembershipAppForm($registry[$nameDataBase]); $scool = new Schooling($registry[$nameDataBase]); $padres = new ApplicationParents($registry[$nameDataBase]); $hnos = new KindBrother($registry[$nameDataBase]); // Simplificar la ruta de propiedades $v_label = $property["pages"]["admision/admision_form"]; $v_label_list = $property["pages"]["general_list"]; // Simplificar el ruteo de edicion/visualizacion $v_route_edit_preview = 'index.php?page=admision/formulario'; // Simplificar el ruteo de insert $v_route_insert = '?page=admision/formulario&action=INSERT'; // Simplificar el ruteo de lista $v_route_list = 'index.php?page=admision/admision_form'; //print_r($_POST); switch ($action) { case 'INSERT': $transaction = new Transaction($registry[$nameDataBase]); MembershipAppForm::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(MembershipAppForm::$business, MembershipAppForm::$insert, MembershipAppForm::$descriptionBusiness));
//padres $element_padres = new ApplicationParents($registry[$nameDataBase]); $list_padre = $element_padres->getListApplicationParentsForm($idForm, 25); //padre $list_madre = $element_padres->getListApplicationParentsForm($idForm, 26); //madre $data_padre = array(); if (count($list_padre) > 0) { $data_padre = $list_padre[0]; } $data_madre = array(); if (count($list_madre) > 0) { $data_madre = $list_madre[0]; } //hermanos $element_hnos = new KindBrother($registry[$nameDataBase]); $list_hnos = $element_hnos->getListKindBrotherForm($idForm, 27); //hnos $data_h1 = isset($list_hnos[0]) ? $list_hnos[0] : array(); $data_h2 = isset($list_hnos[1]) ? $list_hnos[1] : array(); $data_h3 = isset($list_hnos[2]) ? $list_hnos[2] : array(); $data_h4 = isset($list_hnos[3]) ? $list_hnos[3] : array(); $data_h5 = isset($list_hnos[4]) ? $list_hnos[4] : array(); $list_hnosp = $element_hnos->getListKindBrotherForm($idForm, 28); //hnos de padre $data_hp1 = isset($list_hnosp[0]) ? $list_hnosp[0] : array(); $data_hp2 = isset($list_hnosp[1]) ? $list_hnosp[1] : array(); $data_hp3 = isset($list_hnosp[2]) ? $list_hnosp[2] : array(); $list_hnosm = $element_hnos->getListKindBrotherForm($idForm, 29); //hnos de madre $data_hm1 = isset($list_hnosm[0]) ? $list_hnosm[0] : array();
$list = $form->getPDFListMembershipAppForm($_GET['id']); $form_admision = $list[0]; // carga de datos de escolaridad $sch = new Schooling($db); $list_sch = $sch->getPDFListSchooling($_GET['id']); $escolaridad = $list_sch[0]; // carga de datos de los padres del estudiante $aparents = new ApplicationParents($db); $list_padre = $aparents->getPDFListApplicationParents($_GET['id'], 25); //PADRE $list_madre = $aparents->getPDFListApplicationParents($_GET['id'], 26); //MADRE $datos_padre = $list_padre[0]; $datos_madre = $list_madre[0]; // carga de datos de los Hermanos $brothers = new KindBrother($db); $list_hpm = $brothers->getPDFListKindBrother($_GET['id'], 27); //HERMANOS DEL POSTULANTE $list_hp = $brothers->getPDFListKindBrother($_GET['id'], 28); //HERMANOS POR PARTE DE PADRE $list_hm = $brothers->getPDFListKindBrother($_GET['id'], 29); //HERMANOS POR PARTE DE MADRE $datos_hpm = array(); if (count($list_hpm) > 0) { $datos_hpm = $list_hpm; } $datos_hp = array(); if (count($list_hp) > 0) { $datos_hp = $list_hp; } $datos_hm = array();