getAdminLog(); $unified = []; foreach($adminLogs as $l) { // FIX: sΔƒrim peste unban-urile din log-ul vechi, le luΔƒm doar din banlist if(stripos($l['log'], 'unbanned') !== false || stripos($l['log'], 'unban') !== false) { continue; } $unified[] = [ 'id' => $l['id'], 'time' => $l['time'], 'user' => $l['user'], 'type' => 'admin', 'text' => $l['log'] ]; } // 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'], 'time' => $b['time'], 'user' => $b['admin'] ?: 1, 'type' => 'ban', 'text' => "Banned user {$b['name']} (Reason: {$b['reason']})", 'active' => $b['active'] ]; // 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 ]; } } usort($unified, function($a,$b){ return $b['time'] <=> $a['time']; }); $unified = array_slice($unified, 0, 300); $perPage = 20; $page = isset($_GET['pg']) ? max(1,intval($_GET['pg'])) : 1; $total = count($unified); $totalPages = ceil($total / $perPage); $offset = ($page-1) * $perPage; $paged = array_slice($unified, $offset, $perPage); 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'])); // FIX: prinde orice unban din text if (strpos($t,'unban')!==false) return ['UNBAN','cat-unban','πŸ”“']; if (strpos($t,'mass ban')!==false) return ['BAN','cat-ban','πŸ”¨']; 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','πŸ“']; } ?>

πŸ“‹ Unified Admin Log – last 300 actions

getUserField($admid, "username", 0); $adminLink = $username ? ''.htmlspecialchars($username).'' : 'SYSTEM'; if($username == 'Multihunter') $adminLink = 'CONTROL PANEL'; list($cat,$class,$icon) = logCategory($e); $date = date("d.m.Y H:i:s", $e['time'] + 3600*2); $details = $e['text']; ?>
ID Admin Categorie Detalii Data
#
1){ ?>Β« Prev / Next Β»