<?php include '../libs/functiondb.php'; ?>
<div id="bgright" class="clearfix">
	<?php 
		$bdb = mysqli_query($koneksi, "SELECT * FROM cmas_banner WHERE bannerkat_nama='right' AND banner_status='Aktif'");
		while($bdt = mysqli_fetch_array($bdb)) {
		$imgid = $bdt['banner_imageid'];
		if ($imgid == "0") {
		?>
			<div id="right">
				<div class="righttitle"><?php echo $bdt['banner_judul']; ?></div>
				<div class="rightdesc"><?php echo $bdt['banner_deskripsi']; ?></div>
			</div>
		<?php } else { ?>
			<div id="right">
				<div class="righttitle"><?php echo $bdt['banner_judul']; ?></div>
				<div class="rightdesc">
					<a href="<?php echo $bdt['banner_url']; ?>" target="_blank">
						<img src="assets/images/banner/<?php echo $bdt['banner_image']; ?>" alt="Promo Bus Medium 30%" title="Promo Bus Medium 30%">
					</a>
				</div>
			</div>
		<?php } ?>
	<?php } ?>
</div>