<?php  // Headers específicos para LiteSpeed Cache header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0'); header('Pragma: no-cache'); header('Expires: Thu, 01 Jan 1970 00:00:00 GMT');  // Headers específicos para LiteSpeed if (function_exists('litespeed_purge_all')) {     header('X-LiteSpeed-Cache-Control: no-cache'); }  // Desabilitar cache do WordPress para este arquivo if (!defined('DONOTCACHEPAGE')) {     define('DONOTCACHEPAGE', true); } if (!defined('DONOTCACHEOBJECT')) {     define('DONOTCACHEOBJECT', true); } if (!defined('DONOTCACHEDB')) {     define('DONOTCACHEDB', true); }  // Verificar se existe um parâmetro para forçar atualização do cookie $force_refresh = isset($_GET['refresh_user']) || isset($_POST['refresh_user']);  // Tentar obter o cookie de diferentes formas $idpessoacode = null;  // Método 1: Cookie tradicional if (isset($_COOKIE['idpessoacode']) && !empty($_COOKIE['idpessoacode'])) {     $idpessoacode = sanitize_text_field($_COOKIE['idpessoacode']); }  // Método 2: Verificar via JavaScript se o cookie não foi encontrado if (empty($idpessoacode)) {     echo '<script>         // Tentar obter cookie via JavaScript         function getCookie(name) {             let value = "; " + document.cookie;             let parts = value.split("; " + name + "=");             if (parts.length == 2) return parts.pop().split(";").shift();             return null;         }                  let cookieValue = getCookie("idpessoacode");         if (cookieValue && cookieValue !== "") {             // Reenviar via POST se encontrou cookie no JS             let form = document.createElement("form");             form.method = "POST";             form.style.display = "none";                          let input = document.createElement("input");             input.name = "js_cookie_value";             input.value = cookieValue;             form.appendChild(input);                          let refresh = document.createElement("input");             refresh.name = "refresh_user";             refresh.value = "1";             form.appendChild(refresh);                          document.body.appendChild(form);             form.submit();         }     </script>'; }  // Método 3: Verificar se foi enviado via POST do JavaScript if (empty($idpessoacode) && isset($_POST['js_cookie_value']) && !empty($_POST['js_cookie_value'])) {     $idpessoacode = sanitize_text_field($_POST['js_cookie_value']); }  // Debug (remover em produção) error_log('Cookie idpessoacode: ' . ($idpessoacode ? $idpessoacode : 'não encontrado'));  if (!empty($idpessoacode)) {     $url = "https://cmsv3.portasabertas.org.br/api/pessoas/mev3";      $headers = [         'Authorization' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJNREV5VW10R1ZGWkZUazVWZHowOVRXcEJNRTlCUFQwIn0=.sR2PWTqcv/2a1efuM7mlshQ0hEkCGRnV0HmVi7rzQro=',          'Content-Type'  => 'application/json',         'Cache-Control' => 'no-cache',         'User-Agent' => 'WordPress/' . get_bloginfo('version') . '; ' . get_bloginfo('url')     ];      $body = json_encode([         'idpessoacode' => $idpessoacode     ]);      // Adicionar timestamp para evitar cache na API     $response = wp_remote_post($url . '?t=' . time(), [         'headers' => $headers,         'body'    => $body,         'timeout' => 15,         'sslverify' => true,         'blocking' => true,         'httpversion' => '1.1'     ]);      if (!is_wp_error($response)) {         $response_code = wp_remote_retrieve_response_code($response);         $body_response = wp_remote_retrieve_body($response);                  // Debug da resposta (remover em produção)         error_log('Response code: ' . $response_code);         error_log('Response body: ' . $body_response);                  $data = json_decode($body_response, true);          if (!empty($data) && isset($data['data']['despessoa'])) {             $nome   = esc_html($data['data']['despessoa']);             $imagem = !empty($data['data']['desimage'])                          ? esc_url($data['data']['desimage'])                          : "https://sitepa.s3.amazonaws.com/wp-content/uploads/br/2025/09/Vertical-container-1.avif";              // Adicionar um identificador único para evitar cache do browser             $cache_buster = '?v=' . time();             if (strpos($imagem, '?') !== false) {                 $cache_buster = '&v=' . time();             }              // Usuário logado             echo '             <div class="user-menu" style="position:relative;display:inline-block;" data-user-loaded="true">                 <div class="user-box" style="display:flex;align-items:center;gap:8px;cursor:pointer;" onclick="toggleUserDropdown(this)">                     <img src="'.$imagem.$cache_buster.'" alt="'.$nome.'" style="width:35px;height:35px;border-radius:50%;object-fit:cover;" onload="this.style.opacity=1" style="opacity:0;transition:opacity 0.3s;">                     <span style="font-size:14px;">Hola, <strong>'.$nome.'</strong></span>                     <img src="https://sitepa.s3.amazonaws.com/wp-content/uploads/br/2025/09/Arrows-Diagrams.svg" alt="Seta" style="width:25px;height:25px;">                 </div>                 <div class="user-dropdown" style="display:none;position:absolute;right:0;top:100%;background:#fff;border:1px solid #ddd;border-radius:6px;box-shadow:0 2px 6px rgba(0,0,0,0.15);min-width:200px;z-index:999;">                     <a href="https://parceiro.portasabertas.org.br/" style="display:flex;align-items:center;gap:6px;padding:10px;color:#333;text-decoration:none;font-size:14px;">                         <img src="https://sitepa.s3.amazonaws.com/wp-content/uploads/br/2025/09/login-enter-arrow-right-circle.svg" alt="Área restrita" style="width:16px;height:16px;">                         Acceder al portal                     </a>                                      </div>             </div>              <script>             function toggleUserDropdown(element) {                 let dropdown = element.nextElementSibling;                 dropdown.style.display = dropdown.style.display === "block" ? "none" : "block";             }              function refreshUserData() {                 window.location.href = window.location.href + (window.location.href.includes("?") ? "&" : "?") + "refresh_user=1";             }              // Fechar dropdown ao clicar fora             document.addEventListener("click", function(e) {                 document.querySelectorAll(".user-dropdown").forEach(function(drop){                     if (!drop.previousElementSibling.contains(e.target)) {                         drop.classList.remove("show");                         drop.style.display = "none";                     }                 });             });              // Verificar se o usuário foi carregado corretamente             document.addEventListener("DOMContentLoaded", function() {                 if (!document.querySelector("[data-user-loaded]")) {                     console.log("Usuário não carregado, tentando novamente em 2 segundos...");                     setTimeout(function() {                         window.location.reload();                     }, 2000);                 }             });             </script>             ';         } else {             // Dados inválidos na API             error_log('Dados inválidos retornados pela API: ' . json_encode($data));             showFallbackLogin();         }     } else {         // Erro na API         error_log('Erro na API: ' . $response->get_error_message());         showFallbackLogin();     } } else {     // Sem cookie     showFallbackLogin(); }  // Função para mostrar o fallback de login function showFallbackLogin() {     echo '<div class="user-login" style="display:flex;align-items:center;gap:10px;">';     echo '<img src="https://sitepa.s3.amazonaws.com/wp-content/uploads/br/2025/09/Vertical-container-1.avif" alt="Login" style="width:35px;height:35px;">';     echo '<a href="https://auth.parceiro.portasabertas.org.br/login">Entrar</a>';     echo '<span class="header__divider">|</span>';     echo '<a href="https://auth.parceiro.portasabertas.org.br/cadastro">Regístrate</a>';     echo '</div>'; }  // CSS adicional para melhorar a experiência echo '<style> .user-menu img {     transition: opacity 0.3s ease-in-out; } .user-dropdown.show {     display: block !important; } </style>'; ?>
.header__divider {   color: #D0D5DD; }  .user-login {   color: #101828; }
<?php  // Headers específicos para LiteSpeed Cache header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0'); header('Pragma: no-cache'); header('Expires: Thu, 01 Jan 1970 00:00:00 GMT');  // Headers específicos para LiteSpeed if (function_exists('litespeed_purge_all')) {     header('X-LiteSpeed-Cache-Control: no-cache'); }  // Desabilitar cache do WordPress para este arquivo if (!defined('DONOTCACHEPAGE')) {     define('DONOTCACHEPAGE', true); } if (!defined('DONOTCACHEOBJECT')) {     define('DONOTCACHEOBJECT', true); } if (!defined('DONOTCACHEDB')) {     define('DONOTCACHEDB', true); }  // Verificar se existe um parâmetro para forçar atualização do cookie $force_refresh = isset($_GET['refresh_user']) || isset($_POST['refresh_user']);  // Tentar obter o cookie de diferentes formas $idpessoacode = null;  // Método 1: Cookie tradicional if (isset($_COOKIE['idpessoacode']) && !empty($_COOKIE['idpessoacode'])) {     $idpessoacode = sanitize_text_field($_COOKIE['idpessoacode']); }  // Método 2: Verificar via JavaScript se o cookie não foi encontrado if (empty($idpessoacode)) {     echo '<script>         // Tentar obter cookie via JavaScript         function getCookie(name) {             let value = "; " + document.cookie;             let parts = value.split("; " + name + "=");             if (parts.length == 2) return parts.pop().split(";").shift();             return null;         }                  let cookieValue = getCookie("idpessoacode");         if (cookieValue && cookieValue !== "") {             // Reenviar via POST se encontrou cookie no JS             let form = document.createElement("form");             form.method = "POST";             form.style.display = "none";                          let input = document.createElement("input");             input.name = "js_cookie_value";             input.value = cookieValue;             form.appendChild(input);                          let refresh = document.createElement("input");             refresh.name = "refresh_user";             refresh.value = "1";             form.appendChild(refresh);                          document.body.appendChild(form);             form.submit();         }     </script>'; }  // Método 3: Verificar se foi enviado via POST do JavaScript if (empty($idpessoacode) && isset($_POST['js_cookie_value']) && !empty($_POST['js_cookie_value'])) {     $idpessoacode = sanitize_text_field($_POST['js_cookie_value']); }  // Debug (remover em produção) error_log('Cookie idpessoacode: ' . ($idpessoacode ? $idpessoacode : 'não encontrado'));  if (!empty($idpessoacode)) {     $url = "https://cmsv3.portasabertas.org.br/api/pessoas/mev3";      $headers = [         'Authorization' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJNREV5VW10R1ZGWkZUazVWZHowOVRXcEJNRTlCUFQwIn0=.sR2PWTqcv/2a1efuM7mlshQ0hEkCGRnV0HmVi7rzQro=',          'Content-Type'  => 'application/json',         'Cache-Control' => 'no-cache',         'User-Agent' => 'WordPress/' . get_bloginfo('version') . '; ' . get_bloginfo('url')     ];      $body = json_encode([         'idpessoacode' => $idpessoacode     ]);      // Adicionar timestamp para evitar cache na API     $response = wp_remote_post($url . '?t=' . time(), [         'headers' => $headers,         'body'    => $body,         'timeout' => 15,         'sslverify' => true,         'blocking' => true,         'httpversion' => '1.1'     ]);      if (!is_wp_error($response)) {         $response_code = wp_remote_retrieve_response_code($response);         $body_response = wp_remote_retrieve_body($response);                  // Debug da resposta (remover em produção)         error_log('Response code: ' . $response_code);         error_log('Response body: ' . $body_response);                  $data = json_decode($body_response, true);          if (!empty($data) && isset($data['data']['despessoa'])) {             $nome   = esc_html($data['data']['despessoa']);             $imagem = !empty($data['data']['desimage'])                          ? esc_url($data['data']['desimage'])                          : "https://sitepa.s3.amazonaws.com/wp-content/uploads/br/2025/09/Vertical-container-1.avif";              // Adicionar um identificador único para evitar cache do browser             $cache_buster = '?v=' . time();             if (strpos($imagem, '?') !== false) {                 $cache_buster = '&v=' . time();             }              // Usuário logado             echo '             <div class="user-menu" style="position:relative;display:inline-block;" data-user-loaded="true">                 <div class="user-box" style="display:flex;align-items:center;gap:8px;cursor:pointer;" onclick="toggleUserDropdown(this)">                     <img src="'.$imagem.$cache_buster.'" alt="'.$nome.'" style="width:35px;height:35px;border-radius:50%;object-fit:cover;" onload="this.style.opacity=1" style="opacity:0;transition:opacity 0.3s;">                     <span style="font-size:14px;">Hola, <strong>'.$nome.'</strong></span>                     <img src="https://sitepa.s3.amazonaws.com/wp-content/uploads/br/2025/09/Arrows-Diagrams.svg" alt="Seta" style="width:25px;height:25px;">                 </div>                 <div class="user-dropdown" style="display:none;position:absolute;right:0;top:100%;background:#fff;border:1px solid #ddd;border-radius:6px;box-shadow:0 2px 6px rgba(0,0,0,0.15);min-width:200px;z-index:999;">                     <a href="https://parceiro.portasabertas.org.br/" style="display:flex;align-items:center;gap:6px;padding:10px;color:#333;text-decoration:none;font-size:14px;">                         <img src="https://sitepa.s3.amazonaws.com/wp-content/uploads/br/2025/09/login-enter-arrow-right-circle.svg" alt="Área restrita" style="width:16px;height:16px;">                         Acceder al portal                     </a>                                      </div>             </div>              <script>             function toggleUserDropdown(element) {                 let dropdown = element.nextElementSibling;                 dropdown.style.display = dropdown.style.display === "block" ? "none" : "block";             }              function refreshUserData() {                 window.location.href = window.location.href + (window.location.href.includes("?") ? "&" : "?") + "refresh_user=1";             }              // Fechar dropdown ao clicar fora             document.addEventListener("click", function(e) {                 document.querySelectorAll(".user-dropdown").forEach(function(drop){                     if (!drop.previousElementSibling.contains(e.target)) {                         drop.classList.remove("show");                         drop.style.display = "none";                     }                 });             });              // Verificar se o usuário foi carregado corretamente             document.addEventListener("DOMContentLoaded", function() {                 if (!document.querySelector("[data-user-loaded]")) {                     console.log("Usuário não carregado, tentando novamente em 2 segundos...");                     setTimeout(function() {                         window.location.reload();                     }, 2000);                 }             });             </script>             ';         } else {             // Dados inválidos na API             error_log('Dados inválidos retornados pela API: ' . json_encode($data));             showFallbackLogin();         }     } else {         // Erro na API         error_log('Erro na API: ' . $response->get_error_message());         showFallbackLogin();     } } else {     // Sem cookie     showFallbackLogin(); }  // Função para mostrar o fallback de login function showFallbackLogin() {     echo '<div class="user-login" style="display:flex;align-items:center;gap:10px;">';     echo '<img src="https://sitepa.s3.amazonaws.com/wp-content/uploads/br/2025/09/Vertical-container-1.avif" alt="Login" style="width:35px;height:35px;">';     echo '<a href="https://auth.parceiro.portasabertas.org.br/login">Entrar</a>';     echo '<span class="header__divider">|</span>';     echo '<a href="https://auth.parceiro.portasabertas.org.br/cadastro">Regístrate</a>';     echo '</div>'; }  // CSS adicional para melhorar a experiência echo '<style> .user-menu img {     transition: opacity 0.3s ease-in-out; } .user-dropdown.show {     display: block !important; } </style>'; ?>
Bem vindo
Acesse sua conta ou registre-se gratuitamente.

Cristão perseguido do Iêmen visita igrejas no Brasil

Conheça Saleh e confira sua agenda completa por três estados
Portas Abertas • 17 set 2025
Saleh já foi tema da Revista Portas Abertas e visitará igrejas em três estados brasileiros

Entre os dias 17 de outubro e 2 de novembro, as igrejas de Rondônia, Rio de Janeiro e São Paulo serão impactadas pela presença e testemunho de Saleh (pseudônimo), um cristão perseguido do Iêmen. O líder cristão foi alvo de abusos físicos e ameaças de morte por deixar o islã para seguir a Jesus.

Saleh teve um amigo preso e outro morto por causa do evangelho e precisou fugir para garantir a continuação de seu ministério. Porém, o cristão sonha em ver o Iêmen rendido a Cristo e trabalha para espalhar a palavra de Deus para seus conterrâneos.

O líder cristão iemenita ama a mensagem da cruz e a compartilha com todas as pessoas que conhece. “Que tipo de cristãos seríamos se não estivéssemos arriscando nossas vidas para que outros conheçam a Vida?”, pergunta Saleh.

Desde 2021, parceiros locais da Portas Abertas apoiaram Saleh na abertura de igrejas domésticas do Iêmen. Em 2024,  já havia vários grupos se reunindo semanalmente. Os cristãos receberam treinamento de liderança, participaram de atividades de formação comunitária e apoiaram os mais pobres.

Confira a agenda de Saleh.

  • 18/10 às 19h –  Igreja Missionária Unida de Ji Paraná/RO
  • 19/10 às 8h – Primeira Igreja Batista Outro Preto em Ouro Preto do Oeste/RO
  • 19/10 às 19h – Igreja Missionária Unida em Ji-Paraná/RO
  • 22/10 às 19h30 – Primeira Igreja Batista no Rio de Janeiro/RJ
  • 23/10 às 19h30 – Igreja Vida Nova em Inhaúma no Rio de Janeiro/RJ
  • 24/10 às 19h30 –  Igreja Batista dos Povos em Duque de Caxias/RJ
  • 25/10 às 10h – Primeira Igreja Presbiteriana de Pavuna no Rio de Janeiro/RJ
  • 25/10 às 18h – Igreja One do Taquara no Rio de Janeiro/RJ
  • 28/10 às 19h45 – Igreja Evangélica Adoração e Comunhão Plena em Itaquaquecetuba/SP
  • 30/10 às 20h15 – Igreja Hermom em São Paulo/SP
  • 2/11 às 10h – Igreja Base em São Paulo/SP
  • 2/11 às 18h – Igreja Cristã da Família da Vila Regente Feijó em São Paulo/SP

Receba a Portas Abertas em sua igreja

Você pode receber representantes locais e correspondentes internacionais da Portas Abertas em sua igreja. Faça seu convite e mobilize outros cristãos brasileiros a se comprometerem com a causa da Igreja Perseguida.

Mulher sorridente carrega uma criança em uma faixa nas costas. E há o texto Convide a Portas Abertas