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
70f01d04
Commit
70f01d04
authored
May 25, 2017
by
Roy Junedi Simamora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaikan pemesanan
parent
6f6c74f0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
19 deletions
+105
-19
cart.php
cart.php
+11
-6
checkout.php
checkout.php
+20
-0
daftar_pesanan.php
daftar_pesanan.php
+59
-0
konfirmasi.php
konfirmasi.php
+10
-0
selesai.php
selesai.php
+5
-13
No files found.
cart.php
View file @
70f01d04
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<tr>
<tr>
<th>
No
</th>
<th>
No
</th>
<th>
Nama
</th>
<th>
Nama
</th>
<th>
Harga
</th>
<th>
Harga
Satuan
</th>
<th>
Jumlah
</th>
<th>
Jumlah
</th>
<th>
Subtotal
</th>
<th>
Subtotal
</th>
<th>
Opsi
</th>
<th>
Opsi
</th>
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<tr>
<tr>
<td>
<?=
$no
?>
</td>
<td>
<?=
$no
?>
</td>
<td>
<?php
echo
$row
[
'nama_menu'
]
?>
</td>
<td>
<?php
echo
$row
[
'nama_menu'
]
?>
</td>
<td>
<?=
$row
[
'harga'
]
?>
</td>
<td>
Rp.
<?=
number_format
(
$row
[
'harga'
])
?>
,-
</td>
<td>
<?=
$row
[
'jumlah'
]
?>
</td>
<td>
<?=
$row
[
'jumlah'
]
?>
</td>
<td>
Rp.
<?=
number_format
(
$subtotal
)
?>
,-
</td>
<td>
Rp.
<?=
number_format
(
$subtotal
)
?>
,-
</td>
<td>
<a
onclick=
"if(confirm('Apakah anda yakin ingin membatalkan pesanan ini?')){
<td>
<a
onclick=
"if(confirm('Apakah anda yakin ingin membatalkan pesanan ini?')){
...
@@ -38,14 +38,19 @@
...
@@ -38,14 +38,19 @@
</tr>
</tr>
<?php
<?php
global
$total
;
global
$total
;
$total
+=
$subtotal
;
$total
=
$total
+=
$subtotal
;
$no
++
;
$no
++
;
}
}
?>
?>
</table>
</table>
<div
align=
"right"
>
<div
align=
"right"
>
<font
face=
"arial"
size=
"5"
>
Total : Rp.
<?=
number_format
(
$total
)
?>
,-
</font>
<font
face=
"arial"
size=
"5"
>
Total : Rp.
<?php
if
(
mysqli_num_rows
(
$query
)){
echo
number_format
(
$total
);
}
else
{
echo
'0'
;
}
?>
,-
</font>
</div>
</div>
<div
align=
"center"
>
<div
align=
"center"
>
...
...
checkout.php
0 → 100644
View file @
70f01d04
<?php
include
'koneksi.php'
;
global
$total
;
$member_id
=
$_GET
[
'id_member'
];
$query
=
mysqli_query
(
$koneksi
,
"SELECT menu.harga, pemesanan.jumlah FROM menu
INNER JOIN (pemesanan INNER JOIN member ON member_id = id_member) ON menu_id= id_menu WHERE member_id= '
$member_id
'"
);
while
(
$row
=
mysqli_fetch_assoc
(
$query
)){
$jumlah
=
$row
[
'jumlah'
]
*
$row
[
'harga'
];
$total
=
$total
+=
$jumlah
;
}
$bukti
=
$_FILES
[
'bukti'
][
'name'
];
move_uploaded_file
(
$_FILES
[
'bukti'
][
'tmp_name'
],
'picture/'
.
$bukti
);
mysqli_query
(
$koneksi
,
"INSERT INTO pembayaran VALUES('', '
$member_id
', '
$total
', '
$bukti
', '') "
);
header
(
'Location: bayar.php?id_member='
.
$member_id
);
?>
\ No newline at end of file
daftar_pesanan.php
0 → 100644
View file @
70f01d04
<?php
include
'koneksi.php'
;
include
'common/header.php'
;
?>
<h2>
<span
class=
"glyphicon glyphicon-credit-card"
></span>
Daftar Pesanan
</h2>
<br><hr>
<table
class=
"table table-hover table-condensed"
>
<tr>
<th
class=
"col-md-1"
>
NO
</th>
<th
class=
"col-md-3"
>
Nama Pemesan
</th>
<th
class=
"col-md-2"
>
Total
</th>
<th
class=
"col-md-3"
>
Bukti
</th>
<th
class=
"col-md-3"
>
opsi
</th>
</tr>
<?php
$no
=
1
;
$sql
=
mysqli_query
(
$koneksi
,
"SELECT pembayaran.id_pembayaran, pembayaran.total_harga, pembayaran.bukti, pembayaran.status, member.nama
FROM pembayaran INNER JOIN member ON member_id = id_member"
);
while
(
$row
=
mysqli_fetch_assoc
(
$sql
)){
?>
<tr>
<td>
<?=
$no
?>
</td>
<td>
<?=
$row
[
'nama'
]
?>
</td>
<td>
<?=
$row
[
'total_harga'
]
?>
</td>
<td>
<?php
if
(
$row
[
'bukti'
]
==
NULL
){
echo
'Gambar bukti belum di upload!'
;
}
else
{
echo
'<a href="picture/'
.
$row
[
'bukti'
]
.
'">
<img src="picture/'
.
$row
[
'bukti'
]
.
'" width="170" height="150">
</a>'
;
}
?>
</td>
<td>
<?php
if
(
$row
[
'status'
]
!=
'Diterima'
&&
$row
[
'status'
]
==
NULL
){
echo
'<a href="konfirmasi.php?id='
.
$row
[
'id_pembayaran'
]
.
'" class="btn btn-success"> Konfirmasi </a>'
;
}
else
{
echo
$row
[
'status'
];
}
?>
</td>
</tr>
<?php
$no
++
;
}
?>
</table>
<?php
include
'common/footer.php'
;
?>
\ No newline at end of file
konfirmasi.php
0 → 100644
View file @
70f01d04
<?php
include
'koneksi.php'
;
$id
=
$_GET
[
'id'
];
$status
=
'Diterima'
;
mysqli_query
(
$koneksi
,
"UPDATE pembayaran SET status = '
$status
' WHERE id_pembayaran = '
$id
'"
);
header
(
'Location: daftar_pesanan.php'
);
?>
\ No newline at end of file
selesai.php
View file @
70f01d04
<?php
<?php
include
'koneksi.php'
;
include
'koneksi.php'
;
global
$total
;
$member_id
=
$_GET
[
'id_member'
];
$id
=
$_GET
[
'id'
];
$query
=
mysqli_query
(
$koneksi
,
"SELECT menu.harga, 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
'"
);
while
(
$row
=
mysqli_fetch_assoc
(
$query
)){
$jumlah
=
$row
[
'jumlah'
]
*
$row
[
'harga'
];
$total
=
$total
+=
$jumlah
;
}
$bukti
=
$_FILES
[
'bukti'
][
'name'
];
move_uploaded_file
(
$_FILES
[
'bukti'
][
'tmp_name'
],
'picture/'
.
$bukti
);
mysqli_query
(
$koneksi
,
"DELETE FROM pemesanan WHERE member_id = '
$id
'"
);
mysqli_query
(
$koneksi
,
"DELETE FROM pembayaran WHERE member_id = '
$id
'"
);
mysqli_query
(
$koneksi
,
"INSERT INTO pembayaran VALUES('', '
$member_id
', '
$total_harga
', '
$bukti
') "
);
header
(
'Location: member_menu.php'
);
header
(
'Location: bayar.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