<?php
$array_tab = array (
	'tei2021_4_en'	=> '4<sup>th</sup> Edition',
	'tei2021_4'     => 'Edisi 4',
	'tei2021_3_en'	=> '3<sup>rd</sup> Edition',
	'tei2021_3'     => 'Edisi 3',
	'tei2021_2_en'  => '2<suo>nd</sup> Edition',
	'tei2021_2'     => 'Edisi 2',
	'tei2021_1_en'  => '1<suo>st</sup> Edition',
	'tei2021_1'     => 'Edisi 1'
);

echo '
<p>
	<h2 class="h2-teasers">
		Journal of Trade Expo Indonesia 2021 Digital Edition
	</h2?
</p>
<div style="margin-top:10px">
	<div class="tabsy">';
		$table = '';
		$firstTab = (isset($_REQUEST["firstTab"])?$_REQUEST["firstTab"]:'tei2021_4_en'); //'2019-10-16'; // 
		foreach ($array_tab as $key => $value) {
			$opsi = ($key == $firstTab ? 'checked' : '');
			echo '
			<input type="radio" id="tab'.$key.'" name="tab" '.$opsi.'>
			<label style="margin:0;" class="tabButton" for="tab'.$key.'">'.$value.'</label>
			<div class="tab">
				<div class="content" style="padding:0">';	
					echo 
					$key($table).'
				</div>
			</div>';
		}
		echo '
	</div>
</div>';

function tei2021_4_en (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-4th-Edition_en.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-4th-Edition_en.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}

function tei2021_4 (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-4th-Edition.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-4th-Edition.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}


function tei2021_3_en (&$table) {	
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-3rd-Edition_en.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-3rd-Edition_en.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}

function tei2021_3 (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-3rd-Edition.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-3rd-Edition.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}

function tei2021_2_en (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-2nd-Edition_en.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-2nd-Edition_en.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}

function tei2021_2 (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-2nd-Edition.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-2nd-Edition.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}

function tei2021_1 (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-1st-Edition.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-1st-Edition.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}

function tei2021_1_en (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-1st-Edition_en.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-DE-2021-1st-Edition_en.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}


$array_tab = array (
	'sales_kit_day1'  => '1<suo>st</sup> Edition',
	'sales_kit_day2'  => '2<suo>nd</sup> Edition',
	'sales_kit_day3'  => '3<suo>rd</sup> Edition'
);
	
echo '
<p>
	<h2 class="h2-teasers">
		Journal of Trade Expo Indonesia 2020 Virtual Exhibition
	</h2?
</p>
<div style="margin-top:10px">
	<div class="tabsy">';
		$table = '';
		$firstTab = 'sales_kit_day1'; //'2019-10-16'; // 
		foreach ($array_tab as $key => $value) {
			//$opsi = ($key == $firstTab ? 'checked' : '');
			echo '
			<input type="radio" id="tab'.$key.'" name="tab">
			<label style="margin:0;" class="tabButton" for="tab'.$key.'">'.$value.'</label>
			<div class="tab">
				<div class="content" style="padding:0">';	
					echo 
					$key($table).'
				</div>
			</div>';
		}
		echo '
	</div>
</div>';
	
	
function sales_kit_day1 (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-VE-2020-1st-Edition.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-VE-2020-1st-Edition.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}

function sales_kit_day2 (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-VE-2020-2nd-Edition.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-VE-2020-2nd-Edition.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}
function sales_kit_day3 (&$table) {
	global $thisPage;
	$table = '';
	$array_link = array (
		array (
			"pdf" => $thisPage."media-center/journal/pdf/Jurnal-TEI-VE-2020-3rd-Edition.pdf",
			"zip" => $thisPage."media-center/journal/pdf/Jurnal-TEI-VE-2020-3rd-Edition.pdf"
		)
	);
	foreach ($array_link as $arrLink) {
		if ($table) 
		$table .= '
		<hr class="style15"><br>';			
		$table .= '
		<object data="'.$arrLink["pdf"].'" type="application/pdf" width="100%" height="500px"> 
			<p>It appears you don\'t have a PDF plugin for this browser.
			No biggie... you can <a href="'.$arrLink["pdf"].'">click here to download the PDF file.</a></p>  
		</object>';
		$table .= '
		<div align="center" style="padding:15px 0px 20px 0px">
			<a target="_blank" href="'.$arrLink["zip"].'" class="hvr-sweep-to-right">
				Click to download
			</a>
		</div>';
	}
	return $table;
}
?>