/** * This is construct base of the class. * * A public constructor; initializes the variable $instanceDataBase. * */ public function __construct($instanceDataBase) { parent::__construct($instanceDataBase); SupervisorAdmissionArea::setDataOperationBusiness($instanceDataBase); SupervisorAdmissionArea::getBusiness(); SupervisorAdmissionArea::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 SupervisorAdmissionArea($registry[$nameDataBase]); // Simplificar la ruta de propiedades $v_label = $property["pages"]["admission/admission_supervisor"]; $v_label_list = $property["pages"]["general_list"]; // Simplificar el ruteo de edicion/visualizacion $v_route_edit_preview = 'index.php?page=admision/supervisor'; // Simplificar el ruteo de insert $v_route_insert = '?page=admision/supervisor'; // Simplificar el ruteo de lista $v_route_list = 'index.php?page=admision/admission_supervisor'; switch ($action) { case 'INSERT': $transaction = new Transaction($registry[$nameDataBase]); SupervisorAdmissionArea::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(SupervisorAdmissionArea::$business, SupervisorAdmissionArea::$insert, SupervisorAdmissionArea::$descriptionBusiness)); $data = array($_POST['ID_ADMISSION_AREA'], $_POST['ID_PERSON'], $_POST['ID_STATUS_SUPERVISOR']);
$v_label = $property["pages"]["admission/supervisor"]; // Decidir en funcion a la accion $title_1 = $v_label["NEW_TITLE"]; // INSERT $action = 'INSERT'; if (isset($_GET['EDIT'])) { $action = 'EDIT'; $title_1 = $v_label["EDIT_TITLE"]; $elementAction = $_GET['EDIT']; } elseif (isset($_GET['PREVIEW'])) { $action = 'PREVIEW'; $title_1 = $v_label["PREVIEW_TITLE"]; $elementAction = $_GET['PREVIEW']; } if ($action != 'INSERT') { $element = new SupervisorAdmissionArea($registry[$nameDataBase]); $list = $element->getListSupervisorAdmissionArea($elementAction); $data = $list[0]; } // simplificar acceso a etiquetas de formulario $v_label_gral_form = $property["pages"]["general_form"]; ?> <div class="grid_10"> <div class="box round first"> <h2><?php echo $title_1; ?> </h2>
$_SESSION['pk_id_holder'] = $dataLogRole[0]['pk_id_holder']; } if ($userData['pk_id_role'] == User::ROLE_SUBDIRECTOR) { $dataLogRole = $user->getDeputyDirectorByPerson($userData['pk_id_person']); $_SESSION['pk_id_deputy_director'] = $dataLogRole[0]['pk_id_deputy_director']; } if ($userData['pk_id_role'] == User::ROLE_DIRECTOR) { $dataLogRole = $user->getHeadMasterByPerson($userData['pk_id_person']); $_SESSION['pk_id_headmaster'] = $dataLogRole[0]['pk_id_headmaster']; } if ($userData['pk_id_role'] == User::ROLE_CONSEJO_ADMINISTRACION) { $dataLogRole = $user->getBoardDirectorByPerson($userData['pk_id_person']); $_SESSION['pk_id_board_directors'] = $dataLogRole[0]['pk_id_board_directors']; } if ($userData['pk_id_role'] == User::ROLE_ENCARGADO_ADMISION) { $admissionObject = new SupervisorAdmissionArea($registry[$dbSystem]); $areas = $admissionObject->getListSupervisorAdmissionAreaByPerson($_SESSION["pk_id_person"]); $areasList = array(); foreach ($areas as $area) { $areasList[$area['fk_id_admission_area']] = $area['admission_area']; } $_SESSION['ADMISSION_AREAS'] = $areasList; // PRINT_R($_SESSION['ADMISSION_AREAS']); } } else { unset($_SESSION); session_destroy(); } } } if (isset($_SESSION["ROLE_NOT_SELECTED"]) && $page != 'security/select_role_ajax') {
$statusData = array(36, $_GET['ID_FORM']); //print_r($statusData); $statusTransactionDBStatus = $formObject->updateMembershipAppFormStatusAddmision($statusData, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'El proceso de admision se reactivo exitosamente!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'El proceso de admision no se pudo reactivar!'); } } $areas = $process->getListAdmissionProcessByAppForm($id_form); if (count($areas) == 0) { $active = 0; } } $pk_id_supervisor_admission_area = 1; $supervisor = new SupervisorAdmissionArea($registry[$nameDataBase]); $listAreaSup = $supervisor->getListSupervisorAdmissionAreaByPerson($_SESSION['pk_id_person']); if (count($forms) == 1) { ?> <h3> Estado del Flujo del proceso de admision: <?php echo isset($id_form) ? $id_form : 'No seleccionado'; ?> </h3><br> <a href="?page=admision/admision_aproval" class="button_form" >Regresar al Buscador de Formularios de Aplicacion</a> <a href="javascript:void(0);" class=" modal_ajax_form button_form" v_title="Datos de Formulario" v_width="790" v_url="?page=admision/admision_form_preview&PREVIEW=<?php