/**
  * This is construct base of the class.
  *
  * A public constructor; initializes the variable $instanceDataBase.
  *
  */
 public function __construct($instanceDataBase)
 {
     parent::__construct($instanceDataBase);
     DebtShare::setDataOperationBusiness($instanceDataBase);
     DebtShare::getBusiness();
     DebtShare::getDescriptionBusiness();
 }
     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 2:
             $student = new Student($db);
             $id_student = $student->getStudentId($datos[0]);
             $debt_share = new DebtShare($db);
             $data = array(2, $id_student, $datos[0], $datos[3], $datos[4], $datos[5]);
             //corregir esto la estructura de la tabla es diferente
             $id = $debt_share->insertDebtShare($data, $idTransaction);
             //adicionar la confirmacion o error del insert
             //adicionar registro de los logs
             $res = $id;
             //resultado final
             break;
     }
     $contador = $contador + 1;
 }
 if ($res > 0) {
     $msg = "<br>Total Registros Cargados: " . $contador;
     Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_UPLOAD"], $v_label["DETAIL_MESSAGE_OK_UPLOAD"] . $msg);
 } else {
</script> 
<?php 
$action = 'INSERT';
if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'EDIT') {
    $action = $_GET['ACTION'];
}
$preview_flag = 0;
$seatReserPeriod = new SeatReservationPeriod($registry[$nameDataBase]);
$listPeriods = $seatReserPeriod->getListSeatReservationPeriod();
$data = array();
if ($action == 'EDIT') {
    if (isset($_SESSION['pk_id_assign_holder_student'])) {
        $data['pk_id_student'] = $_SESSION['pk_id_assign_holder_student'];
    }
}
$deb = new DebtShare($registry[$nameDataBase]);
$list = $deb->getListDebtShareStudentHolder($_SESSION['fk_id_student']);
?>

<form id="course_data_form" method="POST" action="" enctype="multipart/form-data" >
<table class="form">

    <input type="hidden" name="ACTION" value="<?php 
echo $action;
?>
" >                        

    <?php 
if ($action == 'EDIT') {
    ?>
    <input type="hidden" name="FK_ID_STUDENT" value="<?php