Files
agroexpert/page-subscript.php
2024-04-14 21:37:57 +03:00

46 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php get_header(); ?>
<div class="content-middle articles-wrapper">
<div class="section-title about-section-title">
<h1 class="section-title__title">Подписка на рассылку</h1>
</div>
<div class="advert-item">
<div class="advert-item__block">
<?php if (isset( $_GET['id'] )){
$sanitized_id = sanitize_text_field( $_GET['id'] );
$sql_update = "UPDATE {$wpdb->prefix}subusers SET status = 1 WHERE hash = '$sanitized_id'";
$result = $wpdb->get_results( $sql_update );
echo '
<p>Спасибо, мы включили Ваш e-mail в нашу рассылку!</p>
<p>Наши письма могут оказаться в разделе "Рассылки" Вашего почтового приложения или сайта.</p>
';
} else {
echo '<p>К сожалению не нашли Вас в базе.</p>';
}?>
</div>
<p><a href="https://agroexpert.press" class="articles-preview__show-next">На главную</a></p>
</div>
<div class="articles__spacer-container">
<div class="articles__spacer"></div>
<div class="articles__spacer"></div>
</div>
</div>
<?php get_footer(); ?>