Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA1-1617-D3TI05
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fredrick Mangampu Theodorus Pardosi
PA1-1617-D3TI05
Commits
d14c7912
Commit
d14c7912
authored
May 13, 2017
by
Fredrick Mangampu Theodorus Pardosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tampilan index
parent
66152966
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
417 additions
and
58 deletions
+417
-58
index.php
index.php
+417
-58
No files found.
index.php
View file @
d14c7912
<?php
session_start
();
include_once
'functions/fungsi.php'
;
include_once
'connection/koneksi.php'
;
?>
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
>
<html>
<head>
<head>
<meta
charset=
"UTF-8"
>
<title>
Cafe Bunga Toba
</title>
<title>
Cafe Bunga Toba
</title>
<
meta
charset=
"utf-8
"
>
<
link
rel=
"stylesheet"
href=
"css/normalize.css
"
>
<link
rel=
"stylesheet"
href=
"css/
reset.css"
type=
"text/css"
media=
"all
"
>
<link
rel=
"stylesheet"
href=
"css/
main.css"
media=
"screen"
type=
"text/css
"
>
<link
rel=
"stylesheet"
href=
"css/layout.css"
type=
"text/css"
media=
"all"
>
<link
href=
'http://fonts.googleapis.com/css?family=Pacifico'
rel=
'stylesheet'
type=
'text/css'
>
<link
rel=
"stylesheet"
href=
"css/style.css"
type=
"text/css"
media=
"all"
>
<link
href=
'http://fonts.googleapis.com/css?family=Playball'
rel=
'stylesheet'
type=
'text/css'
>
<
script
type=
"text/javascript"
src=
"js/jquery-1.6.js"
></script
>
<
link
rel=
"stylesheet"
href=
"css/bootstrap.css"
>
<
script
type=
"text/javascript"
src=
"js/jquery.easing.1.3.js"
></script
>
<
link
rel=
"stylesheet"
type=
"text/css"
href=
"css/bootstrap.min.css"
>
<script
type=
"text/javascript"
src=
"js/tms-0.3.js"
></script>
<
script
type=
"text/javascript"
src=
"js/tms_presets.js"
></script
>
<
link
rel=
"stylesheet"
href=
"css/style-portfolio.css"
>
<
script
type=
"text/javascript"
src=
"js/script.js"
></script
>
<
link
rel=
"stylesheet"
href=
"css/picto-foundry-food.css"
/
>
<
!--[if lt IE 9]
>
<
link
rel=
"stylesheet"
href=
"css/jquery-ui.css"
>
<
script type="text/javascript" src="js/html5.js"></script
>
<
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<
style type="text/css">#menu a, .bg, .bg2, #ContactForm a {behavior:url("../js/PIE.htc")}</style
>
<
link
href=
"css/font-awesome.min.css"
rel=
"stylesheet"
>
<
![endif]--
>
<
link
rel=
"icon"
href=
"favicon-1.ico"
type=
"image/x-icon"
>
</head>
</head>
<body
id=
"page4"
>
<div
class=
"body1"
>
<body>
<div
class=
"main"
>
<!--header -->
<nav
class=
"navbar navbar-default navbar-fixed-top"
role=
"navigation"
>
<div
class=
"container"
>
<div
class=
"row"
>
<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>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
<a
class=
"navbar-brand"
href=
"#"
>
Cafe Bunga Toba
</a>
</div>
<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>
<?php
<?php
require_once
(
dirname
(
__FILE__
)
.
'/common/header.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="#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="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>'
);
}
?>
?>
<body>
<div
class=
"slider_bg"
>
<div
class=
"slider"
>
<ul
class=
"items"
>
<li><img
src=
"images/img0.jpg"
alt=
""
></li>
<li><img
src=
"images/img1,2.jpg"
alt=
""
></li>
<li><img
src=
"images/h12.jpg"
alt=
""
></li>
</ul>
</ul>
</div>
</div>
</div>
</div>
</header>
<!-- / header -->
<!-- content -->
<article
id=
"content"
>
<div
class=
"wrapper"
>
<h2>
CAFE Bunga Toba
</h2>
</div>
</div>
</article>
</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>
<hr>
</div>
</div>
</div>
<section
id =
"pricing"
class=
"description_content"
>
<div
class=
"pricing background_content"
>
<h1>
Daftar Menu
</h1>
</div>
<div
class=
"text-content container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
id=
"w"
>
<ul>
<div
class=
"col-lg-12"
>
<?php
$query
=
"SELECT * FROM menu"
;
$result_set
=
$database
->
query
(
$query
);
while
(
$row
=
$result_set
->
fetch_assoc
())
{
?>
<div
class=
"col-lg-3"
>
<li
class=
"item breakfast"
>
<img
src=
"foto/
<?=
$row
[
'gambar'
]
?>
"
class=
"img-responsive"
>
<h2
class=
"white"
>
Rp.
<?php
echo
$row
[
'harga'
];
?>
</h2>
<a
href=
"pesan_barang.php?id=
<?=
$row
[
'id'
]
?>
"
>
<button
class=
"text-center btn-block form-btn"
>
Pesan
</button>
</a>
</li>
</div>
<?php
}
?>
</div>
</ul>
</div>
</div>
</div>
</div>
</section>
<br><br><br><br><br><br><br><br><br><br><br><br>
<?php
if
(
!
isset
(
$_SESSION
[
'isLogin'
]))
{
?>
<!-- ============ Signup ============= -->
<section
id=
"signup"
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=
"register.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=
"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=
"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
class=
"body2"
>
<div
class=
"main"
>
<article
id=
"content2"
>
<div
class=
"wrapper"
>
<section
class=
"col2"
>
<h2>
We will serve you
<span>
for the BEST
</span></h2>
<div
class=
"testimonials"
>
<p
class=
"quot"
>
Let's Come and Enjoy the Original Indonesian delicacy in Our Cafe, CAFE BUNGA TOBA.
<img
src=
"images/quot2.png"
alt=
""
></p>
</div>
</div>
<section
class=
"col3 pad_left2"
>
<h2>
Our Menu
</h2>
<div
class=
"wrapper pad_top1"
>
<figure
class=
"left marg_right1"
><img
src=
"images/page1_img.jpg"
alt=
""
></figure>
<p><span
class=
"font1 color2"
>
Breakfast
</span><br>
Makanan yang biasanya dijadwalkan untuk sarapan.
<a
href=
"menu.php"
class=
"link1"
>
Read More
</a>
</p>
</div>
</div>
<div
class=
"wrapper"
>
<figure
class=
"left marg_right1"
><img
src=
"images/page1_img2.jpg"
alt=
""
></figure>
<p><span
class=
"font1 color2"
>
Lunch
</span><br>
Menu yang biasanya dijadwalkan untuk makan siang
<a
href=
"menu.php"
class=
"link1"
>
Read More
</a>
</p>
</div>
</div>
<div
class=
"wrapper"
>
<figure
class=
"left marg_right1"
><img
src=
"images/page1_img3.jpg"
alt=
""
></figure>
<div
class=
"clear"
></div>
<p><span
class=
"font1 color2"
>
Dinner
</span><br>
</form>
Menu yang biasanya dijadwalkan untuk makan siang
<a
href=
"menu.php"
class=
"link1"
>
Read More
</a>
</p>
</div>
<!-- End Contact Form Area -->
</div>
</div>
</div>
</section>
</section>
<!-- ============ 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>
</div>
</div>
</div>
</article>
<!-- / content -->
</div>
</div>
</div>
</div>
<div
class=
"clear"
></div>
</form>
</div>
<!-- End Contact Form Area -->
</div>
<!-- End Inner -->
</div>
</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
<?php
require_once
(
dirname
(
__FILE__
)
.
'/common/footer.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
}
?>
<!-- ============ Footer Section ============= -->
<br>
<footer
class=
"sub_footer"
>
<div
class=
"container"
>
<div
class=
"col-md-4"
><p
class=
"sub-footer-text text-center"
>
©
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>
</footer>
<script
type=
"text/javascript"
src=
"js/jquery-1.10.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.10.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery.mixitup.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/main.js"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment