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
/
aircan3
/
app
/
models
/
Viewing: Servicio.php
<?php /** * Modelo Servicio */ class Servicio extends Model { /** * Obtener todos los servicios */ public function getAll(): array { $sql = "SELECT * FROM servicios ORDER BY id DESC"; return $this->fetchAll($sql); } /** * Obtener servicio por ID */ public function getById(int $id): array|false { $sql = "SELECT * FROM servicios WHERE id = :id LIMIT 1"; return $this->fetchOne($sql, ['id' => $id]); } /** * Crear un nuevo servicio */ public function create(array $data): string { $sql = "INSERT INTO servicios (nombre, descripcion, precio, imagen) VALUES (:nombre, :descripcion, :precio, :imagen)"; $this->query($sql, [ 'nombre' => $data['nombre'], 'descripcion' => $data['descripcion'], 'precio' => $data['precio'], 'imagen' => $data['imagen'] ?? null, ]); return $this->lastInsertId(); } /** * Actualizar servicio */ public function update(int $id, array $data): void { $fields = []; $params = ['id' => $id]; foreach (['nombre', 'descripcion', 'precio', 'imagen'] as $field) { if (array_key_exists($field, $data)) { $fields[] = "{$field} = :{$field}"; $params[$field] = $data[$field]; } } if (empty($fields)) return; $sql = "UPDATE servicios SET " . implode(', ', $fields) . " WHERE id = :id"; $this->query($sql, $params); } /** * Eliminar servicio */ public function delete(int $id): void { $sql = "DELETE FROM servicios WHERE id = :id"; $this->query($sql, ['id' => $id]); } /** * Contar total de servicios */ public function count(): int { $sql = "SELECT COUNT(*) as total FROM servicios"; $result = $this->fetchOne($sql); return (int) ($result['total'] ?? 0); } }
Coded With 💗 by
0x6ick