<?php $response = new Response($registry[$nameDataBase]); $consultation = new Consultations($registry[$nameDataBase]); if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'INSERT' && $_POST['ENTITY'] == 'REQUEST_RESPONSE') { $res = 0; $transaction = new Transaction($registry[$nameDataBase]); Consultations::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Response::$business, Response::$insert, Response::$descriptionBusiness)); /* * * response, datetime_response, level, parent_response, fk_id_consultation, fk_id_query_area, fk_id_educational_role, resp_fk_id_deputy_director, resp_fk_id_psychologist, resp_fk_id_headmaster, resp_fk_id_board_directors, resp_fk_id_student, resp_fk_id_holder, resp_fk_id_teacher, state_satisfaction */ $fk_id_educational_role = $_SESSION["pk_id_educational_role"]; $resp_fk_id_deputy_director = NULL; $resp_fk_id_psychologist = NULL; $resp_fk_id_headmaster = NULL; $resp_fk_id_board_directors = NULL; $resp_fk_id_student = NULL; $resp_fk_id_holder = NULL; $resp_fk_id_teacher = NULL; if ($_SESSION["pk_id_role"] == User::ROLE_ESTUDIANTE) { $resp_fk_id_student = $_SESSION["pk_id_student"]; } if ($_SESSION["pk_id_role"] == User::ROLE_PROFESOR) { $resp_fk_id_teacher = $_SESSION["pk_id_teacher"];
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); GradeEducation::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(GradeEducation::$business, GradeEducation::$update, GradeEducation::$descriptionBusiness)); $data = array($_POST['NAME'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateGradeEducation($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); GradeEducation::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(GradeEducation::$business, GradeEducation::$update, GradeEducation::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteGradeEducation($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListGradeEducation(); ?> <div class="grid_10">
$cursos = $_POST['chk_cursos']; $cap = new CourseApplyPeriod($registry[$nameDataBase]); $dsd = $cap->deleteCourseApplyPeriod(array($id_period), $idTransaction); for ($i = 0; $i < count($cursos); $i++) { $data_cursos = array($id_period, $cursos[$i]); $ds = $cap->insertCourseApplyPeriod($data_cursos, $idTransaction); } Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); AdmissionPeriod::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(AdmissionPeriod::$business, AdmissionPeriod::$update, AdmissionPeriod::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteAdmissionPeriod($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListAdmissionPeriod(); ?> <div class="grid_10">
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); SupervisorAdmissionArea::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(SupervisorAdmissionArea::$business, SupervisorAdmissionArea::$update, SupervisorAdmissionArea::$descriptionBusiness)); $data = array($_POST['ID_ADMISSION_AREA'], $_POST['ID_PERSON'], $_POST['ID_STATUS_SUPERVISOR'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateSupervisorAdmissionArea($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); SupervisorAdmissionArea::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(SupervisorAdmissionArea::$business, SupervisorAdmissionArea::$update, SupervisorAdmissionArea::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteSupervisorAdmissionArea($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListSupervisorAdmissionArea(); ?> <div class="grid_10">
<?php $transaction = new Transaction($registry[$nameDataBase]); AssignHCourseHardMatterTeacher::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(AssignHCourseHardMatterTeacher::$business, AssignHCourseHardMatterTeacher::$insert, AssignHCourseHardMatterTeacher::$descriptionBusiness)); $matterCourse = new AssignHCourseHardMatterTeacher($registry[$nameDataBase]); if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'INSERT' && $_POST['ENTITY'] == 'ASSIGN_MATTER_TEACHER') { /* fk_id_teacher, fk_id_main_course_matter, fk_id_course_hard */ $data = array($_POST['FK_ID_TEACHER'], $_POST['FK_ID_MAIN_COURSE_MATTER'], $_POST['PK_ID_COURSE_HARD']); $pk_id = $matterCourse->insertAssignHCourseHardMatterTeacher($data, $idTransaction); if ($pk_id > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'Los Datos de la asignacion materia docente se guardaron correctamente!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la asignacion materia docente no se pudieron guardar!'); } } if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'EDIT' && $_POST['ENTITY'] == 'ASSIGN_MATTER_TEACHER') { $data = array($_POST['FK_ID_TEACHER'], $_POST['FK_ID_MAIN_COURSE_MATTER'], $_POST['PK_ID_COURSE_HARD'], $_POST['PK_ID_HCOURSE_MATTER_TEACHER']); // ECHO $_POST['PK_ID_HCOURSE_MATTER_TEACHER']; $pk_id = $matterCourse->updateAssignHCourseHardMatterTeacher($data, $idTransaction); if ($pk_id > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'Los Datos de la asignacion materia docente se actualizaron correctamente!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la asignacion materia docente no se pudieron actualizar!'); } } if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'DELETE' && $_GET['ENTITY'] == 'ASSIGN_MATTER_TEACHER') { $data = array($_GET['PK_ID_HCOURSE_MATTER_TEACHER']);
if (file_exists("upload/cuotas/" . $filename)) { unlink("upload/cuotas/" . $filename); } move_uploaded_file($_FILES["archivo"]["tmp_name"], "upload/cuotas/" . $filename); $res = 'OK'; } if ($res == 'OK') { $opcion = $_POST['id_type_notes']; //TIPO DE ESTRUCTURA A CARGAR $filename = "upload/cuotas/" . $filename; $fp = fopen($filename, "r"); $contador = 0; //Transaction $transaction = new Transaction($registry[$nameDataBase]); CourseNotesBallot::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(CourseNotesBallot::$business, CourseNotesBallot::$insert, CourseNotesBallot::$descriptionBusiness)); while (!feof($fp)) { $linea = fgets($fp); $datos = explode("|", $linea); switch ($opcion) { case 1: $student = new Student($db); $id_student = $student->getStudentId($datos[1]); $debt_share = new DebtShare($db); $data = array(1, $id_student, $datos[0], $datos[3], $datos[4], $datos[5]); $id = $debt_share->insertDebtShare($data, $idTransaction); //adicionar la confirmacion o error del insert //adicionar registro de los logs $res = $id; //resultado final break;
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); Country::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Country::$business, Country::$update, Country::$descriptionBusiness)); $data = array($_POST['NAME'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateCountry($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); Country::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Country::$business, Country::$update, Country::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteCountry($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListCountry(); ?> <div class="grid_10">
} elseif ($_POST['status_admission_process'] == 34) { $statusData = array(38, $_POST['fk_id_membership_app_form']); //print_r($statusData); $statusTransactionDBStatus = $formObject->updateMembershipAppFormStatusAddmision($statusData, $idTransaction); } if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'Los Datos de Evaluacion del formulario se guardaron correctamente!' . $messageInsertFormData); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los Datos de Evaluacion del formulario no se pudieron guardar!'); } } if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'EDIT' && isset($_GET['pk_id_admission_process']) && $_GET['pk_id_admission_process'] > 0) { //echo 'entro'; $transaction = new Transaction($registry[$nameDataBase]); AdmissionProcess::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(AdmissionProcess::$business, AdmissionProcess::$insert, AdmissionProcess::$descriptionBusiness)); $statusTransactionDB = $process->reactiveAdmissionProcess($_GET['ID_FORM'], $_GET['pk_id_admission_process']); // El estado en el formulario se coloca a 36='PENDIENTE' $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; }
case 'INSERT': $transaction = new Transaction($registry[$nameDataBase]); SeatReservation::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(SeatReservation::$business, SeatReservation::$insert, SeatReservation::$descriptionBusiness)); $data = array($_POST['pk_id_seat_reservation_period'], $_GET['FK_ID_ASSIGN_HOLDER_STUDENT']); $statusTransactionDB = $seatReservation->insertSeatReservation($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_NEW"], $v_label["DETAIL_MESSAGE_OK_NEW"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_NEW"], $v_label["DETAIL_MESSAGE_NOOK_NEW"]); } break; case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); SeatReservation::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(SeatReservation::$business, SeatReservation::$insert, SeatReservation::$descriptionBusiness)); $data = array($_POST['pk_id_seat_reservation_period'], $_GET['FK_ID_ASSIGN_HOLDER_STUDENT']); $statusTransactionDB = $seatReservation->updateSeatReservation($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; default: break; } // Obtener lista $id_person = 2; if (isset($_SESSION["PK_ID_PERSON"])) { $id_person = $_SESSION["PK_ID_PERSON"];
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ $mainCourse = new MainCourse($registry[$nameDataBase]); $courseHard = new CourseHard($registry[$nameDataBase]); $courseHard = new CourseHard($registry[$nameDataBase]); $matterCourse = new AssignHCourseHardMatterTeacher($registry[$nameDataBase]); $transaction = new Transaction($registry[$nameDataBase]); CourseHard::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(CourseHard::$business, CourseHard::$insert, CourseHard::$descriptionBusiness)); if (isset($_POST['ACTION'])) { if ($_POST['ACTION'] == 'INSERT' && isset($_POST['ENTITY']) && $_POST['ENTITY'] == 'COURSE_HARD') { //INSERCION DE NUEVO CURSO /* NAME_COURSE, DATE_START, DATE_END, COMMENTS_ADITIONAL, FK_ID_PERIOD, FK_ID_MAIN_COURSE, STATUS_COURSE_HARD, * */ $data = array($_POST['NAME_COURSE'], date('Y-m-d', strtotime(str_replace('/', '-', $_POST['DATE_START']))), date('Y-m-d', strtotime(str_replace('/', '-', $_POST['DATE_END']))), $_POST['COMMENTS_ADITIONAL'], $_POST['FK_ID_PERIOD'], $_POST['FK_ID_MAIN_COURSE'], $_POST['STATUS_COURSE_HARD']); $pk_id_course_hard = $courseHard->insertCourseHard($data, $idTransaction); $listMatterCourse = $matterCourse->getListAssignCourseMatterByCourseHard($pk_id_course_hard); foreach ($listMatterCourse as $item) { //fk_id_teacher, fk_id_main_course_matter, fk_id_course_hard $data = array(null, $item['pk_id_main_course_matter'], $pk_id_course_hard); $pk_id = $matterCourse->insertAssignHCourseHardMatterTeacher($data, $idTransaction); }
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); Location::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Location::$business, Location::$update, Location::$descriptionBusiness)); $data = array($_POST['NAME'], $_POST['ID_CITY'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateLocation($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); Location::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Location::$business, Location::$update, Location::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteLocation($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListLocation(); ?> <div class="grid_10">
PlanificationActivity::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(PlanificationActivity::$business, PlanificationActivity::$insert, PlanificationActivity::$descriptionBusiness)); $data = array($_POST['activity'], date('Y-m-d', strtotime(str_replace('/', '-', $_POST['activity_start_datetime']))), date('Y-m-d', strtotime(str_replace('/', '-', $_POST['activity_end_datetime']))), $_POST['activity_description'], $_POST['pk_id_type_planification_activity'], $_POST['pk_id_hcourse_matter_teacher'], $_POST['pk_id_planification_activity']); $res = $activity->updatePlanificationActivity($data, $idTransaction); if ($res > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'La actividad se actualizo exitosamente!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la actividad no se pudieron actualizar!'); } } //ELIMINAR if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'DELETE' && isset($_GET['DELETE'])) { $res = 0; $transaction = new Transaction($registry[$nameDataBase]); PlanificationActivity::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(PlanificationActivity::$business, PlanificationActivity::$insert, PlanificationActivity::$descriptionBusiness)); $res = $activity->deletePlanificationActivity(array($_GET['DELETE']), $idTransaction); if ($res > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'La actividad fue eliminada correctamente!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la actividad no se pueden eliminar!!!!!!'); } } $_SESSION['PK_ID_COURSE_HARD'] = $_GET['PK_ID_COURSE_HARD']; //if($_SESSION['pk_id_role']==ROLE_TITULAR) $list = $activity->getListActivityByHolder($_SESSION['pk_id_holder']); //if($_SESSION['pk_id_role']==ROLE_PROFESOR) $list = $activity->getListActivityByTeacherCourseHard($_GET['PK_ID_COURSE_HARD'],$_SESSION['pk_id_person'] ); ?> <div class="grid_10"> <div class="box round first"> <h2><?php
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); Gender::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Gender::$business, Gender::$update, Gender::$descriptionBusiness)); $data = array($_POST['NAME'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateGender($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); Gender::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Gender::$business, Gender::$update, Gender::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteGender($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListGender(); ?> <div class="grid_10">
</script> <?php //getListAssignHCourseHardMatterTeacherByCourseHard $consultation = new Consultations($registry[$nameDataBase]); $whosConsultation = $consultation->getWhosConsultationByRole($_SESSION["pk_id_educational_role"]); if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'INSERT' && $_POST['ENTITY'] == 'COURSE_CONSULTATION' && count($whosConsultation) > 0) { //1 id area del flujo par ainiciar conslta $flowData = $consultation->getListAllFlowData($_SESSION["pk_id_educational_role"], 1); $flowData = $flowData[0]; $res = 0; $whosConsultation = $whosConsultation[0]; // $holder = new Holder($instanceDataBase) $transaction = new Transaction($registry[$nameDataBase]); Consultations::setDataOperationBusiness($registry[$nameDataBase]); $matterCourse = new AssignHCourseHardMatterTeacher($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Consultations::$business, Consultations::$insert, Consultations::$descriptionBusiness)); /* * subject, consultation, datetime_consultation, fk_id_hcourse_matter_teacher, fk_id_flow_type_query, fk_id_educational_role, cons_fk_id_teacher, cons_fk_id_holder, cons_fk_id_student, fk_id_response_area, satisfy_fk_id_response, */ $pk_id_student = null; if ($_POST['cons_fk_id_student'] > 0) { $pk_id_student = $_POST['cons_fk_id_student']; } $pk_id_holder = null; if ($_POST['cons_fk_id_holder'] > 0) { $pk_id_holder = $_POST['cons_fk_id_holder']; } $dataAssignHCourseMatterTEacher = $matterCourse->getListAssignHCourseHardMatterTeacher($_POST['fk_id_hcourse_matter_teacher']);
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); MainCourse::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(MainCourse::$business, MainCourse::$update, MainCourse::$descriptionBusiness)); $data = array($_POST['name'], $_POST['course_code'], $_POST['description'], $_POST['is_abstract_course'], $_POST['is_course_configuration'], $_POST['status_main_course'], $_POST['data_1'], $_POST['data_2'], $_POST['data_3'], $_POST['data_4'], $_POST['data_5'], $_POST['pk_id_main_course']); $statusTransactionDB = $catalog->updateMainCourse($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); MainCourse::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(MainCourse::$business, MainCourse::$update, MainCourse::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteMainCourse($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListMainCourse(); ?> <div class="grid_10">
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); Profession::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Profession::$business, Profession::$update, Profession::$descriptionBusiness)); $data = array($_POST['NAME'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateProfession($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); Profession::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Profession::$business, Profession::$update, Profession::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteProfession($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListProfession(); ?> <div class="grid_10">
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); MaritalStatus::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(MaritalStatus::$business, MaritalStatus::$update, MaritalStatus::$descriptionBusiness)); $data = array($_POST['NAME'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateMaritalStatus($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); MaritalStatus::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(MaritalStatus::$business, MaritalStatus::$update, MaritalStatus::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteMaritalStatus($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListMaritalStatus(); ?> <div class="grid_10">
case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); Holder::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Holder::$business, Holder::$update, Holder::$descriptionBusiness)); $data = array($_GET['DELETE']); //$statusTransactionDB = $catalog->deleteTeacher($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; case 'ASIGNAR_DEPENDIENTES': $transaction = new Transaction($registry[$nameDataBase]); Holder::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Holder::$business, Holder::$insert, Holder::$descriptionBusiness)); $query = null; $dateTimeNowRow = null; $dateTimeNow = null; try { $query = "select DATE_FORMAT(CURRENT_TIMESTAMP(),'%Y-%m-%d %H:%i:%s') datetime"; $result = DataBase::getArrayListQuery($query, array(), $registry[$nameDataBase]); $dateTimeNowRow = $result[0]; $dateTimeNow = $dateTimeNowRow['datetime']; } catch (PDOException $e) { echo 'Error JF-Model-0011: ' . $e->getMessage(); } //echo 'ESTUDIANTE='.$_POST['student']; /* $data = array( $dateTimeNow,
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); Teacher::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Teacher::$business, Teacher::$update, Teacher::$descriptionBusiness)); $data = array($_POST['TEACHER_STATUS'], $_POST['pk_id_person'], $_POST['data_1'], $_POST['data_2'], $_POST['data_3'], $_POST['data_4'], $_POST['data_5'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateTeacher($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); Teacher::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Teacher::$business, Teacher::$update, Teacher::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteTeacher($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListLevelMainCourse(); ?> <div class="grid_10">
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); TypeIdentifyDoc::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(TypeIdentifyDoc::$business, TypeIdentifyDoc::$update, TypeIdentifyDoc::$descriptionBusiness)); $data = array($_POST['NAME'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateTypeIdentityDoc($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); TypeIdentifyDoc::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(TypeIdentifyDoc::$business, TypeIdentifyDoc::$update, TypeIdentifyDoc::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteTypeDirection($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListTypeIdentifyDoc(); ?> <div class="grid_10">
case 'EDIT': $transaction = new Transaction($registry[$nameDataBase]); TypeContact::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(TypeContact::$business, TypeContact::$update, TypeContact::$descriptionBusiness)); $data = array($_POST['NAME'], $_POST['EDIT']); $statusTransactionDB = $catalog->updateTypeContact($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); TypeContact::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(TypeContact::$business, TypeContact::$update, TypeContact::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteTypeContact($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListTypeContact(); ?> <div class="grid_10">
} $delete = @split(',', $_POST['bill_din_delete_array']); //print_r($delete); foreach ($delete as $del) { $res = $bill->deleteBillingData(array($del), $idTransaction); } } if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'Los Datos de la Persona se actualizaron correctamente!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la persona no se pudieron actualizar!'); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); Person::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Person::$business, Person::$insert, Person::$descriptionBusiness)); $data1 = array($_GET['PK_ID_PERSON']); $pk_id_person = $person->deletePerson($data1, $idTransaction); if ($pk_id_person > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'Los datos de la persona fueron eliminaos!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la persona no se pudieron eliminar!!'); } break; default: break; } ?>
if (isset($_POST['id_hm_3']) && isset($_POST['nombre_hm_3'])) { $idmh3 = $hnos->updateKindBrother($data_m_h3, $idTransaction); } if (empty($_POST['id_hm_3']) && isset($_POST['nombre_hm_3'])) { $data_m_h3 = array($_POST['EDIT'], 29, $_POST['nombre_hm_3'], $fch_nac_hm_3, $_POST['colegio_hm_3'], $_POST['universidad_hm_3'], $_POST['trabajo_hm_3']); $idmh3 = $hnos->insertKindBrother($data_m_h3, $idTransaction); } Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]); } break; case 'DELETE': $transaction = new Transaction($registry[$nameDataBase]); MembershipAppForm::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(MembershipAppForm::$business, MembershipAppForm::$update, MembershipAppForm::$descriptionBusiness)); $data = array($_GET['DELETE']); $statusTransactionDB = $catalog->deleteMembershipAppForm($data, $idTransaction); if ($statusTransactionDB > 0) { Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]); } else { Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]); } break; default: break; } // Obtener lista $list = $catalog->getListMembershipAppForm(); ?> <div class="grid_10">
} } else { if ($res > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'La Tarea se actualizo exitosamente!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la Tarea no se pudieron actualizar!'); } } } //Calificar Tarea - Profesor if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'INSERT' && isset($_GET['ENTITY']) && $_GET['ENTITY'] == 'QUALIFY') { $res = 0; $student_task = new StudentTask($registry[$nameDataBase]); $transaction = new Transaction($registry[$nameDataBase]); StudentTask::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(StudentTask::$business, StudentTask::$insert, StudentTask::$descriptionBusiness)); for ($i = 0; $i < $_POST['cantidad']; $i++) { $res = $student_task->updateStudentTask(array($_POST['score_achieved_' . $i], $_POST['pk_id_student_task_' . $i]), $idTransaction); } if ($res > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'La Calificacion Para el Estudiante se Actualizo correctamente !'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'La Calificacion Para el Estudiante no Pudo Realizarse!'); } } $_SESSION['PK_ID_COURSE_HARD'] = $_GET['PK_ID_COURSE_HARD']; ?> <div class="grid_10"> <div class="box round first"> <h2><?php