Files
2026-05-17 05:22:06 +03:00

64 lines
3.7 KiB
PHP
Raw Permalink 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
/**
* AegisOne Engineering — Общий блок контактной формы + карта
*
* Подключается на всех публичных страницах перед футером.
* Переменные (опционально):
* $contactTitle — заголовок секции (по умолч. «Свяжитесь с нами»)
*/
$serviceTitles = [
'main' => 'Консультация',
'audit' => 'Аудит безопасности',
'sla' => 'Сервисное обслуживание (SLA)',
'incident' => 'Реагирование на инциденты',
'supervision' => 'Технический надзор',
'documentation' => 'Документация',
'risk' => 'Риск-инжиниринг',
'blog' => 'Блог',
];
$serviceTitle = $serviceTitles[$pageKey] ?? '';
?>
<section class="contacts" id="contacts">
<div class="container">
<h2 class="section-title"><?= $contactTitle ?? 'Свяжитесь с нами' ?></h2>
<div class="contacts__row">
<div class="contacts__form" id="form-block">
<?php if (defined('LEAD_MAGNET_ENABLED') && LEAD_MAGNET_ENABLED): ?>
<div class="lead-magnet"><?= LEAD_MAGNET_TEXT ?></div>
<?php endif; ?>
<form id="contact-form">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<input type="hidden" name="service" value="<?= $serviceTitle ?? '' ?>">
<div class="form-group">
<label for="name">Имя *</label>
<input type="text" id="name" name="name" maxlength="25" required>
<span class="error-msg"></span>
</div>
<div class="form-group">
<label for="phone">Телефон *</label>
<input type="tel" id="phone" name="phone" required>
<span class="error-msg"></span>
</div>
<div class="form-group">
<label for="message">Сообщение</label>
<textarea id="message" name="message" maxlength="500" placeholder="Не обязательно"></textarea>
<span class="char-count">Осталось: 500</span>
<span class="error-msg"></span>
</div>
<div class="form-group form-group--checkbox">
<input type="checkbox" id="agree" name="agree" required>
<label for="agree">Ознакомлен и согласен с <a href="/politica.php">политикой обработки персональных данных</a> *</label>
<span class="error-msg"></span>
</div>
<button type="submit" class="btn">Отправить</button>
</form>
<div id="form-response" class="form-response"></div>
</div>
<div class="contacts__map">
<iframe id="yandex-map" data-lon="<?=YANDEX_MAP_LON?>" data-lat="<?=YANDEX_MAP_LAT?>" data-address="<?=htmlspecialchars(YANDEX_MAP_ADDRESS)?>" width="100%" height="400" allowfullscreen title="Местоположение <?=htmlspecialchars(SITE_NAME)?>"></iframe>
<p class="map-address"><strong>Адрес <?=SITE_NAME?>:</strong> <?= YANDEX_MAP_ADDRESS ?></p>
</div>
</div>
</div>
</section>