Загрузка данных
<?php
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php');
$params = $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$user = JFactory::getUser();
$info = $params->get('info_block_position', 0);
JLoader::register('fieldattach', JPATH_BASE . '/components/com_fieldsattach/helpers/fieldattach.php');
JLoader::register('imagemaker', 'templates/probel/html/imagemaker.php');
JLoader::register('geturbisfield', 'templates/probel/html/getfielder.php');
$extlink = fieldattach::getValue($this->item->id, 117, false);
$showaddbutton = fieldattach::getValue($this->item->catid, 112, true);
if(!empty($extlink)){
$app = JFactory::getApplication();
//$linkparent = JRoute::_(ContentHelperRoute::getCategoryRoute($this->category->parent_id));
$app->redirect($extlink, '');
}
$docs = fieldattach::getFieldValue($this->item->id, 12, false, false);
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$settit = '';
if(!isset($doc->_metaTags['name']['browser_title'])){
$doc->setTitle($this->item->title . ' | ' . $app->get('sitename'));
$settit = $this->item->category_title . ': ' . $this->item->title;
} else {
$settit = $doc->_metaTags['name']['browser_title'];
};
$itemmapblock = '';
$mapnew = '';
$itemmapblock = fieldattach::getFieldValue($this->item->id, 5, false, false);
$mapnew = geturbisfield::fieldvalue($this->item->id, 73, false);
if(empty($itemmapblock)) {
$itemmapblock = geturbisfield::fieldvalue($this->item->id, 73, false);
if(!empty($itemmapblock)){
$mapnew = $itemmapblock;
}
}
// ========== SEO: БАЗОВЫЕ ПЕРЕМЕННЫЕ ==========
$articleUrl = JURI::current();
$pageTitle = trim(strip_tags($this->item->title));
// Description
$globalDesc = trim($app->get('MetaDesc'));
$currentDesc = trim($doc->getDescription());
if (empty($currentDesc) || $currentDesc === $globalDesc) {
$textForDesc = !empty($this->item->introtext) ? $this->item->introtext : $this->item->text;
$cleanText = strip_tags($textForDesc);
$cleanText = html_entity_decode($cleanText, ENT_QUOTES, 'UTF-8');
$cleanText = str_replace(array("\r", "\n", "\t"), ' ', $cleanText);
$cleanText = trim(preg_replace('/\s+/', ' ', $cleanText));
$tempDesc = mb_substr($cleanText, 0, 155, 'UTF-8');
$lastSpace = mb_strrpos($tempDesc, ' ', 0, 'UTF-8');
if ($lastSpace !== false) {
$tempDesc = mb_substr($tempDesc, 0, $lastSpace, 'UTF-8');
}
$finalDesc = trim($tempDesc);
if (!empty($finalDesc)) {
$finalDesc .= '...';
}
} else {
$finalDesc = $currentDesc;
}
$doc->setDescription($finalDesc);
// ========== SEO: OG IMAGE ==========
$imageUrl = '';
// Ищем hash в данных статьи
$cleanItem = clone $this->item;
unset($cleanItem->text, $cleanItem->introtext, $cleanItem->fulltext);
$itemDump = json_encode($cleanItem, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
if (!empty($itemDump) && preg_match('/([a-f0-9]{32}\.(?:jpg|jpeg|png|webp))/i', $itemDump, $matches)) {
$candidate = $matches[1];
if (file_exists(JPATH_SITE . '/images/custom/' . $candidate)) {
$imageUrl = 'images/custom/' . $candidate;
}
}
// Поиск фото через imagemaker (для отелей)
if (empty($imageUrl)) {
$mainimage = imagemaker::makeimage($this->item->id, 767, 500, 'realimageone', $this->item->title);
if (!empty($mainimage)) {
$imageUrl = $mainimage;
}
}
// Резерв — штатные изображения Joomla
if (empty($imageUrl)) {
if (!empty($images) && !empty($images->image_fulltext)) {
$imageUrl = $images->image_fulltext;
} elseif (!empty($images) && !empty($images->image_intro)) {
$imageUrl = $images->image_intro;
}
}
$finalImageUrl = '';
if (!empty($imageUrl)) {
if (stripos($imageUrl, 'http://') === 0 || stripos($imageUrl, 'https://') === 0) {
$finalImageUrl = $imageUrl;
} else {
$finalImageUrl = JURI::base() . ltrim($imageUrl, '/');
}
}
// ========== SEO: OPEN GRAPH ==========
$doc->setMetaData('og:type', 'article', 'property');
$doc->setMetaData('og:url', $articleUrl, 'property');
$doc->setMetaData('og:title', $pageTitle, 'property');
$doc->setMetaData('og:description', $finalDesc, 'property');
$doc->setMetaData('og:site_name', $app->get('sitename'), 'property');
if (!empty($finalImageUrl)) {
$doc->setMetaData('og:image', $finalImageUrl, 'property');
$doc->setMetaData('og:image:secure_url', $finalImageUrl, 'property');
$imagePath = str_replace(JURI::base(), JPATH_SITE . '/', $finalImageUrl);
if (file_exists($imagePath)) {
list($width, $height) = getimagesize($imagePath);
if ($width && $height) {
$doc->setMetaData('og:image:width', (string)$width, 'property');
$doc->setMetaData('og:image:height', (string)$height, 'property');
}
}
}
// ========== SEO: TWITTER CARD ==========
$doc->setMetaData('twitter:card', !empty($finalImageUrl) ? 'summary_large_image' : 'summary', 'name');
$doc->setMetaData('twitter:title', $pageTitle, 'name');
$doc->setMetaData('twitter:description', $finalDesc, 'name');
if (!empty($finalImageUrl)) {
$doc->setMetaData('twitter:image', $finalImageUrl, 'name');
}
// ========== SEO: ARTICLE ТЕГИ И ДАТЫ ==========
if (!empty($this->item->category_title)) {
$doc->setMetaData('article:section', trim(strip_tags($this->item->category_title)), 'property');
}
if (!empty($this->item->tags->itemTags)) {
foreach ($this->item->tags->itemTags as $tag) {
if (!empty($tag->title)) {
$doc->setMetaData('article:tag', trim(strip_tags($tag->title)), 'property');
}
}
}
$datePublished = '';
if (!empty($this->item->created)) {
$timestamp = strtotime($this->item->created);
if ($timestamp !== false) {
$datePublished = date('c', $timestamp);
}
}
$dateModified = $datePublished;
if (!empty($this->item->modified) && $this->item->modified !== '0000-00-00 00:00:00') {
$timestamp = strtotime($this->item->modified);
if ($timestamp !== false) {
$dateModified = date('c', $timestamp);
}
}
if (!empty($datePublished)) {
$doc->setMetaData('article:published_time', $datePublished, 'property');
}
if (!empty($dateModified)) {
$doc->setMetaData('article:modified_time', $dateModified, 'property');
}
// ========== SEO: JSON-LD РАЗМЕТКА ==========
$schema_data = array(
'@context' => 'https://schema.org',
'@type' => 'NewsArticle',
'mainEntityOfPage' => array(
'@type' => 'WebPage',
'@id' => $articleUrl
),
'headline' => $pageTitle,
'datePublished' => $datePublished,
'dateModified' => $dateModified,
'author' => array(
'@type' => 'Organization',
'name' => $app->get('sitename')
),
'publisher' => array(
'@type' => 'Organization',
'name' => $app->get('sitename'),
'logo' => array(
'@type' => 'ImageObject',
'url' => JURI::base() . 'templates/probel/images/logo.png'
)
),
'description' => $finalDesc
);
if (!empty($finalImageUrl)) {
$schema_data['image'] = array($finalImageUrl);
}
$doc->addCustomTag(
'<script type="application/ld+json">' .
json_encode($schema_data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) .
'</script>'
);
// ========== SEO: CANONICAL ==========
$canonicalExists = false;
if (!empty($doc->_links)) {
foreach ($doc->_links as $link) {
if (isset($link['relation']) && strtolower($link['relation']) === 'canonical') {
$canonicalExists = true;
break;
}
}
}
if (!$canonicalExists) {
$doc->addHeadLink($articleUrl, 'canonical');
}
?>
<div class="kat-item-page">
<?php if($showaddbutton != '2') { ?>
<?php
$userId = JFactory::getUser()->get('id');
//if(!$user->get('guest')){ // удалить для публичного!
if($this->item->created_by == $userId){
echo '<a class="wievicons floatright btn btn-primary" href="index.php?option=com_content&view=article&task=article.edit&a_id='.$this->item->id.'&Itemid=934&return='.base64_encode('index.php?Itemid=798').'"><i class="fa fa-pencil"></i> Редактировать</a>';
} elseif($userId){
echo '<a class="wievicons floatright btn btn-info" data-backdrop="true" data-toggle="modal" data-target="#callprava">Это ваш объект ?</a>';
} else {
echo '<a data-backdrop="true" data-toggle="modal" data-target="#calllogin" class="wievicons floatright btn btn-info">Это ваш объект ?</a>';
}
//}
?>
<?php } ?>
<div class="section-title">
<h1 class="<?php echo $this->pageclass_sfx?>"><?php echo str_ireplace('|', '<br />', $this->item->title); ?></h1>
</div>
<?php
if(!empty($this->item->tags->itemTags)){
echo '<div class="itemtagsmap"><i class="fa fa-map-marker"></i> ';
$count = count($this->item->tags->itemTags);
/*
foreach($this->item->tags->itemTags as $tag){
$i++;
$parenttit = '';
if($tag->level == 2) $parenttitle = '|'.$tag->id.'|'.$tag->title;
if($tag->level > 2) $parenttit = $parenttitle;
if($this->item->catid > 48 && $this->item->catid < 55) $this->item->catid = $this->item->parent_id;
if($tag->level < 4) echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catid).'&filter_tag='.$tag->id.'|'.$tag->title.$parenttit).'">';
//if($tag->level < 4) echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_id).'&filter_tag='.$tag->id.'|'.$tag->title.$parenttit).'">';
echo $tag->title;
if($tag->level < 4) echo '</a>';
if($i < $count) echo ' / ';
}
*/
$level1 = '';
$level2 = '';
$level3 = '';
$level4 = '';
$i = 0;
foreach($this->item->tags->itemTags as $tag){
$i++;
if($tag->level == 1) {$level1.= '<a class="rmark" href="'.JRoute::_(TagsHelperRoute::getTagRoute($tag->tag_id . ':' . $tag->alias)).'">'.$tag->title.'</a>';}
elseif($tag->level == 2) {$level2.= '<a class="rmark" href="'.JRoute::_(TagsHelperRoute::getTagRoute($tag->tag_id . ':' . $tag->alias)).'">'.$tag->title.'</a>';}
elseif($tag->level == 3) {$level3.= '<a class="rmark" href="'.JRoute::_(TagsHelperRoute::getTagRoute($tag->tag_id . ':' . $tag->alias)).'">'.$tag->title.'</a>';}
elseif($tag->level == 4) {$level4.= '<a class="rmark" href="'.JRoute::_(TagsHelperRoute::getTagRoute($tag->tag_id . ':' . $tag->alias)).'">'.$tag->title.'</a>';}
}
echo '<span class="navcities">'.$level1.$level2.$level3.$level4.'</span>';
if(!empty($itemmapblock)) echo ' — <a data-toggle="tab" href="#shema" aria-controls="shema" class="navtomap" >Смотреть на карте</a>';
echo '</div>';
}
$showrightcol = false;
$adress = geturbisfield::fieldvalue($this->item->id, 50, false);
$phone1 = geturbisfield::fieldvalue($this->item->id, 51, false);
$phone2 = geturbisfield::fieldvalue($this->item->id, 52, false);
$phone3 = geturbisfield::fieldvalue($this->item->id, 53, false);
$phone4 = geturbisfield::fieldvalue($this->item->id, 54, false);
$phone5 = geturbisfield::fieldvalue($this->item->id, 55, false);
$email = geturbisfield::fieldvalue($this->item->id, 56, false);
if(!empty($email)) $email = JHTML::_('content.prepare', $email);
$site = geturbisfield::fieldvalue($this->item->id, 57, false);
if(!empty($adress)
|| !empty($phone1)
|| !empty($phone2)
|| !empty($phone3)
|| !empty($phone4)
|| !empty($phone5)
|| !empty($email)
|| !empty($site)
){$showrightcol = true;}
?>
<div class="row borderbottom">
<div class="<?php echo $showrightcol?'col-lg-9 col-md-8 col-sm-8':'col-md-11';?>">
<?php
$mainimage = imagemaker::makeimage($this->item->id, 767, 500, 'realimageone', $this->item->title);
$dopfoto = imagemaker::makeimage($this->item->id, 460, 300, 'gallerytop', $this->item->title);
$firstfoto = imagemaker::makeimage($this->item->id, 460, 300, 'gallerytopone', $this->item->title);
$threefoto = imagemaker::makeimage($this->item->id, 460, 300, 'gallerytopthree', $this->item->title);
$bigimage = imagemaker::makeimage($this->item->id, 600, 350, 'realimageonebigger', $this->item->title);
$countgallery = imagemaker::makeimage($this->item->id, 600, 350, 'countgallery', $this->item->title);
?>
<?php if(!empty($mainimage)){ ?>
<div class="gallery-items<?php if($countgallery == '4') echo 'fit';?> grid-small-pad list-single-gallery three-coulms lightgallery">
<?php
if(!empty($firstfoto)) {
if($countgallery != '4') echo $firstfoto;
if($countgallery != '3' && $countgallery != '4') echo $threefoto;
?>
<div class="gallery-item <?php if($countgallery == '4') echo 'gallery-item-three'; else echo 'gallery-item-second'; ?>">
<div class="grid-item-holder">
<div class="box-item">
<img src="<?php echo $mainimage;?>" />
<a href="<?php echo $bigimage;?>" class="gal-link popup-image">
<i class="fa fa-search"></i></a>
</div>
</div>
</div>
<?php
if($countgallery == '4') echo $firstfoto.$threefoto;
if($countgallery == '3') echo $threefoto;
} else if(!empty($mainimage)){
?>
<div class="gallery-item gallery-item-second" style="width: 100%;">
<div class="grid-item-holder">
<div class="box-item">
<img src="<?php echo $mainimage;?>" />
<a href="<?php echo $bigimage;?>" class="gal-link popup-image">
<i class="fa fa-search"></i></a>
</div>
</div>
</div>
<?php
} ?>
<?php
if(!empty($dopfoto)) {
echo $dopfoto;
} ?>
<?php } ?>
</div>
</div>
<div class="<?php echo $showrightcol?'col-lg-3 col-md-4 col-sm-4':'col-md-1';?> no-padding featurestop product_info">
<?php
if(!empty($site)) $site = preg_replace('~^(?!https??://)~i', 'http://', $site, 1);
$vk = geturbisfield::fieldvalue($this->item->id, 58, false);
$in = geturbisfield::fieldvalue($this->item->id, 59, false);
$tg = geturbisfield::fieldvalue($this->item->id, 84, false);
$od = geturbisfield::fieldvalue($this->item->id, 60, false);
$tw = geturbisfield::fieldvalue($this->item->id, 61, false);
$fb = geturbisfield::fieldvalue($this->item->id, 62, false);
// прячем доп. контакты для бесплатной версии только в каталоге
$hidecontacts = 0;
if(in_array($this->item->parent_id, array(305, 304, 307, 317, 332, 323, 336)) && $this->item->featured != 1) {
$hidecontacts = 1;
$phone2 = $phone3 = $phone4 = $phone5 = $vk = $in = $tg = $od = $tw = $fb = $site = '';
}
if($showrightcol){
echo '<div class="contactblock">';
// адрес
echo $adress?'<div class="singlecontact"><span><i class="fa fa-map-marker"></i> Адрес:</span>'.$adress.'</div>':'';
// телефоны
if(!empty($phone1)
|| !empty($phone2)
|| !empty($phone3)
|| !empty($phone4)
|| !empty($phone5)
){
echo '<div class="singlecontact"><span><i class="fa fa-phone"></i> Телефоны:</span>';
echo $phone1?(str_ireplace(',', '<br />', $phone1).'<br />'):'';
echo $phone2?$phone2.'<br />':'';
echo $phone3?$phone3.'<br />':'';
echo $phone4?$phone4.'<br />':'';
echo $phone5?$phone5.'<br />':'';
echo '</div>';
}
// E-mail
echo $email?'<div class="singlecontact"><span><i class="fa fa-envelope"></i> E-mail:</span>'.$email.'</div>':'';
// сайт
echo $site?'<div class="singlecontact"><span><i class="fa fa-link"></i> <a href="'.$site.'" rel="nofollow noindex" target="_blank"> Адрес сайта</a></span></div>':'';
// соцсети
if(!empty($vk)
|| !empty($in)
|| !empty($tg)
|| !empty($fb)
|| !empty($od)
|| !empty($tw)
){
echo '<div class="singlecontact noborder list-widget-social"><span><i class="fa fa-share-alt"></i> Соцсети:</span>';
echo $vk?'<a href="'.$vk.'" target="_blank"><i class="fa fa-vk"></i></a>':'';
echo $in?'<a href="'.$in.'" target="_blank"><i class="fa fa-instagram"></i></a>':'';
echo $tg?'<a href="'.$tg.'" target="_blank"><i class="fa fa-telegram"></i></a>':'';
echo $fb?'<a href="'.$fb.'" target="_blank"><i class="fa fa-facebook"></i></a>':'';
echo $tw?'<a href="'.$tw.'" target="_blank"><i class="fa fa-twitter"></i></a>':'';
echo $od?'<a href="'.$od.'" target="_blank"><i class="fa fa-odnoklassniki"></i></a>':'';
echo '</div>';
}
echo '</div>';
}
?>
<?php
$tech = geturbisfield::fieldvalue($this->item->id, 49, false);
echo $tech;?>
<?php $ddocs = fieldattach::getFieldValue($this->item->id, 12, false);
if(!empty($ddocs)){
echo '<noindex><div class="download-docs">';
echo $ddocs;
echo '</div></noindex>';
}
?>
</div>
</div>
<div class="clear"> </div>
<ul class="nav nav-tabs hidden-xs" id="myTab" role="tablist">
<?php if(!empty($this->item->text)){ ?>
<li class="nav-item active"><a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Описание</a></li>
<?php } ?>
<?php
$video = geturbisfield::fieldvalue($this->item->id, 71, false);
$video1 = geturbisfield::fieldvalue($this->item->id, 78, false);
$video2 = geturbisfield::fieldvalue($this->item->id, 79, false);
$video3 = geturbisfield::fieldvalue($this->item->id, 80, false);
$video4 = geturbisfield::fieldvalue($this->item->id, 81, false);
$video5 = geturbisfield::fieldvalue($this->item->id, 82, false);
if((!empty($video) || !empty($video1) || !empty($video2) || !empty($video3) || !empty($video4) || !empty($video5)) && $hidecontacts != 1){?>
<li class="nav-item"><a class="nav-link" id="video-tab" data-toggle="tab" href="#video" role="tab" aria-controls="near" aria-selected="false">Видео</a></li>
<?php } ?>
<?php
$infra = geturbisfield::fieldvalue($this->item->id, 68, false);
$infratitle = geturbisfield::fieldvalue($this->item->id, 67, false);
if(!empty($infra)) { ?>
<li class="nav-item"><a class="nav-link" id="infra-tab" data-toggle="tab" href="#infra" role="tab" aria-controls="infra" aria-selected="false"><?php echo $infratitle?$infratitle:'Инфраструктура';?></a></li>
<?php } ?>
<?php
$db = JFactory::getDBO();
$resultafish = '';
$query = 'SELECT a.*, c.title as ctitle, c.alias as calias, c.level as clevel, c.parent_id as cparent_id FROM #__content as a LEFT JOIN #__fields_values as b ON a.id = b.item_id INNER JOIN #__categories as c ON a.catid = c.id WHERE b.field_id = 70 AND b.value = "'.$this->item->id.'" AND a.state= 1 ORDER BY a.catid, a.ordering ';
$db->setQuery( $query );
$resultafish = $db->loadObjectList();
if(!empty($resultafish)){?>
<li class="nav-item"><a class="nav-link" id="afisha-tab" data-toggle="tab" href="#afisha" role="tab" aria-controls="afisha" aria-selected="false">Афиша</a></li>
<?php } ?>
<?php
// обратная привязка туров!
$db = JFactory::getDBO();
$resulttours = '';
$showtours = 0;
$tourshtml= '';
$tourshtml .= '<div class="tab-pane fade" id="tours" role="tabpanel" aria-labelledby="tours-tab">
<div class="row borderbottom">';
$tourshtml.= '<div class="col-md-12"><h3 class="hidden-lg hidden-md hidden-sm">Туры и экскурсии</h3>';
$query = 'SELECT id FROM #__categories WHERE parent_id = 63';
$db->setQuery($query);
$column= $db->loadColumn();
$query = 'SELECT a.*, b.value as tourval, c.parent_id, (SELECT title FROM #__categories WHERE id = c.parent_id) as ctitle, (SELECT lft FROM #__categories WHERE id = c.parent_id) as catorder FROM #__content as a LEFT JOIN #__fieldsattach_values as b ON a.id = b.articleid INNER JOIN #__categories as c ON a.catid = c.id
WHERE b.fieldsid = 61 AND b.value LIKE "%'.$this->item->id.'%" AND a.state= 1
ORDER BY catorder, c.lft, a.ordering ';
$db->setQuery( $query );
$resulttours = $db->loadObjectList();
if(!empty($resulttours)){
$shortcattitle = fieldattach::getValue($resulttours[0]->parent_id, 109, true);
if(in_array($resulttours[0]->parent_id,$column)) $resulttours[0]->ctitle = $shortcattitle = 'Экскурсии для организованных групп 10-40 чел. на 1-2 дня';
$startcat = $resulttours[0]->ctitle;
$tourshtml.= '<h4>'.($shortcattitle?$shortcattitle:$startcat).'</h4>';
foreach($resulttours as $res){
$shortcattitle = fieldattach::getValue($res->parent_id, 109, true);
if(in_array($res->parent_id,$column)) {
$res->ctitle = $shortcattitle = 'Экскурсии для организованных групп 10-40 чел. на 1-2 дня';
}
if($startcat != $res->ctitle){
$startcat = $res->ctitle;
$tourshtml.= '<div class="clear"><br></div><h4>'.($shortcattitle?$shortcattitle:$startcat).'</h4>';
}
$tourslink = JRoute::_(ContentHelperRoute::getArticleRoute($res->id, $res->catid));
$tourshtml.= '<div class="tag-item col-md-12 col-sm-12 col-xs-12">';
$tourshtml.= '<a href="'.$tourslink.'" target="_blank">'.$res->title.'</a></div>';
$dostarr = explode(',', $res->tourval);
foreach ($dostarr as $ditem){
if($ditem == $this->item->id) $showtours = 1;
}
}
$tourshtml.= '</div></div></div>';
if($showtours == 1) echo '<li class="nav-item"><a class="nav-link" id="tours-tab" data-toggle="tab" href="#tours" role="tab" aria-controls="tours" aria-selected="false">Туры и экскурсии</a></li>';
}
// обратная привязка туров!
?>
<?php if(!empty($itemmapblock)){?>
<li class="nav-item"><a class="nav-link" id="shema-tab" data-toggle="tab" href="#shema" role="tab" aria-controls="shema" aria-selected="false">Схема проезда</a></li>
<?php } ?>
<?php
// что рядом //////////////////////////////////////////////////
$itemtagsarr = array(7, 17, 21, 22, 23, 24);
$selectedtag = '';
$mapzoom = 9;
$resultnear= '';
foreach($this->item->tags->itemTags as $tag){
if($tag->level == '4' && in_array($tag->tag_id, $itemtagsarr)) {
$selectedtag = $tag;
$mapzoom = 11;
}
}
if(empty($selectedtag)){
foreach($this->item->tags->itemTags as $tag){
if($tag->level == '3') $selectedtag = $tag;
}
}
if(!empty($selectedtag) && !empty($itemmapblock)){
$this->item->mapzoom = $mapzoom;
$db = JFactory::getDBO();
$resultnear= '';
$query = 'SELECT a.*, c.title as ctitle, c.alias as calias, c.level as clevel, c.parent_id as cparent_id FROM #__content as a LEFT JOIN #__contentitem_tag_map as b ON a.id = b.content_item_id INNER JOIN #__categories as c ON a.catid = c.id WHERE b.tag_id = '.$selectedtag->tag_id.' AND b.type_alias = "com_content.article"
AND a.catid <> 290
AND a.catid NOT IN (SELECT id FROM #__categories WHERE parent_id = 302)
AND a.catid NOT IN (SELECT id FROM #__categories WHERE parent_id = 63)
AND a.catid NOT IN (SELECT id FROM #__categories WHERE parent_id = 64)
AND a.catid NOT IN (SELECT id FROM #__categories WHERE parent_id = 291)
AND a.catid NOT IN (SELECT id FROM #__categories WHERE parent_id = 295) AND a.state= 1 ORDER BY a.catid, a.ordering ';
$db->setQuery( $query );
$resultnear = $db->loadObjectList();
/*
if(!empty($resultnear) && count($resultnear)> 1){?>
<li class="nav-item"><a class="nav-link" id="near-tab" data-toggle="tab" href="#near" role="tab" aria-controls="near" aria-selected="false">Что рядом?</a></li>
<?php
// что рядом //////////////////////////////////////////////////
}
*/
}
?>
</ul>
<div class="tab-content" id="katalogTabs">
<div class="tab-pane active" id="home" role="tabpanel" aria-labelledby="home-tab">
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="row borderbottom">
<div class="col-md-12">
<?php if(!empty($this->item->text)){
echo '<div class="kat-item-desc-opened"><h3 class="hidden-lg hidden-md hidden-sm">Описание</h3>'.$this->item->text.'</div>';
// echo '<div class="wievall showcatdesc open-desc">Показать полностью</div>';
}
?>
</div>
</div>
</div>
<?php
function displayVideo($url)
{
$o = '';
$app = JFactory::getApplication();
if ($url != '') {
$ssl = strpos($url, 'https');
$yLink = 'http://www.youtube.com/v/';
if ($ssl != false) {
$yLink = 'https://www.youtube.com/v/';
}
$shortUrl = 'http://youtu.be/';
$shortUrl2 = 'https://youtu.be/';
$pos = strpos($url, $shortUrl);
$pos2 = strpos($url, $shortUrl2);
if ($pos !== false) {
$code = str_replace($shortUrl, '', $url);
} else if ($pos2 !== false) {
$code = str_replace($shortUrl2, '', $url);
} else {
$codeArray = explode('=', $url);
$code = str_replace($codeArray[0] . '=', '', $url);
}
$attr = '';
if ((int)$width > 0) {
$attr .= ' width="100%"';
}
if ((int)$height > 0) {
$attr .= ' height="400"';
}
$o .= '<div class="item-video-container">';
$o .= '<iframe ' . $attr . ' src="https://www.youtube.com/embed/' . $code . '"></iframe>';
$o .= '</div>';
}
return $o;
}
if((!empty($video) || !empty($video1) || !empty($video2) || !empty($video3) || !empty($video4) || !empty($video5)) && $hidecontacts != 1){?>
<div class="tab-pane" id="video" role="tabpanel" aria-labelledby="video-tab">
<div class="row borderbottom">
<div class="col-md-12">
<?php
echo '<div class="kat-item-desc-opened"><h3 class="hidden-lg hidden-md hidden-sm">Видео</h3>';
echo $video?$video:'';
echo $video1?displayVideo($video1):'';
echo $video2?displayVideo($video2):'';
echo $video3?displayVideo($video3):'';
echo $video4?displayVideo($video4):'';
echo $video5?displayVideo($video5):'';
echo '</div>';
?>
</div>
</div>
</div>
<?php } ?>
<?php
if(!empty($infra)) {
?>
<div class="tab-pane fade" id="infra" role="tabpanel" aria-labelledby="infra-tab">
<div class="row borderbottom">
<?php
$relatedarr = array();
$relatedarr = explode(',', $infra);
$relatedarr = array_reverse($relatedarr);
$num = 0;
echo '<div class="col-md-12"><h3 class="hidden-lg hidden-md hidden-sm">'.$infratitle.'</h3>';
foreach ($relatedarr as $ids){
$num++;
$article = JTable::getInstance("content");
$article->load($ids);
$infraitem = $article;
$infralink = JRoute::_(ContentHelperRoute::getArticleRoute($infraitem->id, $infraitem->catid));
if($infraitem->title){
echo '<div class="tag-item col-md-4 col-sm-6 col-xs-12">';
echo '<a href="'.$infralink.'" target="_blank">'.$infraitem->title.'</a></div>';
}
}
?>
</div>
</div>
</div>
<?php }
if($showtours == 1) echo $tourshtml;
?>
<?php
// афиша событий //////////////////////////////////////////////////
if(!empty($resultafish)){
$this->item->resultafish = $resultafish;
$this->setLayout('article-afisha');
echo $this->loadTemplate();
}
// афиша событий //////////////////////////////////////////////////
?>
<?php if(!empty($itemmapblock)){?>
<div class="tab-pane fade" id="shema" role="tabpanel" aria-labelledby="shema-tab">
<div class="row borderbottom">
<div class="col-md-12 <?php echo $this->pageclass_sfx?>">
<div class="itemmap">
<?php if(empty($mapnew) || $mapnew == '53.904073, 27.562928') echo $itemmapblock;
else { ?>
<h3>Схема проезда:</h3>
<?php /*
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key=AIzaSyCIQEHJ5Pxy5jh-3fmdvQXdsGWsfLiQY-c"></script>
<script type="text/javascript">
(function(){var d=null;function e(a){return function(b){this[a]=b}}function h(a){return function(){return this[a]}}var j;
function k(a,b,c){this.extend(k,google.maps.OverlayView);this.c=a;this.a=[];this.f=[];this.ca=[53,56,66,78,90];this.j=[];this.A=!1;c=c||{};this.g=c.gridSize||60;this.l=c.minimumClusterSize||2;this.J=c.maxZoom||d;this.j=c.styles||[];this.X=c.imagePath||this.Q;this.W=c.imageExtension||this.P;this.O=!0;if(c.zoomOnClick!=void 0)this.O=c.zoomOnClick;this.r=!1;if(c.averageCenter!=void 0)this.r=c.averageCenter;l(this);this.setMap(a);this.K=this.c.getZoom();var f=this;google.maps.event.addListener(this.c,
"zoom_changed",function(){var a=f.c.getZoom();if(f.K!=a)f.K=a,f.m()});google.maps.event.addListener(this.c,"idle",function(){f.i()});b&&b.length&&this.C(b,!1)}j=k.prototype;j.Q="https://raw.githubusercontent.com/googlemaps/js-marker-clusterer/gh-pages/images/m";j.P="png";j.extend=function(a,b){return function(a){for(var b in a.prototype)this.prototype[b]=a.prototype[b];return this}.apply(a,[b])};j.onAdd=function(){if(!this.A)this.A=!0,n(this)};j.draw=function(){};
function l(a){if(!a.j.length)for(var b=0,c;c=a.ca[b];b++)a.j.push({url:a.X+(b+1)+"."+a.W,height:c,width:c})}j.S=function(){for(var a=this.o(),b=new google.maps.LatLngBounds,c=0,f;f=a[c];c++)b.extend(f.getPosition());this.c.fitBounds(b)};j.z=h("j");j.o=h("a");j.V=function(){return this.a.length};j.ba=e("J");j.I=h("J");j.G=function(a,b){for(var c=0,f=a.length,g=f;g!==0;)g=parseInt(g/10,10),c++;c=Math.min(c,b);return{text:f,index:c}};j.$=e("G");j.H=h("G");
j.C=function(a,b){for(var c=0,f;f=a[c];c++)q(this,f);b||this.i()};function q(a,b){b.s=!1;b.draggable&&google.maps.event.addListener(b,"dragend",function(){b.s=!1;a.L()});a.a.push(b)}j.q=function(a,b){q(this,a);b||this.i()};function r(a,b){var c=-1;if(a.a.indexOf)c=a.a.indexOf(b);else for(var f=0,g;g=a.a[f];f++)if(g==b){c=f;break}if(c==-1)return!1;b.setMap(d);a.a.splice(c,1);return!0}j.Y=function(a,b){var c=r(this,a);return!b&&c?(this.m(),this.i(),!0):!1};
j.Z=function(a,b){for(var c=!1,f=0,g;g=a[f];f++)g=r(this,g),c=c||g;if(!b&&c)return this.m(),this.i(),!0};j.U=function(){return this.f.length};j.getMap=h("c");j.setMap=e("c");j.w=h("g");j.aa=e("g");
j.v=function(a){var b=this.getProjection(),c=new google.maps.LatLng(a.getNorthEast().lat(),a.getNorthEast().lng()),f=new google.maps.LatLng(a.getSouthWest().lat(),a.getSouthWest().lng()),c=b.fromLatLngToDivPixel(c);c.x+=this.g;c.y-=this.g;f=b.fromLatLngToDivPixel(f);f.x-=this.g;f.y+=this.g;c=b.fromDivPixelToLatLng(c);b=b.fromDivPixelToLatLng(f);a.extend(c);a.extend(b);return a};j.R=function(){this.m(!0);this.a=[]};
j.m=function(a){for(var b=0,c;c=this.f[b];b++)c.remove();for(b=0;c=this.a[b];b++)c.s=!1,a&&c.setMap(d);this.f=[]};j.L=function(){var a=this.f.slice();this.f.length=0;this.m();this.i();window.setTimeout(function(){for(var b=0,c;c=a[b];b++)c.remove()},0)};j.i=function(){n(this)};
function n(a){if(a.A)for(var b=a.v(new google.maps.LatLngBounds(a.c.getBounds().getSouthWest(),a.c.getBounds().getNorthEast())),c=0,f;f=a.a[c];c++)if(!f.s&&b.contains(f.getPosition())){for(var g=a,u=4E4,o=d,v=0,m=void 0;m=g.f[v];v++){var i=m.getCenter();if(i){var p=f.getPosition();if(!i||!p)i=0;else var w=(p.lat()-i.lat())*Math.PI/180,x=(p.lng()-i.lng())*Math.PI/180,i=Math.sin(w/2)*Math.sin(w/2)+Math.cos(i.lat()*Math.PI/180)*Math.cos(p.lat()*Math.PI/180)*Math.sin(x/2)*Math.sin(x/2),i=6371*2*Math.atan2(Math.sqrt(i),
Math.sqrt(1-i));i<u&&(u=i,o=m)}}o&&o.F.contains(f.getPosition())?o.q(f):(m=new s(g),m.q(f),g.f.push(m))}}function s(a){this.k=a;this.c=a.getMap();this.g=a.w();this.l=a.l;this.r=a.r;this.d=d;this.a=[];this.F=d;this.n=new t(this,a.z(),a.w())}j=s.prototype;
j.q=function(a){var b;a:if(this.a.indexOf)b=this.a.indexOf(a)!=-1;else{b=0;for(var c;c=this.a[b];b++)if(c==a){b=!0;break a}b=!1}if(b)return!1;if(this.d){if(this.r)c=this.a.length+1,b=(this.d.lat()*(c-1)+a.getPosition().lat())/c,c=(this.d.lng()*(c-1)+a.getPosition().lng())/c,this.d=new google.maps.LatLng(b,c),y(this)}else this.d=a.getPosition(),y(this);a.s=!0;this.a.push(a);b=this.a.length;b<this.l&&a.getMap()!=this.c&&a.setMap(this.c);if(b==this.l)for(c=0;c<b;c++)this.a[c].setMap(d);b>=this.l&&a.setMap(d);
a=this.c.getZoom();if((b=this.k.I())&&a>b)for(a=0;b=this.a[a];a++)b.setMap(this.c);else if(this.a.length<this.l)z(this.n);else{b=this.k.H()(this.a,this.k.z().length);this.n.setCenter(this.d);a=this.n;a.B=b;a.ga=b.text;a.ea=b.index;if(a.b)a.b.innerHTML=b.text;b=Math.max(0,a.B.index-1);b=Math.min(a.j.length-1,b);b=a.j[b];a.da=b.url;a.h=b.height;a.p=b.width;a.M=b.textColor;a.e=b.anchor;a.N=b.textSize;a.D=b.backgroundPosition;this.n.show()}return!0};
j.getBounds=function(){for(var a=new google.maps.LatLngBounds(this.d,this.d),b=this.o(),c=0,f;f=b[c];c++)a.extend(f.getPosition());return a};j.remove=function(){this.n.remove();this.a.length=0;delete this.a};j.T=function(){return this.a.length};j.o=h("a");j.getCenter=h("d");function y(a){a.F=a.k.v(new google.maps.LatLngBounds(a.d,a.d))}j.getMap=h("c");
function t(a,b,c){a.k.extend(t,google.maps.OverlayView);this.j=b;this.fa=c||0;this.u=a;this.d=d;this.c=a.getMap();this.B=this.b=d;this.t=!1;this.setMap(this.c)}j=t.prototype;
j.onAdd=function(){this.b=document.createElement("DIV");if(this.t)this.b.style.cssText=A(this,B(this,this.d)),this.b.innerHTML=this.B.text;this.getPanes().overlayMouseTarget.appendChild(this.b);var a=this;google.maps.event.addDomListener(this.b,"click",function(){var b=a.u.k;google.maps.event.trigger(b,"clusterclick",a.u);b.O&&a.c.fitBounds(a.u.getBounds())})};function B(a,b){var c=a.getProjection().fromLatLngToDivPixel(b);c.x-=parseInt(a.p/2,10);c.y-=parseInt(a.h/2,10);return c}
j.draw=function(){if(this.t){var a=B(this,this.d);this.b.style.top=a.y+"px";this.b.style.left=a.x+"px"}};function z(a){if(a.b)a.b.style.display="none";a.t=!1}j.show=function(){if(this.b)this.b.style.cssText=A(this,B(this,this.d)),this.b.style.display="";this.t=!0};j.remove=function(){this.setMap(d)};j.onRemove=function(){if(this.b&&this.b.parentNode)z(this),this.b.parentNode.removeChild(this.b),this.b=d};j.setCenter=e("d");
function A(a,b){var c=[];c.push("background-image:url("+a.da+");");c.push("background-position:"+(a.D?a.D:"0 0")+";");typeof a.e==="object"?(typeof a.e[0]==="number"&&a.e[0]>0&&a.e[0]<a.h?c.push("height:"+(a.h-a.e[0])+"px; padding-top:"+a.e[0]+"px;"):c.push("height:"+a.h+"px; line-height:"+a.h+"px;"),typeof a.e[1]==="number"&&a.e[1]>0&&a.e[1]<a.p?c.push("width:"+(a.p-a.e[1])+"px; padding-left:"+a.e[1]+"px;"):c.push("width:"+a.p+"px; text-align:center;")):c.push("height:"+a.h+"px; line-height:"+a.h+
"px; width:"+a.p+"px; text-align:center;");c.push("cursor:pointer; top:"+b.y+"px; left:"+b.x+"px; color:"+(a.M?a.M:"black")+"; position:absolute; font-size:"+(a.N?a.N:11)+"px; font-family:Arial,sans-serif; font-weight:bold");return c.join("")}window.MarkerClusterer=k;k.prototype.addMarker=k.prototype.q;k.prototype.addMarkers=k.prototype.C;k.prototype.clearMarkers=k.prototype.R;k.prototype.fitMapToMarkers=k.prototype.S;k.prototype.getCalculator=k.prototype.H;k.prototype.getGridSize=k.prototype.w;
k.prototype.getExtendedBounds=k.prototype.v;k.prototype.getMap=k.prototype.getMap;k.prototype.getMarkers=k.prototype.o;k.prototype.getMaxZoom=k.prototype.I;k.prototype.getStyles=k.prototype.z;k.prototype.getTotalClusters=k.prototype.U;k.prototype.getTotalMarkers=k.prototype.V;k.prototype.redraw=k.prototype.i;k.prototype.removeMarker=k.prototype.Y;k.prototype.removeMarkers=k.prototype.Z;k.prototype.resetViewport=k.prototype.m;k.prototype.repaint=k.prototype.L;k.prototype.setCalculator=k.prototype.$;
k.prototype.setGridSize=k.prototype.aa;k.prototype.setMaxZoom=k.prototype.ba;k.prototype.onAdd=k.prototype.onAdd;k.prototype.draw=k.prototype.draw;s.prototype.getCenter=s.prototype.getCenter;s.prototype.getSize=s.prototype.T;s.prototype.getMarkers=s.prototype.o;t.prototype.onAdd=t.prototype.onAdd;t.prototype.draw=t.prototype.draw;t.prototype.onRemove=t.prototype.onRemove;
})();
</script>
<script type="text/javascript">
var map;
function initialize() {
map = new google.maps.Map(document.getElementById('map'), {
zoom: 15,
center: new google.maps.LatLng(<?php echo $mapnew; ?>),
mapTypeControl: true,
mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
zoomControl: true,
zoomControlOptions: {style: google.maps.ZoomControlStyle.SMALL},
mapTypeId: google.maps.MapTypeId.HYBRID
});
markerCluster = new MarkerClusterer(map);
markers = new google.maps.Marker({
position: new google.maps.LatLng(<?php echo $mapnew; ?>),
map: map,
title: '<?php echo $this->item->title; ?>',
clickable: true
});
infowindow = new google.maps.InfoWindow({
maxWidth: 305,
content: '<div style="padding: 5px;"><div style="text-align:left;"><?php echo $this->item->title; ?></div></div>'});
google.maps.event.addListener(markers, "click", function() {
infowindow.open(map,markers);
});
jQuery(document).ready(function() {
markerCluster.addMarker(markers);
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
*/ ?>
<script src="https://api-maps.yandex.ru/2.1/?apikey=64df7608-6819-4d82-a65b-b31f266d9ce2&lang=ru_RU" type="text/javascript"></script>
<script type="text/javascript">
ymaps.ready(init);
function init() {
myMap = new ymaps.Map('map', {
center: [<?php echo $mapnew; ?>],
zoom: 14,
controls: ['smallMapDefaultSet','routeButtonControl']
})
myPlacemark = new ymaps.Placemark([<?php echo $mapnew; ?>], {
balloonContentHeader: "<?php echo $this->item->title; ?>",
balloonContentBody: "<?php echo $this->escape(strip_tags($adress)); ?>",
hintContent: "<?php echo $this->item->title; ?>"
});
myMap.geoObjects.add(myPlacemark);
var control = myMap.controls.get('routeButtonControl');
control.routePanel.geolocate('from');
control.routePanel.state.set({
to: '<?php echo $mapnew; ?>'
});
control.routePanel.options.set({
allowSwitch: false,
reverseGeocoding: false,
types: { auto: true, masstransit: true, pedestrian: false, taxi: true }
});
}
</script>
<div id="map">
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php } ?>
<?php
// что рядом //////////////////////////////////////////////////
/*
if(!empty($resultnear) && count($resultnear)> 1){
$this->item->resultnear = $resultnear;
$this->setLayout('article-nearby');
echo $this->loadTemplate();
}
*/
// что рядом //////////////////////////////////////////////////
?>
</div>
<div class="row borderbottom">
<div class="col-md-12">
<p class="greycolor"><br/>Нравится <?php echo $this->item->title;?>? Поделись с друзьями!</p>
<script src="https://yastatic.net/es5-shims/0.0.2/es5-shims.min.js"></script>
<script src="https://yastatic.net/share2/share.js"></script>
<div class="ya-share2" data-services="collections,vkontakte,facebook,odnoklassniki,twitter,linkedin,viber,whatsapp,telegram"></div>
</br/>
<p class="greycolor hidden-xs"><br/>Обнаружили ошибку? Выделите текст и нажмите Ctrl + Enter</p>
</div>
<?php
JModelLegacy::addIncludePath(JPATH_ROOT . '/components/com_banners/models', 'BannersModel');
JLoader::register('BannerHelper', JPATH_ROOT . '/components/com_banners/helpers/banner.php');
$model = JModelLegacy::getInstance('Banners', 'BannersModel', array('ignore_request' => true));
$model->setState('filter.client_id', 0);
$model->setState('filter.category_id', 385);
$model->setState('list.limit', 1);
$model->setState('list.start', 0);
$model->setState('filter.ordering', 'random');
$banners = $model->getItems();
if ($banners){
$model->impress();
if(isset($banners[0]) && !empty($banners[0])){
$this->banner = $banners[0];
$this->setLayout('banners');
echo '<div class="col-md-12">'.$this->loadTemplate().'</div>';
}
}
?>
<?php
// читайте также ///////////////////////////////////
$db = JFactory::getDBO();
$query = '';
$query = 'SELECT * FROM #__content WHERE state = 1 AND featured = 0 AND catid = '.$this->item->catid.' ORDER BY RAND() LIMIT 11';
$db->setQuery( $query );
$result = $db->loadObjectList();
$query = '';
$query = 'SELECT * FROM #__content WHERE state = 1 AND featured = 1 AND catid = '.$this->item->catid.' ORDER BY RAND() LIMIT 11';
$db->setQuery( $query );
$resultfeatured = $db->loadObjectList();
if(!empty($result) || !empty($resultfeatured)){
echo '<div class="clear"></div>';
?>
<div class="col-md-12 products-area lookmore-area">
<h3><span>Смотрите также</span></h3>
<div class="lookmore-swiper lookmore-swiper-katalog swiper">
<div class="swiper-wrapper">
<?php
$i = 0;
// Сначала рекомендуемые
foreach ($resultfeatured as $item) {
$itemimage = '';
$itemimage = imagemaker::makeimage($item->id, 460, 300, 3, $item->title);
$item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->id, $item->catid));
if(!empty($itemimage) && $item->id != $this->item->id && $i < 11){
$i++;
$adress = geturbisfield::fieldvalue($item->id, 50, false);
?>
<div class="swiper-slide">
<div class="prod-item katitem">
<div class="insideitem">
<div class="katitemimage">
<a href="<?php echo $item->link;?>">
<?php echo $itemimage;?>
</a>
</div>
<div class="katitemtext">
<div class="itemtitle itemtitlebidder">
<a href="<?php echo $item->link;?>"><?php echo $item->title;?></a>
</div>
<?php if(!empty($adress)): ?>
<div class="singlecontact">
<span><i class="fa fa-map-marker"></i> </span> <?php echo $adress; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php
}
}
// Потом обычные
foreach ($result as $item) {
$itemimage = '';
$itemimage = imagemaker::makeimage($item->id, 460, 300, 3, $item->title);
$item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->id, $item->catid));
if(!empty($itemimage) && $item->id != $this->item->id && $i < 11){
$i++;
$adress = geturbisfield::fieldvalue($item->id, 50, false);
?>
<div class="swiper-slide">
<div class="prod-item katitem">
<div class="insideitem">
<div class="katitemimage">
<a href="<?php echo $item->link;?>">
<?php echo $itemimage;?>
</a>
</div>
<div class="katitemtext">
<div class="itemtitle itemtitlebidder">
<a href="<?php echo $item->link;?>"><?php echo $item->title;?></a>
</div>
<?php if(!empty($adress)): ?>
<div class="singlecontact">
<span><i class="fa fa-map-marker"></i> </span> <?php echo $adress; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php
}
}
?>
</div>
</div>
</div>
<?php
echo '</div>';
/////////////////////////////////////////
}
?>
</div>
<div class="row">
<div class="col-md-12">
<?php
jimport('joomla.application.module.helper');
$modules = JModuleHelper::getModules('reklamny-blok-niz');
foreach ($modules as $module) {
//echo JModuleHelper::renderModule($module->title);
echo JModuleHelper::renderModule($module);
}
?>
</div></div>
<div class="clear"><br/></div>
<?php if($userId && !$user->get('guest')){
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
$customFields = FieldsHelper::getFields('com_users.user', $user, true);
?>
<div class="modal fade" id="callprava" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Получить права на объект: <?php echo str_ireplace('|', '<br />', $this->item->title); ?></h4>
</div>
<div class="modal-body">
<div class="formholder metalform">
<form method="post" action="#" class="webforms" enctype="multipart/form-data">
<div class="formholder">
<?php /*
<div xmlns="http://www.w3.org/1999/xhtml" class="line">
<div class="name">Наименование организации, УНП:</div>
<input type="text" name="data-tovar" placeholder="" class="input"></input></div>
*/ ?>
<input type="hidden" name="data-tovar" value="Запрос прав от <?php echo $user->name.' ('.$user->email.')';?> на объект: <?php echo str_ireplace('|', '<br />', $this->item->title); ?>">
<div xmlns="http://www.w3.org/1999/xhtml" class="line required">
<div class="name">Контактное лицо:</div>
<input type="text" name="data-imya" value="<?php echo $customFields[0]->value;?>" placeholder="" class="input"></input></div>
<div xmlns="http://www.w3.org/1999/xhtml" class="line required">
<div class="name">Контактный телефон:</div>
<input type="text" name="data-telefon" placeholder="" value="<?php echo $customFields[1]->value;?>" class="input telbox"></input></div>
<div xmlns="http://www.w3.org/1999/xhtml" class="line required">
<div class="name">Электронная почта:</div>
<input type="text" name="data-mail" placeholder="" value="<?php echo $user->email;?>" class="input"></input></div>
<div xmlns="http://www.w3.org/1999/xhtml" class="line required">
<div class="name">Ваше сообщение:</div><textarea name="data-comment" placeholder="" class="input">Просьба предоставить права на объект: <?php echo str_ireplace('|', ' ', $this->item->title); ?></textarea></div>
<input type="hidden" name="data-stranica" class="data-stranica" value="">
<input type="hidden" name="data-tema" class="data-tema" value="<?php echo $this->item->id;?>">
<div class="submit"><button type="submit" class="button subbutton btn btn-primary">ОТПРАВИТЬ</button></div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php } ?>