Perubahan tampilan index

parent 951bceb9
......@@ -29,7 +29,7 @@ include_once 'connection/koneksi.php';
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="row">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
......@@ -37,51 +37,54 @@ include_once 'connection/koneksi.php';
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Cafe Bunga Toba</a>
<a class="navbar-brand" href="index.php">Cafe BUNGA TOBA</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav main-nav clear navbar-right ">
<li><a class="navactive color_animation" href="#top">WELCOME</a></li>
<li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
<?php
if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
echo('<li><a class="color_animation" href="#pricing">MENU</a></li>');
echo('<li><a class="color_animation" href="#pesanan">PESANAN</a></li>');
echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
echo('<li><a class="color_animation" href="#pembayaran">Pembayaran</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
echo('<li><a class="color_animation" href="#olahmenu">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="#pricing">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
echo('<li><a class="color_animation" href="#daftarpesanan">DAFTAR PESANAN</a></li>');
echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
}
if (!isset($_SESSION['isLogin'])) {
echo('<li><a class="color_animation" href="#pricing">MENU</a></li>');
echo('<li><a class="color_animation" href="#login">LOGIN</a></li>');
echo('<li><a class="color_animation" href="#signup">SIGN UP</a></li>');
echo('<li><a class="color_animation" href="#menu">MENU</a></li>');
echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
}
?>
</ul>
</div>
</div><!-- /.navbar-collapse -->
</div>
</div>
</div><!-- /.container-fluid -->
</nav>
<div id="top" class="starter_container bg">
<div class="follow_container">
<div class="col-md-6 col-md-offset-3">
<h2 class="top-title"> Cafe Bunga Toba</h2>
<h2 class="white second-title">" Best in the Balige "</h2>
<h2 class="top-title">CAFE BUNGA TOBA</h2>
<h2 class="white second-title">" Best in BALIGE "</h2>
<hr>
</div>
</div>
</div>
<!-- ============ Menu ============= -->
<section id ="pricing" class="description_content">
<section id ="menu" class="description_content">
<div class="pricing background_content">
<h1>Daftar Menu</h1>
</div>
......@@ -115,319 +118,67 @@ include_once 'connection/koneksi.php';
</div>
</ul>
</div>
</div><!-- @end #w -->
</div>
</div>
</div>
</section>
<br><br><br><br><br><br><br><br><br><br><br><br>
<!-- ============ Komentar ============= -->
<?php if (!isset($_SESSION['isLogin'])) { ?>
<!-- ============ Signup ============= -->
<section id="signup" class="description_content">
<div class="text-content container">
<div class="inner contact">
<!-- Form Area -->
<section id="komentar" class="description_content">
<div class="bread background_content">
<h1>Beri Komentar!</h1>
</div>
<div class="text-content container">
<div class="inner contact">
<!-- Form Area -->
<center>
<div class="contact-form">
<!-- Form -->
<form id="contact-us" method="post" action="register.php">
<form id="contact-us" method="post" action="komentar_process.php">
<!-- Left Inputs -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-6 col-xs-12">
<div class="row">
<div class="col-lg-8 col-md-6 col-xs-6">
<div class="col-lg-12 col-md-6 col-xs-6">
<!-- Name -->
<input type="text" name="first_name" id="first_name" required="required" class="form" placeholder="First Name" />
<input type="text" name="last_name" id="last_name" required="required" class="form" placeholder="Last Name" />
<input type="text" name="name" id="first_name" required="required" class="form" placeholder="Name" />
<input type="email" name="email" id="email" required="required" class="form" placeholder="Email" />
<input type="text" name="username" id="username" required="required" class="form" placeholder="Username" />
<input type="password" name="password" id="password" required="required" class="form" placeholder="Password" />
</div>
<div class="col-xs-6 ">
<!-- Send Button -->
<button type="submit" id="submit" name="submit" class="text-center form-btn form-btn">Register</button>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</form>
</div><!-- End Contact Form Area -->
</div>
</div>
</section>
<textarea name="message" id="message" class="form textarea" placeholder="Message"></textarea>
<!-- ============ Login ============= -->
<section id="login" class="description_content">
<div class="text-content container">
<div class="inner contact">
<!-- Form Area -->
<div class="contact-form">
<!-- Form -->
<form id="contact-us" method="post" action="login_process.php">
<!-- Left Inputs -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-6 col-xs-12">
<div class="row">
<div class="col-lg-8 col-md-6 col-xs-6">
<!-- Name -->
<input type="text" name="username" id="username" required="required" class="form" placeholder="Username" />
<input type="password" name="password" id="password" required="required" class="form" placeholder="Password" />
</div>
<div class="col-xs-6 ">
<!-- Send Button -->
<button type="submit" id="submit" name="submit" class="text-center form-btn form-btn">Login</button>
<button type="submit" id="submit" name="submit" class="text-center form-btn form-btn">Send</button>
</div>
</div>
</div>
</div>
</div>
<!-- Clear -->
<div class="clear"></div>
</form>
</div><!-- End Contact Form Area -->
</div><!-- End Inner -->
</div>
</section>
<br><br><br><br><br><br><br><br><br><br><br><br>
<?php } else {
?>
<?php if (get_session('role') == "karyawan") { ?>
<!-- ============ Olah Menu ============= -->
<section id="olahmenu" class="description_content">
<div class="text-content container">
<div class="inner contact row">
<div class="contact-form">
<!-- Form -->
<table class="table table-bordered">
<a class="color_animation" href="#tambahmenu"><button type="button" class="btn btn-success">Tambah Menu</button></a>
<br>
<br>
<thead>
<tr>
<th>Nama Menu</th>
<th>Olah</th>
</tr>
</thead>
<tbody>
<?php
$id = get_session('id');
$query = "SELECT * FROM menu ";
$result_set = $database->query($query);
if ($result_set != NULL) {
while ($row = $result_set->fetch_array()) {
?>
<tr>
<td><?= $row['nama'] ?></td>
<td>
<a href="update_menu.php?id=<?= $row['id'] ?>"><button type="button" class="btn btn-success">Update</button></a>
<a href="delete_menu.php?id=<?= $row['id'] ?>"><button type="button" class="btn btn-danger">Delete</button></a>
</td>
</tr>
<?php
}
} else {
echo 'ada belum memesan pesan sekarang juga<br><a href="menu.php">Pesan</a>';
}
?>
</tbody>
</table>
</div><!-- End Contact Form Area -->
</div><!-- End Inner -->
</div>
</section>
<!-- ============ Tambah Menu ============= -->
<section id="tambahmenu" class="description_content">
<div class="text-content container">
<div class="inner contact">
<!-- Form Area -->
<div class="contact-form">
<form id="contact-us" method="post" action="tambah_menu.php" enctype="multipart/form-data">
<!-- Left Inputs -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-6 col-xs-12">
<div class="row">
<div class="col-lg-8 col-md-6 col-xs-6">
<!-- Name -->
<input type="text" name="nama" id="first_name" required="required" class="form" placeholder="Nama Menu" />
<input type="text" name="harga" id="last_name" required="required" class="form" placeholder="Harga" />
<textarea name="deskripsi" id="message" class="form textarea" placeholder="Deskripsi"></textarea>
<input type="file" name="uploaded_file" id="username" required="required" class="form" placeholder="Username" />
</div>
<div class="col-xs-6 ">
<!-- Send Button -->
<button type="submit" id="submit" name="submit" class="text-center form-btn form-btn">Tambah</button>
</div>
</div>
</div>
</div>
</div>
<!-- Clear -->
<div class="clear"></div>
</form>
</div><!-- End Contact Form Area -->
</div><!-- End Inner -->
</div>
</section>
<?php } ?>
<!-- ============ Pesanan ============= -->
<section id="pesanan" class="description_content">
<div class="text-content container">
<div class="inner contact row">
<div class="contact-form">
<!-- Form -->
<table class="table table-bordered">
<thead>
<tr>
<th>Menu</th>
<th>Jumlah</th>
</tr>
</thead>
<tbody>
<?php
$id = get_session('id');
$query = "SELECT menu.nama as nama, pesanan.jumlah as jumlah FROM pesanan INNER JOIN menu ON pesanan.id_menu = menu.id ";
$result_set = $database->query($query);
if ($result_set != NULL) {
while ($row = $result_set->fetch_array()) {
?>
<tr>
<td><?= $row['nama'] ?></td>
<td><?= $row['jumlah'] ?></td>
</tr>
<?php
}
} else {
echo 'ada belum memesan pesan sekarang juga<br><a href="menu.php">Pesan</a>';
}
?>
</tbody>
</table>
<a href = "bayar.php"><button class="btn btn-success">Bayar</button></a>
</div><!-- End Contact Form Area -->
</div><!-- End Inner -->
</div>
</section>
<br><br><br><br><br><br><br><br><br><br><br><br>
<!-- ============ Pembayaran ============= -->
<section id="pembayaran" class="description_content">
<div class="text-content container">
<div class="inner contact row">
<div class="contact-form">
<!-- Form -->
<table class="table table-bordered">
<thead>
<tr>
<th>Total Biaya Pembayaran</th>
<th>Status Pembayaran</th>
</tr>
</thead>
<tbody>
<?php
$id = get_session('id');
$query = "SELECT * FROM pembayaran where id_user = $id ";
$result_set = $database->query($query);
if ($result_set != NULL) {
while ($row = $result_set->fetch_array()) {
?>
<tr>
<td><?= $row['total'] ?></td>
<?php
if ($row['status'] == NULL) {
echo '<td><button class="btn btn-success">Upload Bukti</button></td>';
} else {
echo ' <td>'.$row['status'].'</td> ';
}
?>
</tr>
<?php
}
} else {
echo 'ada belum memesan pesan sekarang juga<br><a href="menu.php">Pesan</a>';
}
?>
</tbody>
</table>
</div><!-- End Contact Form Area -->
</div><!-- End Inner -->
</div>
</section>
<br><br><br><br><br><br><br><br><br><br><br><br>
<?php }
?>
</center>
</div><!-- End Inner -->
</div>
</section>
<!-- ============ Footer Section ============= -->
<br>
<footer class="sub_footer">
<div class="container">
<div class="col-md-4"><p class="sub-footer-text text-center">&copy; Cafe Bunga Toba, Design by <a href="#">PA1-1617-D3TI05</a></p></div>
<div class="col-md-4"><p class="sub-footer-text text-center">Back to <a href="#top">TOP</a></p></div>
<div class="col-md-4"><p class="sub-footer-text text-center">&copy; Cafe Bunga Toba, Design by <a href="https://themewagon.com/">PA1-1617-D3TI05</a></p></div>
<div class="col-md-4"><p class="sub-footer-text text-center">Back to <a href="#top">TOP</a></p>
</div>
</div>
</footer>
......
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