<?php
	require_once("koneksi.php");
    include 'header.php';
?>
		
	<!-- breadcrumbs -->
		<div class="breadcrumbs">
			<div class="container">
				<ol class="breadcrumb breadcrumb1 animated wow slideInLeft" data-wow-delay=".5s">
					<li><a href="index.php"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>Beranda</a></li>
					<li class="active">Penawaran Terbaik</li>
				</ol>
			</div>
		</div>
	<!-- //breadcrumbs -->
	<!-- top-brands -->
		<div class="top-brands">
			<div class="container">
			<h2>Penawaran terbaik</h2>
				<div class="grid_3 grid_5">
					<div class="bs-example bs-example-tabs" role="tabpanel" data-example-id="togglable-tabs">
						<ul id="myTab" class="nav nav-tabs" role="tablist">
							<li role="presentation" class="active"><a href="#expeditions" id="expeditions-tab" role="tab" data-toggle="tab" aria-controls="expeditions" aria-expanded="true">Penjualan Terbaik</a></li>
							<li role="presentation"><a href="#tours" role="tab" id="tours-tab" data-toggle="tab" aria-controls="tours">Segera Hadir</a></li>
						</ul>
						<div id="myTabContent" class="tab-content">
							<div role="tabpanel" class="tab-pane fade in active" id="expeditions" aria-labelledby="expeditions-tab">
								<div class="agile-tp">
									<h5>Buku terlaris</h5>
									<p class="w3l-ad">Berikut daftar buku dengan penjualan terbaik dalam bulan ini.</p>
								</div>
								<div class="agile_top_brands_grids">
									<?php
										$sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 2 ORDER BY isbn DESC limit 12");
										while($data = mysql_fetch_array($sql)){
									?>
									<div class="col-md-3 top_brand_left">	
										<div class="hover14 column">
											<div class="agile_top_brand_left_grid">
												<div class="agile_top_brand_left_grid1">
													<figure>
														<div class="snipcart-item block" >
															<div class="snipcart-thumb">
																<center>
																<a href="singlebook.php?kd=<?php echo $data['isbn'];?>"><img src="<?php echo $data['gambar']; ?>" /></a>
																</center>
																<br>
																<h4><?php echo $data['judul']; ?></h4>
																<h4><?php echo $data['pengarang']; ?></h4>
																<h4><?php echo $data['penerbit']; ?></h4>
																<h4><?php echo $data['tahun']; ?></h4>
																<h4>Rp.<?php echo $data['harga']; ?>,-</h4>
															</div>
															<div class="snipcart-details top_brand_home_details">
																<form action="#" method="post">
																	<a href="detailproduk.php?kd=<?php echo $data['id_produk'];?>" />
																	<input type="submit" name="simpan" value="Tambah" class="button" />
																</form>
															</div>
														</div>
													</figure>
												</div>
											</div>
										</div>
										<br>
									</div>
									<?php   
					              		}
					              	?>
									<div class="clearfix"> </div>
									
								</div>
							</div>
							<div role="tabpanel" class="tab-pane fade" id="tours" aria-labelledby="tours-tab">
								<div class="agile-tp">
									<h5>Buku yang akan hadir</h5>
									<p class="w3l-ad">Berikut daftar buku yang akan segera hadir di toko kami.</p>
								</div>
								<div class="agile_top_brands_grids">
									<?php
										$sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 3 ORDER BY isbn DESC limit 12");
										while($data = mysql_fetch_array($sql)){
									?>
									<div class="col-md-3 top_brand_left">
										<div class="hover14 column">
											<div class="agile_top_brand_left_grid">
												<div class="agile_top_brand_left_grid1">
													<figure>
														<div class="snipcart-item block" >
															<div class="snipcart-thumb">
																<center>
																<a href="singlebook.php?kd=<?php echo $data['isbn'];?>"><img src="<?php echo $data['gambar']; ?>" /></a>
																</center>
																<br>
																<h4><?php echo $data['judul']; ?></h4>
																<h4><?php echo $data['pengarang']; ?></h4>
																<h4><?php echo $data['penerbit']; ?></h4>
																<h4><?php echo $data['tahun']; ?></h4>
																<h4>Rp.<?php echo $data['harga']; ?>,-</h4>
															</div>
														</div>
													</figure>
												</div>
											</div>
										</div>
										<br>
									</div>
									<?php   
					              		}
					              	?>
									<div class="clearfix"> </div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	<!-- //top-brands -->
	<!-- new -->
		<div class="newproducts-w3agile">
			<div class="container">
				<h3>Potongan Harga</h3>
					<div class="agile_top_brands_grids">
					<?php
						$sql = mysql_query("SELECT * FROM t_buku WHERE keterangan = 4 ORDER BY isbn DESC limit 4");
						while($data = mysql_fetch_array($sql)){
					?>
						<div class="col-md-3 top_brand_left-1">
							<div class="hover14 column">
								<div class="agile_top_brand_left_grid">
									<div class="agile_top_brand_left_grid_pos">
										<img src="images/offer.png" alt=" " class="img-responsive">
									</div>
									<div class="agile_top_brand_left_grid1">
										<figure>
											
											<div class="snipcart-item block" >
												<div class="snipcart-thumb">
													<center>
													<a href="singlebook.php?kd=<?php echo $data['isbn'];?>"><img src="<?php echo $data['gambar']; ?>" /></a>
													</center>
													<br>
													<h4><?php echo $data['judul']; ?></h4>
													<h4><?php echo $data['pengarang']; ?></h4>
													<h4><?php echo $data['penerbit']; ?></h4>
													<h4><?php echo $data['tahun']; ?></h4>
													<h4>Rp.<?php echo $data['harga']; ?>,-</h4>
												</div>
												<div class="snipcart-details top_brand_home_details">
													<form action="#" method="post">
														<a href="detailproduk.php?kd=<?php echo $data['id_produk'];?>" />
														<input type="submit" name="simpan" value="Tambah" class="button" />
													</form>
												</div>
											</div>
										</figure>
									</div>
								</div>
							</div>
						</div>
						<?php   
					   		}
				      	?>
							<div class="clearfix"> </div>
					</div>
			</div>
		</div>
	<!-- //new -->
		
<?php
	include 'footer.php';
?>