Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
RestoranPondokEdo
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
Mei Romauli Sagala
RestoranPondokEdo
Commits
81eec2b8
Commit
81eec2b8
authored
May 25, 2017
by
Mei Romauli Sagala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
progress
parent
059dc3a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
+21
-14
bayar.php
bayar.php
+0
-12
cart.php
cart.php
+19
-1
checkout.php
checkout.php
+2
-1
No files found.
bayar.php
View file @
81eec2b8
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
<?php
<?php
$kueri
=
mysqli_query
(
$koneksi
,
"SELECT * FROM pembayaran WHERE member_id = '
$member_id
'"
);
$kueri
=
mysqli_query
(
$koneksi
,
"SELECT * FROM pembayaran WHERE member_id = '
$member_id
'"
);
$row
=
mysqli_fetch_array
(
$kueri
);
$row
=
mysqli_fetch_array
(
$kueri
);
if
(
$row
[
'bukti'
]
==
NULL
){
?>
?>
<h3>
Terimakasih Telah Memesan.
</h3>
<h3>
Terimakasih Telah Memesan.
</h3>
<div>
Pesanan anda sebesar Rp.
<?=
$total
?>
,-
<br>
<div>
Pesanan anda sebesar Rp.
<?=
$total
?>
,-
<br>
...
@@ -34,17 +33,6 @@
...
@@ -34,17 +33,6 @@
<input
type=
"submit"
class=
"btn btn-info"
value=
"Upload"
>
<input
type=
"submit"
class=
"btn btn-info"
value=
"Upload"
>
</form>
</form>
<br>
</div>
<br>
</div>
<?php
}
else
{
if
(
$row
[
'status'
]
==
NULL
){
echo
'<h3 style="color: #b30000"> Terimakasih telah membayar. </h3>'
;
echo
'Silahkan tunggu konfirmasi pembayaran dari admin. <br>'
;
}
else
{
echo
'Pesanan anda telah dikonfirmasi. Terimakasih telah memesan. <br> <br>'
;
echo
"<a href='selesai.php?id="
.
$member_id
.
"' class='btn btn-success'> Selesai </a> <br>"
;
}
}
?>
<br>
<br>
</div>
</div>
...
...
cart.php
View file @
81eec2b8
<?php
<?php
include
'koneksi.php'
;
include
'koneksi.php'
;
include
'common/header.php'
;
include
'common/header.php'
;
$id_member
=
$_GET
[
'id_member'
];
?>
?>
<h2>
<span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Cart
</h2>
<h2>
<span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Cart
</h2>
<br/>
<hr/>
<br/>
<hr/>
<div
class=
"col-md-12"
align=
"center"
>
<div
class=
"col-md-12"
align=
"center"
>
<?php
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM pembayaran WHERE member_id = '
$id_member
'"
);
$q
=
mysqli_fetch_array
(
$sql
);
if
(
$q
[
'bukti'
]
==
NULL
&&
$q
[
'status'
]
==
NULL
){
?>
<table
class=
"table table-hover table-condensed"
>
<table
class=
"table table-hover table-condensed"
>
<tr>
<tr>
<th>
No
</th>
<th>
No
</th>
...
@@ -18,7 +25,6 @@
...
@@ -18,7 +25,6 @@
</tr>
</tr>
<?php
<?php
$id_member
=
$_GET
[
'id_member'
];
$query
=
mysqli_query
(
$koneksi
,
"SELECT menu.nama AS nama_menu, menu.harga, pemesanan.id_pemesanan ,pemesanan.jumlah FROM menu
$query
=
mysqli_query
(
$koneksi
,
"SELECT menu.nama AS nama_menu, menu.harga, pemesanan.id_pemesanan ,pemesanan.jumlah FROM menu
INNER JOIN (pemesanan INNER JOIN member ON member_id = id_member) ON menu_id= id_menu WHERE member_id= '
$id_member
'"
);
INNER JOIN (pemesanan INNER JOIN member ON member_id = id_member) ON menu_id= id_menu WHERE member_id= '
$id_member
'"
);
$no
=
1
;
$no
=
1
;
...
@@ -58,6 +64,18 @@
...
@@ -58,6 +64,18 @@
<a
href=
"bayar.php?id_member=
<?=
$id_member
?>
"
class=
"btn btn-success"
>
Checkout
<span
class=
"glyphicon glyphicon-chevron-right"
></span>
</a>
<a
href=
"bayar.php?id_member=
<?=
$id_member
?>
"
class=
"btn btn-success"
>
Checkout
<span
class=
"glyphicon glyphicon-chevron-right"
></span>
</a>
</div>
</div>
<br>
<br>
<?
}
else
{
if
(
$q
[
'status'
]
==
NULL
){
echo
'<h4 style="color: #b30000;"> Terimakasih telah membayar. </h4>'
;
echo
'Silahkan tunggu konfirmasi pembayaran dari admin.'
;
}
else
{
echo
'<h4 style="color: #b30000;">Pesanan anda telah diterima. </h4> Terimakasih telah memesan. '
;
echo
'<a href="selesai.php?id='
.
$id_member
'" class="btn btn-success"> Selesai </a>'
;
}
}
?>
</div>
</div>
<?php
<?php
...
...
checkout.php
View file @
81eec2b8
...
@@ -15,5 +15,5 @@
...
@@ -15,5 +15,5 @@
move_uploaded_file
(
$_FILES
[
'bukti'
][
'tmp_name'
],
'picture/'
.
$bukti
);
move_uploaded_file
(
$_FILES
[
'bukti'
][
'tmp_name'
],
'picture/'
.
$bukti
);
mysqli_query
(
$koneksi
,
"INSERT INTO pembayaran VALUES('', '
$member_id
', '
$total
', '
$bukti
', '') "
);
mysqli_query
(
$koneksi
,
"INSERT INTO pembayaran VALUES('', '
$member_id
', '
$total
', '
$bukti
', '') "
);
header
(
'Location:
bayar
.php?id_member='
.
$member_id
);
header
(
'Location:
cart
.php?id_member='
.
$member_id
);
?>
?>
\ 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