getAdminLog(); $unified = []; foreach($adminLogs as $l) { $unified[] = [ 'id' => $l['id'], 'time' => $l['time'], 'user' => $l['user'], 'type' => 'admin', 'text' => $l['log'] ]; } // 2. Ban-uri și Unban-uri din banlist $banQ = mysqli_query($GLOBALS["link"], " SELECT id, uid, name, reason, time, end, admin, active FROM ".TB_PREFIX."banlist ORDER BY time DESC LIMIT 300 "); while($b = mysqli_fetch_assoc($banQ)) { // BAN $unified[] = [ 'id' => 1000000 + $b['id'], // offset ca să nu se amestece ID-urile 'time' => $b['time'], 'user' => $b['admin'] ?: 1, 'type' => 'ban', 'text' => "Banned user {$b['name']} (Reason: {$b['reason']})", 'active' => $b['active'] ]; // UNBAN - dacă e inactiv, folosim end ca timp de unban if($b['active'] == 0 && $b['end'] > $b['time']) { $unified[] = [ 'id' => 2000000 + $b['id'], 'time' => $b['end'], 'user' => $b['admin'] ?: 1, 'type' => 'unban', 'text' => "Unbanned user {$b['name']}", 'active' => 0 ]; } } // 3. Sortează tot după timp DESC usort($unified, function($a,$b){ return $b['time'] <=> $a['time']; }); $unified = array_slice($unified, 0, 300); function logCategory($entry) { if($entry['type']=='ban') return ['BAN','cat-ban','🔨']; if($entry['type']=='unban') return ['UNBAN','cat-unban','🔓']; $t = strtolower(strip_tags($entry['text'])); if (strpos($t,'mass ban')!==false) return ['BAN','cat-ban','🔨']; if (strpos($t,'mass unban')!==false) return ['UNBAN','cat-unban','🔓']; if (strpos($t,'gold')!==false) return ['GOLD','cat-gold','💰']; if (strpos($t,'plus')!==false && strpos($t,'bonus')===false) return ['PLUS','cat-plus','⭐']; if (strpos($t,'bonus')!==false) return ['BONUS','cat-plus','📈']; if (strpos($t,'reset')!==false) return ['RESET','cat-maint','⚙️']; if (strpos($t,'village')!==false || strpos($t,'buildings')!==false || strpos($t,'renamed')!==false) return ['VILLAGE','cat-village','🏘️']; if (strpos($t,'message')!==false) return ['MESSAGE','cat-msg','✉️']; return ['OTHER','cat-other','📝']; } ?>
| ID | Admin | Categorie | Detalii | Data |
|---|---|---|---|---|
| # |
Afișate doar ultimele . Pentru istoric complet, exportă din phpMyAdmin tabelul s1_admin_log.