HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/test.creativefellows.nl/figi/bu/views/view.cinema_details.php
<?php
		
	/*
	 * Get Header
	 */
	$header_top_color = "has-showcase";
	require_once 'inc/header.php';
	
	//d($data["show"]);
	
	/*
	 * Showcase 
	 */
	$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>						
							<p><a class="button primary large" href="#tickets-tijden" data-smooth-scroll>Bestel Tickets</a></p>							
							<div class="poster hide">'.  $data["show"]->getPosterImage() .'</div>
						</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>&times;</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 text-center medium-text-left">';
				
					$html .= '<h1>'. $data["show"]->getArtist()  .'</h1>';	
					$html .= '<ul class="no-bullet show-specifications">';
						if( $data["show"]->hasRating() ) $html .= '<li>'. $data["show"]->getIcons() .'</li>';
						$html .= '<li>'. $data["show"]->getGenre() .'</li>';
						$html .= '<li>'. $data["show"]->getDuration() .'</li>';
						$html .= '<li>'. $data["show"]->getShowPrice() .'</li>';
					$html .= '</ul>';

					// both short and long text exist
					if($data["show"]->getTextIntro() && $data["show"]->getDescLong() )
					{
						$html .= '<p>'. $data["show"]->getTextIntro() .'</p>';
						$html .= '<p><button class="button primary" data-toggle="intro-sequal">Lees meer</button></p>';
						$html .= '<p id="intro-sequal" data-toggler data-animate="hinge-in-from-top hinge-out-from-top" style="display:none;">'. $data["show"]->getDescLong() .'</p>';	
					}
					// only long text
					else
					{
						$html .= '<p>'. $data["show"]->getDescLong() .'</p>';	
					}
					
				$html .= '</div>';
				
		$html .= '</div>';
	$html .= '</div>';
	
	
	// output data as section
	echo $data["config"]->wrapAsSection($html,"","show-details");
	
	
	
	/*
	 * 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 &amp; 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)
								{	
									//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">'. strftime("%H:%M",strtotime($show["start"])) .'</a>'; 
											// <span> tot </span> '. strftime("%H:%M",strtotime($show["end"])) .'
											
										}
																	
									//$html .= '</td>';
		
								}
							
							$html .= '</div>';
						
						
			
						}
			

			$html .= '</div>';
			
			
			$html .= '</div>';
			
			
		$html .= '</div>';
			
		$html .= '</div>';
	$html .= '</div>';
	
	
	// output data as section
	echo $data["config"]->wrapAsSection($html,"tickets-tijden","panel-gray show-schedule");

	/*
	$html .= '<div class="small-12 medium-5 cell show-schedule medium-order-2">';
	
		$html .= '<h3 style="margin-top:0;">Tijden en tickets</h3>';					
	
		$html .= '<table class="text-center">';
	    $html .= '<thead>';
		    $html .= '<tr>';
				$html .= '<th class="day text-center">Dag</th>';
				$html .= '<th colspan="5">Voorstelling</th>';
			$html .= '</tr>';
		$html .= '</thead>';
		$html .= '<tbody>';

							
		
		$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 .= '<tr>';
				$html .= '<td class="day">'. strftime("%a %e %b",strtotime($day)) .'</td>';
			
				foreach($timeblocks as $block)
				{	
					//echo $block['start']." - ";
					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 expanded primary">'. strftime("%H:%M",strtotime($show["start"])) .'</a>';
							else '&nbsp;';
						}
																
					$html .= '</td>';
	
				}
			
			$html .= '</tr>';
		
		}
		
		
		$html .= '</tbody>';
		$html .= '</table>';

	$html .= '</div>';
				*/							

	
		
	/*
	 * 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>';
		
	echo $data["config"]->wrapAsSection($alt,null,"panel-alternative");
	

	
	/*
	 * Get Footer
	 */
	require_once 'inc/footer.php';
	
	
//	d($data["show"]);
	
	
?>