<div id="bgpricelist">
	<div id="bopricelist">
		
		<div id="bgbreadcumb">
			<div id="bobreadcumb">
				<div class="bobreadcumbtit">
					<?php
						date_default_timezone_set("Asia/Jakarta");
						include "../libs/functiondb.php";
						
						$id = mysqli_real_escape_string($koneksi, $_GET['id']);
						$hadb = mysqli_query($koneksi, "SELECT * FROM cmas_bustype WHERE bustype_status='Aktif' AND bustype_id='$id'");
						$hadt = mysqli_fetch_array($hadb);
					?>
					<a href="./">Beranda</a> &nbsp;&#10095;&nbsp; <a href="harga-sewa-bus-pariwisata">Harga Sewa</a> &nbsp;&#10095;&nbsp; <?php echo $hadt['bustype_nama']; ?>
				</div>
			</div>
		</div>
		
		<div id="pricelisttop">
			<?php
				include "../libs/functiondb.php";
				$bndb = mysqli_query($koneksi, "SELECT * FROM cmas_banner WHERE banner_id='91'"); 
				$bndt = mysqli_fetch_array($bndb);
			?>
			<div class="pricelisttoptit">
				<h1><?php echo $bndt['banner_judul']; ?></h1>
			</div>
			<div class="pricelisttopdes">
				<?php echo $bndt['banner_deskripsi']; ?>
			</div>
		</div>
		
		<div id="pricelistmid">
			<div id="pricelistmidbox" class="clearfix">
				<?php
					include "../libs/functiondb.php";
					$hadb = mysqli_query($koneksi, "SELECT * FROM cmas_bustype WHERE bustype_status='Aktif' ORDER BY bustype_id DESC");
					while($hadt = mysqli_fetch_array($hadb)) {
				?>
					<div id="pricelistmidtab">
						<a href="0<?php echo $hadt['bustype_id']; ?>-harga-sewa-<?php echo $hadt['bustype_seo']; ?>" class="tabbutton">
							<?php echo $hadt['bustype_nama']; ?>
						</a>
					</div>
				<?php } ?>
			</div>
		</div>
		
		<div id="pricelistbot">
			<?php
				include "../libs/functiondb.php";
				$id = mysqli_real_escape_string($koneksi, $_GET['id']);
				$hadb = mysqli_query($koneksi, "SELECT * FROM cmas_bustype WHERE bustype_status='Aktif' AND bustype_id='$id'");
				$hadt = mysqli_fetch_array($hadb);
			?>
			<div class="pricelistbottit">
				<h2><?php echo $hadt['bustype_nama']; ?></h2>
			</div>
			
			<div id="priceres">
				<script type="text/javascript" charset="utf8" src="https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
				<script>
					$(document).ready(function() {
						$('#example').DataTable( {
							"iDisplayLength": 50
						} );
					} );
				</script>
				<table width="100%" cellpadding="0" cellspacing="0" border="0" class="display" id="example">
					<thead>
						<tr>
							<th></th>
						</tr>
					</thead>
					<tbody>
						<?php
							date_default_timezone_set("Asia/Jakarta");
							$today	= date("d-M-Y");
							$nomor = 1;
							$id = mysqli_real_escape_string($koneksi, $_GET['id']);
							$db = mysqli_query($koneksi, "SELECT * FROM cmas_tujuan WHERE tujuan_status='Aktif' AND bustype_id='$id' ORDER BY tujuan_id ASC");
							while($dt = mysqli_fetch_array($db)) {
						?>
							<tr valign="top">
								<td>
									<table width="100%" border="0">
										<tr>
											<td width="25%">Tujuan</td>
											<td width="1%">:</td>
											<td width="74%"><?php echo $dt['tujuan_nama']; ?></td>
										</tr>
										<tr>
											<td>Jumlah Hari</td>
											<td>:</td>
											<td><?php echo $dt['tujuan_hari']; ?></td>
										</tr>
										<tr>
											<td>Jenis Bus</td>
											<td>:</td>
											<td><?php echo $dt['bustype_nama']; ?></td>
										</tr>
										<tr>
											<td>Tarif</td>
											<td>:</td>
											<td>Rp. <?php echo number_format($dt['tujuan_harga'],0,',','.'); ?></td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td>
												<?php
													$bdb = mysqli_query($koneksi, "SELECT * FROM cmas_banner WHERE banner_id='109' AND banner_status='Aktif'");
													$bdt = mysqli_fetch_array($bdb);
													$banner_caption = $bdt['banner_url'];
												?>
												<a href="https://api.whatsapp.com/send?phone=<?php echo $banner_caption; ?>&text=Halo Bayu Berkah Trans, Saya mau booking bus pariwisata tipe: <?php echo $dt['bustype_nama']; ?>, Tujuan: <?php echo $dt['tujuan_nama']; ?> (<?php echo $dt['tujuan_hari']; ?> Hari), Tarif: Rp<?php echo number_format($dt['tujuan_harga'],0,",","."); ?>, Nama Lengkap: ____________________, Tanggal Pakai: <?php echo $today; ?>" target="_blank" class="wabutton">PESAN</a>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						<?php $nomor++; } ?>
					</tbody>
				</table>
			</div>
		</div>
		
		<div id="pricelistfot">
			<?php
				include "../libs/functiondb.php";
				$bndb = mysqli_query($koneksi, "SELECT * FROM cmas_banner WHERE banner_id='76'"); 
				$bndt = mysqli_fetch_array($bndb);
			?>
			<div class="pricelisttoptit">
				<h2><?php echo $bndt['banner_judul']; ?></h2>
			</div>
			<div class="pricelisttopdes">
				<?php echo $bndt['banner_deskripsi']; ?>
			</div>
		</div>
		
		<div id="pricelistfot">
			<?php
				include "../libs/functiondb.php";
				$bndb = mysqli_query($koneksi, "SELECT * FROM cmas_banner WHERE banner_id='92'"); 
				$bndt = mysqli_fetch_array($bndb);
			?>
			<div class="pricelisttoptit">
				<h2><?php echo $bndt['banner_judul']; ?></h2>
			</div>
			<div class="pricelisttopdes">
				<?php echo $bndt['banner_deskripsi']; ?>
			</div>
		</div>
	</div>
</div>