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
2e43d715
Commit
2e43d715
authored
May 26, 2017
by
DESKTOP-4R50ASQ\DELL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
bc5444d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
169 additions
and
14 deletions
+169
-14
index.php
index.php
+169
-14
No files found.
index.php
View file @
2e43d715
...
...
@@ -2,6 +2,8 @@
session_start
();
include_once
'functions/fungsi.php'
;
include_once
'connection/koneksi.php'
;
$id
=
$_GET
[
'kd'
];
?>
<!DOCTYPE html>
<html>
...
...
@@ -14,6 +16,7 @@ include_once 'connection/koneksi.php';
<link
href=
'http://fonts.googleapis.com/css?family=Pacifico'
rel=
'stylesheet'
type=
'text/css'
>
<link
href=
'http://fonts.googleapis.com/css?family=Playball'
rel=
'stylesheet'
type=
'text/css'
>
<link
rel=
"stylesheet"
href=
"css/bootstrap.css"
>
<link
rel=
"stylesheet"
href=
"css/animate.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"css/style-portfolio.css"
>
...
...
@@ -28,6 +31,7 @@ include_once 'connection/koneksi.php';
<nav
class=
"navbar navbar-default navbar-fixed-top"
role=
"navigation"
>
<div
class=
"container"
>
<ul
class=
"tp-hd-lft wow fadeInDown animated"
data-wow-delay=
"0.5s"
></ul>
<div
class=
"row"
>
<!-- Brand and toggle get grouped for better mobile display -->
<div
class=
"navbar-header"
>
...
...
@@ -41,23 +45,26 @@ include_once 'connection/koneksi.php';
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<ul
class=
"tp-hd-lft wow fadeInDown animated"
data-wow-delay=
"0.5s"
>
<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=
"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="profil.php">PROFIL</a></li>'
);
echo
(
'<li><a class="color_animation" href="index.php #menu">MENU</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="
upload_bukti.php">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="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="
daftar_pesanan.php
">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="profil.php">PROFIL</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>'
);
...
...
@@ -81,8 +88,18 @@ include_once 'connection/koneksi.php';
</div>
</div>
</div>
<!-- ============ Menu ============= -->
<?php
$per_hal
=
8
;
$jumlah_record
=
mysqli_query
(
$conn
,
"SELECT * from menu"
);
$jum
=
mysqli_num_rows
(
$jumlah_record
);
$halaman
=
ceil
(
$jum
/
$per_hal
);
$page
=
(
isset
(
$_GET
[
'page'
]))
?
(
int
)
$_GET
[
'page'
]
:
1
;
$start
=
(
$page
-
1
)
*
$per_hal
;
?>
<section
id =
"menu"
class=
"description_content"
>
<div
class=
"pricing background_content"
>
...
...
@@ -90,30 +107,137 @@ include_once 'connection/koneksi.php';
</div>
<div
class=
"text-content container"
>
<div
class=
"container"
>
<ul
class=
"tp-hd-lft wow fadeInDown animated"
data-wow-delay=
"0.5s"
></ul>
<div
class=
"row"
>
<div
id=
"w"
>
<ul>
<div
class=
"col-lg-12"
>
<?php
$query
=
"SELECT * FROM menu"
;
$result_set
=
$database
->
query
(
$query
);
if
(
isset
(
$_POST
[
'cari'
]))
{
$cari
=
$_POST
[
'search'
];
$sql
=
mysqli_query
(
$conn
,
"SELECT * FROM menu WHERE nama LIKE '%
$cari
%' ORDER BY kategori"
);
}
?>
<div
class=
"col-lg-12"
>
<form
action=
""
method=
"get"
>
<div
class=
"input-group col-md-5 col-md-offset-7"
>
<span
class=
"input-group-addon"
id=
"basic-addon1"
><span
class=
"glyphicon glyphicon-search"
></span></span>
<input
type=
"text"
class=
"form-control"
placeholder=
"Cari menu di sini .."
aria-describedby=
"basic-addon1"
name=
"search"
>
</form>
</div>
<div
class=
"top-brands"
>
<div
class=
"container"
>
<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"
>
Makanan
</a></li>
<li
role=
"presentation"
><a
href=
"#tours"
role=
"tab"
id=
"tours-tab"
data-toggle=
"tab"
aria-controls=
"tours"
>
Minuman
</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"
>
<h2>
Berikut daftar buku makanan pada cafe ini
</h2>
</div>
<div
class=
"agile_top_brands_grids"
>
<?php
$query
=
"SELECT * FROM menu WHERE id_kategori=1 limit
$start
,
$per_hal
"
;
$result_set
=
$conn
->
query
(
$query
);
while
(
$row
=
$result_set
->
fetch_assoc
())
{
?>
<div
class=
"col-lg-3"
>
<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_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"
>
<li
class=
"item breakfast"
>
<img
src=
"foto/
<?=
$row
[
'gambar'
]
?>
"
class=
"img-responsive"
>
<?php
echo
$row
[
'nama'
]
?>
<br>
<img
src=
"foto/
<?php
echo
$row
[
'gambar'
]
?>
"
class=
"img-rounded"
height=
"250"
width=
"220"
class=
"col-md-12 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>
<?php
echo
$row
[
'deskripsi'
]
?>
</li>
<br>
</div>
<?php
}
</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"
>
<h2>
Berikut daftar buku minuman pada cafe ini
</h2>
</div>
<div
class=
"agile_top_brands_grids"
>
<?php
$query
=
"SELECT * FROM menu WHERE id_kategori=2 limit
$start
,
$per_hal
"
;
$result_set
=
$conn
->
query
(
$query
);
while
(
$row
=
$result_set
->
fetch_assoc
())
{
?>
<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_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"
>
<li
class=
"item breakfast"
>
<?php
echo
$row
[
'nama'
]
?>
<br>
<img
src=
"foto/
<?php
echo
$row
[
'gambar'
]
?>
"
class=
"img-rounded"
height=
"250"
width=
"220"
class=
"col-md-12 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>
<?php
echo
$row
[
'deskripsi'
]
?>
</li>
<br>
</div>
</figure>
</div>
</div>
</div>
<br>
</div>
<?php
}
?>
<div
class=
"clearfix"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- //top-brands -->
<div
class=
"col-md-12"
>
<ul
class=
"pagination"
>
<?php
for
(
$x
=
1
;
$x
<=
$halaman
;
$x
++
)
{
?>
<li><a
href=
"?page=
<?php
echo
$x
?>
"
>
<?php
echo
$x
?>
</a></li>
<?php
}
?>
</ul>
</div>
</ul>
...
...
@@ -129,7 +253,8 @@ include_once 'connection/koneksi.php';
<section
id=
"komentar"
class=
"description_content"
>
<div
class=
"bread background_content"
>
<h1>
Beri Komentar!
</h1>
<h1>
Beri Saran/Pertanyaan
</h1>
<h2
class=
"white second-title"
>
"Jika anda memiliki saran ataupun pertanyaan,anda dapat mengisi formulir dibawah ini"
</h2>
</div>
<div
class=
"text-content container"
>
<div
class=
"inner contact"
>
...
...
@@ -171,6 +296,35 @@ include_once 'connection/koneksi.php';
</div>
</section>
<!-- ============ Tampilan Komentar =========== -->
<div
class=
"text-content container"
>
<div
class=
"inner contact"
>
<div
class=
"container"
>
<div
class=
"col-lg-8 col-md-6 col-xs-12"
>
<div
class=
"row"
>
<div
class=
"col-lg-12 col-md-6 col-xs-6"
>
<h2>
Komentar:
</h2><br>
</div>
<br><br><br><br>
<div
class=
"col-lg-12"
>
<?php
$query
=
"SELECT * FROM komentar"
;
$result_set
=
$conn
->
query
(
$query
);
while
(
$row
=
$result_set
->
fetch_assoc
())
{
?>
<div
class=
"alert alert-success"
role=
"alert"
>
<strong>
<?=
$row
[
'name'
]
?>
</strong>
<p>
<?=
$row
[
'komentar'
]
?>
</p></div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<!-- ============ Footer Section ============= -->
<br>
...
...
@@ -179,6 +333,7 @@ include_once 'connection/koneksi.php';
<div
class=
"col-md-4"
><p
class=
"sub-footer-text text-center"
>
©
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
class=
"col-md-4"
><p
class=
"sub-footer-text text-center"
>
Built With Care By
<a
href=
"#"
target=
"_blank"
>
Us
</a></p></div>
</div>
</footer>
...
...
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