Joywork/ajax/getReservationFlatConditionsTabData.php

45 lines
1.5 KiB
PHP
Raw Normal View History

2026-05-22 20:21:54 +02:00
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . "/config.php");
include $_SERVER['DOCUMENT_ROOT'] . '/import/reservation/ApartmentHistory.php';
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/ImportRecord.php';
include $_SERVER['DOCUMENT_ROOT'] . '/import/document/target/DocTarget.php';
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/Apartment.php';
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/Block.php';
include $_SERVER['DOCUMENT_ROOT'] . '/import/reservation/state/IReservationState.php';
include $_SERVER['DOCUMENT_ROOT'] . '/import/reservation/Reservation.php';
include $_SERVER['DOCUMENT_ROOT'] . '/import/reservation/state/BaseState.php';
include $_SERVER['DOCUMENT_ROOT'] . '/import/reservation/state/StateNew.php';
if ($_SESSION['id'] && $_GET['id'] && is_numeric($_GET['id'])) {
$get = clearInputData($_GET);
$reservationId = $get['id'];
$reservation = Reservation::findOne($reservationId);
if ($reservation && $reservation->user_id == $_SESSION['id']) {
$apartmentHistory = new ApartmentHistory();
$storedData = $apartmentHistory->getData($reservationId);
$block = unserialize($storedData['block']);
?>
<div class="flat__text">
<div class="0">
<?php
if ($block->additional) {
echo $block->additional;
} else {
echo "<p>Не указаны</p>";
}
?>
</div>
</div>
<?php
}
}
?>