<?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">
					<?php
		                if (isset($_SESSION['pengunjung'])) {
						    echo '
							<li><span><i class="fa fa-sign-in" aria-hidden="true"></i><a href="login.php"> Masuk</a></span></li>
							<li class="active">Keranjang Belanja</li> ';
						}
						else {
							echo '
							<li><a href="index.php"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>Beranda</a></li>
							<li class="active">Keranjang Belanja</li> ';
						}
					?>
				</ol>
			</div>
		</div>
	<!-- //breadcrumbs -->
	<!-- comment -->
		<div class="about">
			<div class="w3_agileits_contact_grids">
				<div class="col-md-6 w3_agileits_contact_grid_right">
					<?php 
						$query = mysqli_query($koneksi, "SELECT * FROM t_komentar ORDER BY id_komentar DESC") or die(mysqli_error());
						$masukan = mysqli_num_rows($query);
						echo "<h4>" . "Jumlah komentar saat ini $masukan buah." . "</h4>";
						echo "<b>" . "Berikan kritik & saran Anda agar kami <br> dapat meingkatkan pelayanan kami." . "</b>";
						echo "<hr>";
							while($row = mysqli_fetch_array($query))
							{
								echo "<b>" . $row['nama_pengirim'] . "</b>" . " " . " | " . " " . "<i>" .
								$row['tanggal'] . "</i>" . "<br />" . $row['komentar'] . "<br />";
								 echo "<hr>";
					 		}
					?>
				</div>
				<div class="col-md-6 w3_agileits_contact_grid_right">
					<h2 class="w3_agile_header">Tanggapan <span> Anda</span></h2>

					<form action="contact_process.php" method="POST"">
						<span class="input input--ichiro">
							<input class="input__field input__field--ichiro" type="text" id="input-25" name="nama_pengirim" placeholder="Nama Anda" required="" />
							<label class="input__label input__label--ichiro" for="input-25">
								<span class="input__label-content input__label-content--ichiro">Nama Anda...</span>
							</label>
						</span>
						<textarea name="komentar" placeholder="Tanggapan Anda..." required=""></textarea>
						<input type="submit" name="kirim" value="kirim">
					</form>
				</div>
				<div class="clearfix"> </div>
			</div>
		</div>
	<!-- comment --> 
		

<?php
	include 'footer.php';
?>