query("SELECT nome_servidor FROM configuracoes LIMIT 1"); $res_nome = $stmt_nome->fetchColumn(); if($res_nome) $nome_painel = $res_nome; } catch(Exception $e){} // ================================== $pg = basename($_SERVER['PHP_SELF']); $user_role = $_SESSION['role'] ?? 'reseller'; if (!isset($_SESSION['role']) && isset($_SESSION['user_id']) && $_SESSION['user_id'] == 1) { $user_role = 'admin'; } $is_admin = ($user_role === 'admin'); $content_pages = ['channels.php', 'movies.php', 'series.php', 'importer.php', 'categories.php', 'atualizar_tmdb.php', 'importar_epg.php', 'bouquets.php']; $is_content_active = in_array($pg, $content_pages); // ADICIONEI 'servers.php' AQUI NA LISTA PARA MANTER O MENU ABERTO $system_pages = ['manager.php', 'tools.php', 'mover.php', 'firewall.php', 'system_logs.php', 'config_painel.php', 'server_monitor.php', 'servers.php']; $is_system_active = in_array($pg, $system_pages); // IPTV Clients $client_pages = ['clients.php', 'monitor.php', 'migrar.php', 'migrar_clientes.php']; $is_clients_active = in_array($pg, $client_pages); // P2P Clients $p2p_pages = ['p2p_manager.php']; $is_p2p_active = in_array($pg, $p2p_pages); // Resellers $reseller_pages = ['resellers.php']; $is_resellers_active = in_array($pg, $reseller_pages); // Automação $automacao_pages = ['chatbot.php']; $is_automacao_active = in_array($pg, $automacao_pages); ?>