Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/components/bitrix/main.urlpreview/ |
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/components/bitrix/main.urlpreview/frame.php |
<?php use Bitrix\Main\UrlPreview\UrlMetadataTable; define('STOP_STATISTICS', true); define('BX_SECURITY_SHOW_MESSAGE', true); define('BX_SECURITY_SESSION_READONLY', true); require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'); global $USER, $APPLICATION; $id = \Bitrix\Main\Application::getInstance()->getContext()->getRequest()->get('id'); if(!$id) { die; } $metadata = UrlMetadataTable::getById($id)->fetch(); if($metadata['EMBED'] && !empty($metadata['EMBED']) && strpos($metadata['EMBED'], '<iframe') === false) { echo $metadata['EMBED']; } die;