plugin_path . 'includes/models/methods-api.php'; $method = new Methods(); include $controller->plugin_path . 'includes/translations/translations.php'; $txt = new Translation; $booking_id = sanitize_text_field($_POST['param1']); global $wpdb; $booking = $wpdb->prefix . 'hotel_has_booking'; $query_result = $wpdb->get_results("SELECT * FROM `$booking` WHERE `booking_id` = $booking_id ", ARRAY_A); foreach ($query_result as $row): ?>
txt("Booking detail") ?>
txt("Room allocation") ?>
has_get_booking_allocated_rooms($booking_id); foreach ($booking_rooms as $row2): ?>
txt("Room") ?> txt("Date") ?> txt("Price") ?>
has_get_room_name($row2['room_id']); ?> -

has_get_services(); foreach ($services as $row): // check if this service is included in this booking $service_id = $row['service_id']; $service_included = false; $table = $wpdb->prefix . 'hotel_has_booking_service'; $wpdb->get_results("SELECT * FROM $table WHERE `booking_id` = $booking_id AND `service_id` = $service_id"); if ($wpdb->num_rows > 0){ $service_included = true; $booking_service_detail = $wpdb->get_row("SELECT * FROM $table WHERE `booking_id` = $booking_id AND `service_id` = $service_id", ARRAY_A); if ($booking_service_detail['type'] == '2'){ $guest_number = $booking_service_detail['guest_number']; } if ($booking_service_detail['type'] == '3'){ $night_number = $booking_service_detail['night_number']; } } ?>
txt('checked'); } ?>> has_currency($row['price']); if ($row['type'] == '2'){ echo '/' . $txt->txt('guest'); } if ($row['type'] == '3'){ echo '/'. $txt->txt('night'); } ?>