<?php require_once 'verificar_sessao.php'; ?> <!DOCTYPE html> <html lang="pt-BR"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Atualização de Dados</title> <link href="https: <style> body{font-family: Arial, sans-serif; background-color: #f5f5f5; margin: 0; padding: 20px;}.container{max-width: 600px; margin: 0 auto; background: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);}.logo{text-align: center; margin-bottom: 30px;}.logo img{max-width: 200px;}h1{color: #333; text-align: center; margin-bottom: 30px; font-size: 24px;}.form-group{margin-bottom: 20px; position: relative;}input{width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; font-size: 16px;}.btn-atualizar{background: #ff4f1a; color: white; border: none; padding: 12px 30px; border-radius: 4px; cursor: pointer; width: 100%; font-size: 16px;}.btn-atualizar:hover{background: #e64816;}.cep-link{color: #ff4f1a; text-decoration: none; font-size: 14px; float: right; margin-top: 5px;}.input-error{border-color: #dc3545;}.error-message{color: #dc3545; font-size: 12px; margin-top: 5px; display: none;}</style> </head> <body> <div class="container"> <div class="logo"> <img src="https: </div> <h1>Atualize seus dados, é rápido e simples.</h1> <form action="salvar_atualizacao.php" method="post" id="formAtualizacao"> <div class="form-group"> <input type="text" name="nome" id="nome" placeholder="Nome" required> <div class="error-message" id="nomeError">Por favor, insira um nome válido</div> </div> <div class="form-group"> <input type="tel" name="telefone" id="telefone" placeholder="(00) 0 0000-0000" required> <div class="error-message" id="telefoneError">Por favor, insira um telefone válido</div> </div> <div class="form-group"> <input type="text" name="cep" id="cep" placeholder="00000-000" required> <div class="error-message" id="cepError">Por favor, insira um CEP válido</div> <a href="https: </div> <button type="submit" class="btn-atualizar">Atualizar</button> </form> </div> <script src="https: <script src="https: <script> $(document).ready(function(){$('#telefone').mask('(00) 0 0000-0000'); $('#cep').mask('00000-000'); $('#formAtualizacao').on('submit', function(e){let isValid = true; const nome = $('#nome').val().trim(); if (nome.length < 3){$('#nome').addClass('input-error'); $('#nomeError').show(); isValid = false;}else{$('#nome').removeClass('input-error'); $('#nomeError').hide();}const telefone = $('#telefone').val().replace(/\D/g, ''); if (telefone.length !== 11){$('#telefone').addClass('input-error'); $('#telefoneError').show(); isValid = false;}else{$('#telefone').removeClass('input-error'); $('#telefoneError').hide();}const cep = $('#cep').val().replace(/\D/g, ''); if (cep.length !== 8){$('#cep').addClass('input-error'); $('#cepError').show(); isValid = false;}else{$('#cep').removeClass('input-error'); $('#cepError').hide();}if (!isValid){e.preventDefault();}}); $('#telefone').on('blur', function(){let value = $(this).val().replace(/\D/g, ''); if (value.length === 11){const ddd = value.substring(0, 2); const numero = value.substring(2); $(this).val(`(${ddd}) ${numero.substring(0,1)}${numero.substring(1,5)}-${numero.substring(5)}`);}});}); </script> </body> </html>