$erro_reabertura = ""; $msg_reabertura_ok = ""; if ($denuncia && $_SERVER['REQUEST_METHOD'] === 'POST' && (isset($_POST['acao']) && $_POST['acao'] === 'reabrir')) { $motivo = trim($_POST['motivo_reabertura'] ?? ''); $data_base = !empty($denuncia['data_resolucao']) ? $denuncia['data_resolucao'] : $denuncia['data_entrada']; $dias_decorridos = (int)((time() - strtotime($data_base)) / 86400); if ($denuncia['status'] !== 'Resolvida') { $erro_reabertura = 'Apenas manifestações resolvidas podem ser reabertas.'; } elseif ($dias_decorridos > 10) { $erro_reabertura = 'O prazo de 10 dias para solicitar a reabertura desta manifestação já expirou.'; } elseif (empty($motivo)) { $erro_reabertura = 'Por favor, informe a justificativa detalhada para solicitar a reabertura.'; } else { $agora = date('Y-m-d H:i:s'); $novo_prazo = date('Y-m-d', strtotime('+10 days')); $stReabrir = db()->prepare(" UPDATE denuncias SET status = 'Reaberta', data_reabertura = ?, motivo_reabertura = ?, qtd_reaberturas = qtd_reaberturas + 1, data_prazo = ?, data_resolucao = NULL WHERE id = ? "); $stReabrir->execute([$agora, $motivo, $novo_prazo, $denuncia['id']]); registrar_movimentacao( $denuncia['id'], 'reabertura', 'Manifestação reaberta pelo denunciante. Justificativa: ' . mb_substr($motivo, 0, 150) ); if (function_exists('notificar_reabertura_denuncia')) { notificar_reabertura_denuncia($denuncia['protocolo'], $motivo, 10); } $msg_reabertura_ok = 'Manifestação reaberta com sucesso. Uma nova análise foi iniciada com prazo de 10 dias.'; $stR = db()->prepare("SELECT * FROM denuncias WHERE id = ?"); $stR->execute([$denuncia['id']]); $denuncia = $stR->fetch(); $stR->closeCursor(); } } Consultar Manifestação — Prática Serviços RH

🔍 Consultar Manifestação

Prática Serviços RH

Acompanhe sua manifestação

Digite o número de protocolo que você recebeu ao registrar sua denúncia.

← Voltar ao formulário