From 078b21b3578d0fb8b66ef36529e9535d4d0ab470 Mon Sep 17 00:00:00 2001 From: Max-Rohrer20 Date: Tue, 20 Aug 2024 09:44:16 -0300 Subject: [PATCH] =?UTF-8?q?Resolu=C3=A7=C3=A3o=20de=20erro=20no=20teste?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lgbtq_connect.zip | Bin 656160 -> 656291 bytes .../includes/admin/formulario-admin-page.php | 8 ++++++++ 2 files changed, 8 insertions(+) diff --git a/lgbtq_connect.zip b/lgbtq_connect.zip index bbbca2f735fe9a83e3e5b8a5305293588ac7e3ea..2a369a682b3e911534a6dec292147a7d6795c411 100644 GIT binary patch delta 3273 zcmY+HXEYp$7RRR`W=4zXj9x~M8Z|l-q6JZgs3By8s0m_}QAYGOh%#1*GD=8{HhM21 z2|`GS7HwCESl!!w**)jId(QoEfA@dS{dUj)5@Hc0afk>k5DUVBu@qQJEEV<&mijeh zH0vt0F_SIepFl_g0E+m?EC?_DEDOR7t55E8|0nTeGK3RjsgN0Tf0$%{w;}T}T6tLh zmBTGhZdrCZU2R6jbSJGzeABVa=FI?ikHgBw&Mpj^9*_BZVUopl?eHzHg5; zcQjxgUk9dKU3ZGN^fr=JIj!O-ujUS9&Z`Y5zJhPL;0aQBeUSnPm|4x1vzFdYI#pGO zL{8N=l@m-LxZ6=-oqMcy3`<=SRLy+7i0b;HPeUq2+7gzUC(d}_rKHJQNXk$nWaTEy z=aj23ZqV+drY;?)#e%v$hBhe?^Hs*kO4dMgJZ#Ly* z2!?mS+i$9K&V6^(fwX!p6Es3pmDp+NOkxMmwJ>1sx>dCudb)cDruwvQWamz^iQXE6 zaY@Ti12En}cf$?aM9M?KDWth~11Hy3$SNw-Iw|b}D?Aks)IU9Yzwj*4OQW5O3=~yA z!4X*dj{CMYdOGeOjgMkkI4O((<$9 zK@7i3JB6yMO~?^7j0XE2-eknJ-b2iE21B^75zGW@SX6u~!SWRSH}_|mVsc!uX?Z+A z9@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D+wFD0>90d$zG+bz;EeW zkP^=PMsxC!P;r;{6n{a`uTQcvMS1XsmjKJLb^>8@2>2!_``1IV>1Mij!nCVETqe}K zQYe2za0T@Ct&rRQ1hst+z_tchTLY-A0n*k0XlsD8HGtU~sOnp@-VThd0mRk-VQT=e zHNe*z!0Vo%s~m8ZfGyYAd9(nwhH0KFM_UQfYLqwTVgF??AyC47SsWl?6cTCDYC6!x zNyK8}oI69VEFm|S=`tedoH^J30ZhaJ_z8d2X`mU4&((!C38pwuw<|7jXe3(>jl}My zQUl}(U{>900EJcFO8}a2mg!f7Mg>$;L^LI6=9?gy+oPDfBbc?&%bL*RyI}%y>3H%2 z^!A-%)_vNFH^N4H;FZNVaTK8E+c!>yxnTbBsm7`U2cl zqKAnfE&KYvuD%{j?rloMe>doO(>1!J!pv4Lo%GF8>N*ogCb#_%10NdM-M>sd=5KxI zi~;rT#9`);OQepliaD5mhLsyjKgNG5d||WDanm4*C)A-b%|{5bsN_$sPgBG5*MrSf zm#C`UH*HS9r8F33p!cMLekQieYW9Q@&#mQslA=-N5tD=HJd$@UhasG;B=X*5&j4RopRh-67Cdb!;Q4O*D{F@jok+kZ>gU8}Cf%1cc7Co?w}0JE1(Q_;#I zu)4-97O!P_?t7P*{r<+EP)i30)uL*v01E&B+$*=np$Vv54(7NMS=FLys{jiC0Ng8= zeEtbf3Q+pPW>EUWW>ETcx)$ diff --git a/lgbtq_connect/includes/admin/formulario-admin-page.php b/lgbtq_connect/includes/admin/formulario-admin-page.php index b2246e7..bbd211b 100644 --- a/lgbtq_connect/includes/admin/formulario-admin-page.php +++ b/lgbtq_connect/includes/admin/formulario-admin-page.php @@ -216,11 +216,13 @@ function excluir_formulario($id) { } function atualizar_formulario($wpdb, $funcao_localizacao) { + // Verificação dos dados obrigatórios no POST if (!isset($_POST['id'], $_POST['nome'], $_POST['email'], $_POST['servico'], $_POST['descricao'], $_POST['latitude'], $_POST['longitude'])) { error_log("Dados insuficientes no POST para atualizar o formulário."); return; } + // Sanitização dos dados recebidos $id = $_POST['id']; $nome = sanitize_text_field($_POST['nome']); $email = sanitize_email($_POST['email']); @@ -229,10 +231,13 @@ function atualizar_formulario($wpdb, $funcao_localizacao) { $latitude = sanitize_text_field($_POST['latitude']); $longitude = sanitize_text_field($_POST['longitude']); + // Obtenção da rua e cidade a partir das coordenadas list($rua, $cidade) = $funcao_localizacao($latitude, $longitude); + // Log da operação de atualização error_log("Atualizando formulário ID: " . $id . " com dados: Nome=" . $nome . ", E-mail=" . $email . ", Serviço=" . $servico); + // Atualização do banco de dados $resultado = $wpdb->update( 'lc_formulario', array( @@ -250,12 +255,15 @@ function atualizar_formulario($wpdb, $funcao_localizacao) { array('%d') ); + // Verificação do resultado da atualização if ($resultado !== false) { echo '

Formulário atualizado com sucesso!

'; } else { echo '

Erro ao atualizar o formulário.

'; } + // Redirecionamento após a atualização echo ''; } + ?>