File: /var/www/vhosts/creativefellows.nl/figi.creativefellows.nl/views/view.theatre_details.php
<?php
/*
* Get Header
*/
$header_top_color = "has-showcase";
require_once 'inc/header.php';
//d($data["show"]);
/*
* Showcase intro
*/
$html = '<div class="grid-container foreground">
<div class="grid-x grid-padding-x align-middle">
<div class="small-12 cell">
<div class="column-wrapper">
'. ( $youtube = $data["show"]->getYoutubePreview() ? '<a class="play-trailer" data-toggle="show-trailer" date-video-id="'. $data["show"]->getYoutubePreview() .'"><i class="fas fa-play"></i></a>' : '' ) .'
<h1>'. $data["show"]->getArtist() .'</h1>
<h2>'. $data["show"]->getLead() .'</h2>
'. ($data["show"]->visibleOnSite() ? '<p><a class="button primary large" href="#tickets-tijden" data-smooth-scroll>Bestel Tickets'. $data["show"]->globalShowLabel() .'</a></p>' : '' ) .'
</div>
</div>
</div>
</div>
<div class="background">'. $data["show"]->getBackdropImg() .'</div>
<div id="show-trailer" class="trailer" style="display:none;" data-toggler data-closable data-animate="fade-in fade-out"><button class="close-button" data-close>×</button><div id="player"></div></div>';
echo $data["config"]->wrapAsSection($html,"","backdrop-image tickets");
/*
* Show details
*/
$html = '<div class="grid-container">';
$html .= '<div class="grid-x grid-padding-x">';
// Show Description
$html .= '<div class="cell small-6 small-offset-3 medium-2 medium-offset-1 medium-order-1">';
$html .= '<div class="poster-image">'. $data["show"]->getPosterImage() .'</div>';
$html .= '</div>';
$html .= '<div class="cell small-12 medium-8 medium-order-2">';
$html .= '<h1>'. $data["show"]->getArtist() .'</h1>';
$html .= '<ul class="no-bullet show-specifications">';
if($data["show"]->getDate()) $html .= '<li>'. $data["show"]->getDate() .'</li>';
if($data["show"]->getTime()) $html .= '<li>'. $data["show"]->getTime() .'</li>';
if($data["show"]->getGenre()) $html .= '<li>'. $data["show"]->getGenre() .'</li>';
if($data["show"]->getPrice()) $html .= '<li>'. $data["show"]->getPrice() .'</li>';
$html .= '</ul>';
$html .= $data["show"]->getDescLong();// .'</p>';
$html .= '</div>';
$html .= '</div>';
// output data as section
echo $data["config"]->wrapAsSection($html,"","show-details");
/*
* Op website
*
* Standaard => status = normaal
* Uitverkocht => status = uitverkocht
* Niet boekbaar => status = niet reserveerbaar
* Niet op site => status =
* Wel op site => status =
*
*/
/*
* Show Tickets
*/
$html = '<div class="grid-container">';
$html .= '<div class="grid-x grid-padding-x">';
$html .= '<div class="cell small-12 text-center">';
$html .= '<h2>Tijden & Tickets</h2>';
$html .= '</div>';
$html .= '<div class="cell small-12 medium-10 medium-offset-1 text-center">';
$html .= '<div class="grid-x grid-padding-x small-up-2 medium-up-3 large-up-7 align-center">';
$timeblocks = [
["start" => 0, "end" => 12],
["start" => 12, "end" => 15],
["start" => 15, "end" => 18],
["start" => 18, "end" => 20],
["start" => 20, "end" => 24]
];
foreach($data["show"]->event_shows as $day => $shows)
{
$html .= '<div class="cell text-center day-option">';
$html .= '<h5>'. strftime("%a %e %B",strtotime($day)) .'</h5>';
foreach($timeblocks as $block)
{
//d($block);
//if($data["show"]->min_start_time >= $block['start'] && $data["show"]->min_start_time >= $block['end'] ) continue;
//$html .= '<td>';
foreach($shows as $show)
{
$hour_start = strftime("%H",strtotime($show["start"]));
if( $hour_start >= $block['start'] && $hour_start < $block['end'] ){
$html .= '<a href="https://getaticket.nl/figi/bestellen/s'. $show["id"] .'" class="button hollow expanded">';
$html .= strftime("%H:%M",strtotime($show["start"]));
if( isset($show["end"]) ) $html .= ' <span>-</span> '. strftime("%H:%M",strtotime($show["end"]));
if( $show["label"] ) $html .= $show["label"];
$html .= '</a>';
}
}
//$html .= '</td>';
}
$html .= '</div>';
}
$html .= '</div>';
$html .= '</div>';
$html .= '</div>';
$html .= '</div>';
$html .= '</div>';
// output data as section if GAT is visible on site
if( $data["show"]->visibleOnSite() ) echo $data["config"]->wrapAsSection($html,"tickets-tijden","panel-gray show-schedule");
/*
* Alternative options
*/
$alt = '<div class="grid-container">';
$alt .= '<div class="grid-x grid-padding-x">';
$alt .= '<div class="small-12 cell text-center">';
$alt .= "<h2>Kijk ook eens naar</h2>";
$alt .= '</div>';
$alt .= '</div>';
$alt .= '<div class="grid-x grid-padding-x small-up-2 medium-up-3 large-up-4 figi-shows" data-equalizer data-equalize-on="medium">';
foreach($data["alternative_shows"] as $i => $alt_show)
{
if($i >= 4) continue;
$alt .= '<div class="cell show">';
$alt .= '<div class="card">';
$alt .= '<div class="card-image"><a href="'. $alt_show->getShowLink() .'">'. $alt_show->getShowImage() .'</a></div>';
$alt .= '<div class="card-section" data-equalizer-watch>';
$alt .= '<h4><a href="'. $alt_show->getShowLink() .'">'. $alt_show->getArtist() .'</a></h4>';
$alt .= '<p>'. $alt_show->getLead() .'</p>';
$alt .= '</div>';
$alt .= '</div>';
$alt .= '</div>';
}
$alt .= '</div>';
$alt .= '</div>';
// output data as section if GAT is visible on site
if($data["alternative_shows"]) echo $data["config"]->wrapAsSection($alt,null,"panel-alternative");
/*
* Get Footer
*/
require_once 'inc/footer.php';
?>