<style>
	.hvr-sweep-to-right{
		padding:6px; 
		width:120px;
		text-align:center;
	}
	.custom th {
		height:43px;
		font-size:16px;
		line-height:25px;
		background-color:#eeeeee;
		color:#000000;
		border:0;
		border-bottom: 2px double #333333;
	}
	.custom td {
		font-size:15px;
		line-height:18px;
		background-color:#eeeeee;
		border:0;
		border-bottom: 1px solid #333333;
		height:43px;
	}
	.align-center {
		text-align:center;
	}
	.no-padding {
		padding:0;
	}
	.no-margin {
		margin:0;
	}
	.padding25 {
		padding-top:25px;
	}	
</style>

<?php
$array_tab = array (
	'1'  => 'Day 1',
	'54' => 'Day 2',
	'57' => 'Day 3',
	'61' => 'Day 4',
	'65' => 'Day 5',
	'68' => 'Day 6',
	'73' => 'Day 7',
	'78' => 'Day 8',
	'83' => 'Day 9',
	'87' => 'Day 10',
	'93' => 'Day 11'
);

echo '
<h3 style="text-align:center; margin:0px" class="h3-teaser">
	Bird\'s-eye View of the Programmes & Activities <br>
	at the 36<sup>th</sup> Trade Expo Indonesia 2021 Digital Edition
</h3>
<div style="margin-top:15px">
	<div class="tabsy">';
		$table = '';
		$firstTab = '1'; //'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 
					f_listData($key).'
				</div>
			</div>';
		}
		echo '
	</div>
</div>';
?>

<?php
function f_listData ($key) {
	global $thisPage; $table = '';
	
	$sql = 
	" SELECT * FROM agenda ".
	" WHERE parentID = '".$key."' ".
	" ORDER BY id ";
	if ($result = mysql_query($sql)) {
		while ($row = mysql_fetch_array($result)) {
			$tanggal = $row["tanggal"];
			$table .= '
			<tr>
				<td width="12%">'.$row["jam"].'</td>
				<td width="50%">'.$row["nama_acara"].'</td>
				<td width="1%">&nbsp;</td>
				<td width="20%">'.$row["tempat"].'</td>
				<td width="17%" style="text-align:right" align="right">';
					if ($row["link"] != '') {
						$table .= '
						<a href="'.$row["link"].'" target="_blank" class="hvr-sweep-to-right">
							Register now >>
						</a>';
					}
					$table .= '
				</td>
			</tr>';	
		}
	}
	
	$table = '
	<div style="background-color:#DDDDDD; margin-bottom:18px">
		<table class="custom">
			<tr>
				<td style="height:18px">
					<h3 class="h4-teaser" style="padding:0; margin:0">
						'.date("l - F d, Y", strtotime($tanggal)).' <br>
					</h3>
				</td>
				<td style="text-align:right; height:18px">
					<strong>Jakarta Standard Time (GMT + 07)</strong>
				</td>
			</tr>
		</table>
	</div>
	<div style="overflow-x: scroll;">
		<table class="custom">
			<tr>
				<th><strong>TIME</strong></th>
				<th><strong>DESCRIPTION</strong></th>
				<th><strong>&nbsp;</strong></th>
				<th colspan="2"><strong>VENUE</strong></th>
			</tr>
			'.$table.'
		</table>
	</div>';
		
	return $table;
}
?>