Commit 9e0e90ee by Roy Junedi Simamora
parents a54f3094 622df3e4
<?php
include('koneksi.php');
include('common/header.php');
if (isset($_POST['kirim'])) {
$nama = $_POST['name'];
$hp = $_POST['phone'];
$email = $_POST['email'];
$comment = $_POST['comment'];
}
$input = mysql_query("INSERT INTO komentar VALUES('','$nama','$comment','$email','$hp')") or die(mysql_error());
if ($input) {
header('Location: form_comment.php');
} else {
echo 'gagal mengirimkan komentar';
header("location:form_comment.php");
}
include 'common/footer.php';
?>
\ No newline at end of file
...@@ -22,25 +22,26 @@ ...@@ -22,25 +22,26 @@
<?php <?php
if(isset($_SESSION['admin'])){ if(isset($_SESSION['admin'])){
echo'<li><a href="list_menu.php" ><span class="glyphicon glyphicon-th-list"></span> Menu Makanan</a></li>'; echo'<li><a href="list_menu.php" ><span class="glyphicon glyphicon-th-list"></span>Olah Menu</a></li>';
} }
elseif(isset($_SESSION['user'])){ elseif(isset($_SESSION['user'])){
echo' <li><a href="list_menu_member.php" ><span class="glyphicon glyphicon-th-list"></span> Menu Makanan</a></li>'; echo' <li><a href="list_menu_member.php" ><span class="glyphicon glyphicon-th-list"></span>List Menu</a></li>';
} }
?> ?>
<li><a href="bulbul.php"><span class="glyphicon glyphicon-camera"></span> Profil Pantai BulBul</a></li> <li><a href="bulbul.php"><span class="glyphicon glyphicon-camera"></span> Profil BulBul</a></li>
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<?php <?php
if(isset($_SESSION['admin'])){ if(isset($_SESSION['admin'])){
echo'<li><a href="daftar_pesanan.php"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Daftar Pesanan</a></li>'; echo'<li><a href="daftar_pesanan.php"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Daftar Pesanan</a></li>
<li><a href="daftar_komen.php"><span class="glyphicon glyphicon-comment"></span>List feedback</a></li>';
} }
elseif(isset($_SESSION['user'])){ elseif(isset($_SESSION['user'])){
echo'<li><a href="cart.php"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Cart</a></li>'; echo'<li><a href="cart.php"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Cart</a></li>';
} }
?> ?>
<li><a href="form_comment.php"><span class="glyphicon glyphicon-comment"></span> kritik dan saran</a></li> <li><a href="form_comment.php"><span class="glyphicon glyphicon-comment"></span>feedback</a></li>
<?php <?php
if(isset($_SESSION['user']) || isset($_SESSION['admin'])){ if(isset($_SESSION['user']) || isset($_SESSION['admin'])){
......
<?php
require 'koneksi.php';
include 'common/header.php';
?>
<div class="container-fluid">
<h2> Daftar Feedback </h2>
<hr/>
<?php
$komen = mysql_query('SELECT * FROM komentar');
while($q = mysql_fetch_array($komen)){
?>
<div class='col-md-4'>
<div class="thumbnail">
<label> Nama : &nbsp; <span> <?php echo $q['nama']; ?> </span> </label> <br/>
<label> <span> <?php echo $q['email'] ?> </span> </label><br/>
<label> Komentar : </label> <br/>
<?php echo $q['isi'] ?> <br/>
<div align="center">
<a onclick='if(confirm("Anda yakin ingin menghapus komentar ini")){
location.href= "hapus_komen.php?id=<?php echo $q['id_komentar'] ?>"}' class="btn btn-danger"> <span class="glyphicon glyphicon-remove"></span> Hapus </a>
</div>
</div>
</div>
<?php
}
?>
</div>
<?php
include 'common/footer.php';
?>
\ No newline at end of file
<?php
include 'koneksi.php';
$id = $_GET['id'];
mysql_query("delete from komentar where id_komentar = '$id' ");
header('Location: daftar_komen.php');
?>
\ No newline at end of file
...@@ -69,7 +69,6 @@ $start = ($page - 1) * $per_hal; ...@@ -69,7 +69,6 @@ $start = ($page - 1) * $per_hal;
?> ?>
</td> </td>
<td> <td>
<a href="detail.php?id=<?php echo $b['id_menu']; ?>" class="btn btn-success"><span class="glyphicon glyphicon-eye-open"> </span></a>
<a href="edit.php?id=<?php echo $b['id_menu']; ?>" class="btn btn-info"><span class="glyphicon glyphicon-edit"></span></a> <a href="edit.php?id=<?php echo $b['id_menu']; ?>" class="btn btn-info"><span class="glyphicon glyphicon-edit"></span></a>
<a onclick="if (confirm('Apakah anda yakin ingin menghapus data ini ??')) { <a onclick="if (confirm('Apakah anda yakin ingin menghapus data ini ??')) {
location.href = 'delete.php?id=<?php echo $b['id_menu']; ?>' location.href = 'delete.php?id=<?php echo $b['id_menu']; ?>'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment