"; $navigation_script.=" "; if(empty($spectacle_id)){ $performance_id = $id; $query = "select DATE_FORMAT(start, '%Y-%c-%e'), DATE_FORMAT(start, '%w'), DATE_FORMAT(start, '%H:%i'), DATE_FORMAT(finish, '%Y-%c-%e'), DATE_FORMAT(finish, '%H:%i'), spectacle_id, place, unifd_performance_id, id, longtime from performances where id=$performance_id"; $result = sql($query); list($startDay, $v, $beginningTime, $finishDay, $closingTime, $spectacle_id, $place, $unifd_performance_id, $id, $longtime)=$result[0]; } else { $beginningTimeDiv = " "; } $table_name='spectacles'; $id = $spectacle_id; $unlanguageAllValues=1; include("$rootpath/system/read_record.php"); $divAuthor=spectacleAuthorDiv($spectacle_id); $thumbik = thumbnail($table_name, $spectacle_id, "poster"); if($thumbik['exists']) { $ext=$thumbik['ext']; $poster_src="$htmlrootpath/static/1600/".$thumbik['id'].".$ext"; $poster_id = $thumbik['id']; if($thumbik['about']) $posterCaption = "
".$thumbik['about']."
"; /*$dom_ready_scripts[]=" function adjustPosterBg(){ var poster = $('.poster .thumb'); var width = poster.width(); if(width>650){ bg = '$htmlrootpath/static/1024/$poster_id.$ext'; } else { bg = '$htmlrootpath/static/650/$poster_id.$ext'; } poster.css('background-image', 'url(' + bg + ')'); } adjustPosterBg(); "; $adjustPosterBgOnResize = "adjustPosterBg();";*/ $meta_og_image = meta_og_image($thumbik); } else { $poster_src="$htmlrootpath/images/trans.gif"; } if(trim($trailer)!=''){ preg_match('/src="([^"]+)"/', $trailer, $match); $trailerUrl = $match[1]; $trailerIframe = ''; //echo "
trailerUrl=$trailerUrl"; $switchTrailer="".unlanguage("Смотреть трейлер###Watch the trailer").""; $viewTrailer="
"; $dom_ready_scripts[]=" var TrailerLoaded=0; $('a.switchTrailer').click(function(){ $('.poster').addClass('trailerPlaying'); if(!TrailerLoaded){ TrailerLoaded=1; $('.poster .trailer').html('".$trailerIframe."'); } else { $('#youtube_player')[0].contentWindow.postMessage('{\"event\":\"command\",\"func\":\"' + 'playVideo' + '\",\"args\":\"\"}', '*'); } return false; }); $('a.stopTrailer').on('click', function(){ $('#youtube_player')[0].contentWindow.postMessage('{\"event\":\"command\",\"func\":\"' + 'pauseVideo' + '\",\"args\":\"\"}', '*'); $('.poster').removeClass('trailerPlaying'); return false; }) $('a.muteTrailer').on('click', function(){ if($('.poster .trailer').is('.muted')){ $('#youtube_player')[0].contentWindow.postMessage('{\"event\":\"command\",\"func\":\"' + 'unMute' + '\",\"args\":\"\"}', '*'); } else { $('#youtube_player')[0].contentWindow.postMessage('{\"event\":\"command\",\"func\":\"' + 'mute' + '\",\"args\":\"\"}', '*'); } $('.poster .trailer').toggleClass('muted'); return false; }) "; } $page_title=$title; if($longtime){ $longtimeInterval = longtimeInterval($startDay, $finishDay); $beginningTime="$longtimeInterval, $beginningTime – $closingTime"; } else { $beginningTime = date_weekday_string($startDay, -1).", $beginningTime"; } if($type) $tops[]=get_title('spectacles_types', $type); if($place) $tops[]=get_title('places', $place); if(is_array($tops)) $topsList="
".join($tops, ', '); if(empty($beginningTimeDiv)){ $beginningTimeDiv="
$beginningTime$topsList
"; } if($org!=0){ list($otitle, $resident) = get_titles('organizers', $org, 'title, resident'); $backlink2="$otitle"; } else { $backlink2="".unlanguage("События###Events").""; } $zagolovok="
".unlanguage("Электрозона###Electrozone")." $backlink2 ".controls($performance_id, 'performances')."
$posterCaption
$beginningTimeDiv

$title

$subtitle
$divAuthor $switchTrailer
$viewTrailer
"; //About if(trim($premiereText)!=''){ $premiereText="

$premiereText

"; } if(trim($about)!=''){ $about="
$about".controls($spectacle_id, 'spectacles', $display)."
"; } if(trim($more)!=''){ $more="
".unlanguage("Читать дальше###Read more")."
$more
"; } //Цитаты $result = sql("select title from quotes where spectacle_id='$spectacle_id' order by n"); foreach($result as $item){ list($quote, $status)=$item; $quotes[] = "
".unlanguage($quote)."
"; } if(is_array($quotes)){ $quotes_count = count($quotes); if($quotes_count>1){ $quotes_nav="
"; $quotes_navi=""; $dom_ready_scripts[]=" $('.quotes .scrollable').scrollable({ speed:600, circular: false, mousewheel: false, autoscroll: false }).navigator();"; } $quotesList="
$quotes_nav
".join($quotes)."
$quotes_navi
"; } $item_title=unlanguage("Информация###About"); $page_items_navs[]="$item_title"; if($other){ $spectacleNearest="
$other
"; } $page_items[]="
$childList
".unlanguage("Поделиться###Share this").": $yashare
$spectacleNearest
$premiereText $about $more $quotesList
"; //Организаторы!!! $result = sql("select organizer_id from spectacles_organizers_lnk where spectacle_id='$spectacle_id' order by n"); foreach($result as $item){ list($organizer_id)=$item; $organizers[] = organizerPreview($organizer_id); } if(is_array($organizers)){ $item_title=unlanguage("Организаторы###Organizers"); $page_items_navs[]="$item_title"; $page_items[]="

$item_title

".join($organizers)."
"; } //Создатели if(!$compound){ $result = sql("select people_id, status from spectacles_creators_lnk where spectacle_id='$spectacle_id' order by n"); foreach($result as $item){ list($people_id, $status)=$item; $creators[] = personPreview($people_id, $status); } } else { $child_result=sql("select id from spectacles where parent='$spectacle_id' order by n"); foreach($child_result as $child_item){ list($child_id)=$child_item; $result = sql("select people_id, status from spectacles_creators_lnk where spectacle_id='$child_id' order by n"); foreach($result as $item){ list($people_id, $status)=$item; $creators[$people_id] = personPreview($people_id, $status); } } } if(is_array($creators)){ $item_title=unlanguage("Участники###Participants"); $page_items_navs[]="$item_title"; $page_items[]="

$item_title

".join($creators)."
"; } //галерея $result=sql("select id, cat from media where id in (".objectMeidaQuery('spectacles', $spectacle_id, "'albums', 'movies', 'audio'").") "); foreach($result as $item){ list($sid, $cat)=$item; if($cat=='movies') $gallery_rows[]=moviePreview($sid); if($cat=='albums') $gallery_rows[]=albumPreview($sid); if($cat=='audio') $gallery_rows[]= audioPreview($sid); } if(is_array($gallery_rows)){ $item_title=unlanguage("Галерея###Gallery"); $page_items_navs[]="$item_title"; $page_items[]="

$item_title

".join($gallery_rows)."
"; } $result=sql("select id, cat from media where id in (".objectMeidaQuery('spectacles', $spectacle_id, "'press', 'texts'").") "); foreach($result as $item){ list($sid)=$item; $stuff_rows[]=stuffPreview($sid); } if(is_array($stuff_rows)){ $item_title=unlanguage("Пресса###Press"); $page_items_navs[]="$item_title"; $page_items[]="

$item_title

".join($stuff_rows)."
"; } if(is_array($page_items)){ if($price) $minPriceString=unlanguage("от###from")." $price ₽"; if($unifd_performance_id) { $baton_buy_tickets = "".unlanguage("Купить билеты###Book tickets")." $minPriceString"; } if($timepad) { // $baton_register = "".unlanguage("Бесплатная регистрация###Free registration").""; // $baton_register = "".unlanguage("Бесплатная регистрация###Free registration").""; $baton_register = "".unlanguage("Бесплатная регистрация###Free registration").""; } $this_content .= "
".join($page_items_navs)."
$age+
$baton_buy_tickets $baton_register
"; $this_content .= "
".join($page_items)."
"; } /* if($parent){ $result=sql("select id from spectacles where id<>'$parent' and parent=0 and display=1"); } else { $result=sql("select id from spectacles where id<>'$spectacle_id' and parent=0 and display=1"); } foreach($result as $item){ list($sid)=$item; $also_spectacles_rows[]=spectaclePreview($sid); } */ if(empty($org)){ $also_spectacles_rows = nextMonthEvents($performance_id); } if(is_array($also_spectacles_rows)){ $also_spectacles_count = count($also_spectacles_rows); if($also_spectacles_count>3){ /*$dom_ready_scripts[]=" $('.alsoList .scrollable').scrollable({ speed:600, circular: false, mousewheel: false, autoscroll: false, onSeek: function(event, index) { if (this.getIndex() >= this.getSize() - 3) { $('.alsoList .scrollnav a.next').addClass('disabled'); } }, onBeforeSeek: function(event, index) { if (this.getIndex() >= this.getSize() - 3) { if (index > this.getIndex()) { return false; } } } });"; $also_spectacles_navigator=" ";*/ } $this_content .= '

Смотрите также '.$also_spectacles_navigator.' '.unlanguage("Все события###All events").'

'.join($also_spectacles_rows).'
'; } $dom_ready_scripts[]=" page_items_menu_start_pos=$('.page_items_menu').offset().top; $('.page_items_menu a').click(function(){ var rel=$(this).attr('rel') $('html, body').animate({ scrollTop: $('.page_item[rel='+rel+']').offset().top + 5 - $('.page_items_menu').outerHeight() }, 1000); return false; }) ".($also_spectacles_count?" var also_spectaclesHeight =equalizeRows('.alsoList .spectacles .item', $also_spectacles_count); $('.alsoList .scrollable').height(also_spectaclesHeight); ":"")." equalizeRows('.galleries .blockList .item', 4); equalizeRows('.stuffs .blockList .item', 4); ".($quotes_count?" var quotesHeight =equalizeRows('.quotes .item', $quotes_count); $('.quotes .scrollable').height(quotesHeight); ":"")." $( window ).resize(function() { ".($also_spectacles_count?" var also_spectaclesHeight =equalizeRows('.alsoList .spectacles .item', $also_spectacles_count); $('.alsoList .scrollable').height(also_spectaclesHeight); ":"")." equalizeRows('.galleries .blockList .item', 4); equalizeRows('.stuffs .blockList .item', 4); $adjustPosterBgOnResize }) "; $bodyclass .= ' spectacle'; echo standard_content($zagolovok.$this_content); ?>