Current Path : /var/www/html/clients/biblio.e-nkama.ru/includes/ |
Current File : /var/www/html/clients/biblio.e-nkama.ru/includes/map_inside.php |
<?php if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die; global $library; ?> <div id="map-content" class="map map__inside"> <div class="map__block"> <div class="container"> <div class="map__contact"> <h3 class="map__contact__title">Контакты</h3> <?php if ($library['head']) : ?> <p> Заведующая библиотекой:<br> <b><?= $library['head'] ?></b> </p> <?php endif; ?> <?php if ($library['phone']) : ?> <?php $library['tel'] = preg_replace('/[^0-9]/', '', $library['phone']); ?> <p> Телефон: <a href="tel:<?= $library['tel'] ?>" class="map__contact__phone"><?= $library['phone'] ?></a> </p> <?php endif; ?> <p> Адрес: <b><?= $library['address'] ?></b> </p> <?php if ($library['email']) : ?> <p class="map__contact__email"> E-mail: <a href="mailto:<?= $library['email'] ?>"><?= $library['email'] ?></a> </p> <?php endif; ?> <?php if ($library['site']) : ?> <p class="map__contact__site"> Сайт: <a href="<?= $library['site'] ?>"><?= $library['site'] ?></a> </p> <?php endif; ?> <?php if ($library['vk'] || $library['instagram']) : ?> <p class="map__contact__social"> Мы в социальных сетях: <a href="<?= $library['vk'] ?>" class="map__contact__vk"></a> <a href="<?= $library['instagram'] ?>" class="map__contact__instagram"></a> </p> <?php endif; ?> <?php if ($library['schedule']) : ?> <p class="map__contact__timework"> График работы: <b><?= $library['schedule'] ?></b> </p> <?php endif; ?> <?php if ($library['weekend']) : ?> <p> Выходные дни:<br> <?= $library['weekend'] ?> </p> <?php endif; ?> </div> </div> </div> </div> <script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU"></script> <script> ymaps.ready(init); var myMap; function init() { myMap = new ymaps.Map('map-content', { center: [<?= $library['coord'] ?>], zoom: 15 }); myMap.behaviors.disable('scrollZoom'); myMap.controls.remove('searchControl'); var myPlacemark = new ymaps.Placemark([<?= $library['coord'] ?>], { hintContent: '<?= $library['name'] ?>', balloonContent: '<?= $library['address'] ?>' }, { preset: 'islands#redIcon' }); myMap.geoObjects.add(myPlacemark); } </script>