/** * This is construct base of the class. * * A public constructor; initializes the variable $instanceDataBase. * */ public function __construct($instanceDataBase) { parent::__construct($instanceDataBase); SeatReservation::setDataOperationBusiness($instanceDataBase); SeatReservation::getBusiness(); SeatReservation::getDescriptionBusiness(); }
<?php //include_once 'reservation_save_script.php'; if (isset($_GET['pk_id_assign_holder_student'])) { $id_assign = $_GET['FK_ID_ASSIGN_HOLDER_STUDENT']; } $action = 'LIST'; if (isset($_POST['ACTION'])) { $action = $_POST['ACTION']; } else { if (isset($_GET['ACTION'])) { $action = $_GET['ACTION']; } } $user = new User($registry[$nameDataBase]); $catalog = new Student($registry[$nameDataBase]); $seatReservation = new SeatReservation($registry[$nameDataBase]); // Simplificar la ruta de propiedades $v_label = $property["pages"]["course/reservation_admin"]; $v_label_list = $property["pages"]["general_list"]; // Simplificar el ruteo de edicion/visualizacion $v_route_edit_preview = 'index.php?page=course/reservation'; // Simplificar el ruteo de insert $v_route_insert = '?page=tools/reservation'; // Simplificar el ruteo de lista $v_route_list = 'index.php?page=course/reservation_admin'; switch ($action) { 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']);