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
c88a9bc1
Commit
c88a9bc1
authored
May 24, 2017
by
Roy Junedi Simamora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Penambahan Pemesanan
parent
f2f0bf5a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
11 deletions
+117
-11
bayar.php
bayar.php
+49
-0
cart.php
cart.php
+59
-0
detail.php
detail.php
+0
-2
member_menu.php
member_menu.php
+7
-8
pesan_proses.php
pesan_proses.php
+2
-1
No files found.
bayar.php
0 → 100644
View file @
c88a9bc1
<?php
include
'koneksi.php'
;
include
'common/header.php'
;
?>
<h3>
<span
class=
"glyphicon glyphicon-credit-card"
></span>
Menu Pembayaran
</h3>
<br/>
<hr/>
<?php
global
$total
;
$member_id
=
$_GET
[
'id_member'
];
$query
=
mysqli_query
(
$koneksi
,
"SELECT menu.nama AS nama_menu, 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
;
}
?>
<div
class=
"col-md-12"
align=
"center"
>
<h3>
Terimakasih telah memesan
</h3>
<div>
Pesanan anda sebesar Rp.
<?=
$total
?>
,-
<br>
Silahkan Kirim uang dengan nominal tertera ke No. Rekening 0413- XXX.
<br>
</div>
<br>
<br>
<div>
Setelah mengirim uang upload bukti pengiriman :
<br>
<form
action=
"selesai.php?id_member=
<?=
$member_id
?>
"
method=
"post"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"bukti"
>
<input
type=
"submit"
class=
"btn btn-info"
value=
"Upload"
>
</form>
<br>
<?php
$kueri
=
mysqli_query
(
$koneksi
,
"SELECT * FROM pembayaran WHERE member_id = '
$member_id
'"
);
$bukti
=
mysqli_fetch_array
(
$kueri
);
if
(
$bukti
[
'bukti'
]
!=
NULL
){
?>
<img
src=
"picture/
<?php
$bukti
[
'bukti'
]
?>
"
class=
"img img-rounded"
width=
"250"
height=
"250"
>
<?php
}
else
{
echo
'Gambar Bukti Belum di Upload!'
;
}
?>
<br>
</div>
<br>
</div>
<?php
include
'common/footer.php'
;
?>
\ No newline at end of file
cart.php
0 → 100644
View file @
c88a9bc1
<?php
include
'koneksi.php'
;
include
'common/header.php'
;
?>
<h2>
<span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Cart
</h2>
<br/>
<hr/>
<div
class=
"col-md-12"
align=
"center"
>
<table
class=
"table table-hover table-condensed"
>
<tr>
<th>
No
</th>
<th>
Nama
</th>
<th>
Harga
</th>
<th>
Jumlah
</th>
<th>
Subtotal
</th>
<th>
Opsi
</th>
</tr>
<?php
$id_member
=
$_GET
[
'id_member'
];
$query
=
mysqli_query
(
$koneksi
,
"SELECT menu.nama AS nama_menu, 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
'"
);
$no
=
1
;
while
(
$row
=
mysqli_fetch_assoc
(
$query
)){
$subtotal
=
$row
[
'jumlah'
]
*
$row
[
'harga'
];
?>
<tr>
<td>
<?=
$no
?>
</td>
<td>
<?php
echo
$row
[
'nama_menu'
]
?>
</td>
<td>
<?=
$row
[
'harga'
]
?>
</td>
<td>
<?=
$row
[
'jumlah'
]
?>
</td>
<td>
<?=
$subtotal
?>
</td>
<td>
<a
href=
"batal.php?id_member=
<?=
$id_member
?>
"
class=
"btn btn-danger"
>
<span
class=
"glyphicon glyphicon-remove"
></span>
Batalkan
</a>
</td>
</tr>
<?php
global
$total
;
$total
+=
$subtotal
;
$no
++
;
}
?>
</table>
<div
align=
"right"
>
<font
face=
"arial"
size=
"5"
>
Total :
<?=
$total
?>
</font>
</div>
<div
align=
"center"
>
<a
href=
"member_menu.php"
class=
"btn btn-info"
><span
class=
"glyphicon glyphicon-chevron-left"
></span>
Pesan Lagi
</a>
<a
href=
"bayar.php?id_member=
<?=
$id_member
?>
"
class=
"btn btn-success"
>
Checkout
<span
class=
"glyphicon glyphicon-chevron-right"
></span>
</a>
</div>
<br>
</div>
<?php
include
'common/footer.php'
;
?>
\ No newline at end of file
detail.php
View file @
c88a9bc1
...
...
@@ -40,8 +40,6 @@ require 'koneksi.php';
</td>
</tr>
</table>
<a
class=
"btn btn-primary"
href=
"member_menu.php"
><span
class=
"glyphicon glyphicon-chevron-left"
></span>
Pesan Lagi
</a>
<a
class=
"btn btn-warning"
href=
"bayar.php?id=
<?php
echo
$id
?>
"
>
Checkout
<span
class=
"glyphicon glyphicon-chevron-right"
></span></a>
</div>
<?php
}
...
...
member_menu.php
View file @
c88a9bc1
<?php
require
'koneksi.php'
;
include
'common/header.php'
;
?>
<h1><span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Daftar Menu
</h1>
<br/>
<hr/>
<?php
$per_hal
=
8
;
$query
=
"SELECT * from menu"
;
$jumlah_record
=
mysqli_query
(
$koneksi
,
$query
);
...
...
@@ -14,13 +9,17 @@ $jum = mysqli_num_rows($jumlah_record);
$halaman
=
ceil
(
$jum
/
$per_hal
);
$page
=
(
isset
(
$_GET
[
'page'
]))
?
(
int
)
$_GET
[
'page'
]
:
1
;
$start
=
(
$page
-
1
)
*
$per_hal
;
?>
<br/>
<?php
if
(
isset
(
$_SESSION
[
'username'
])){
$id_member
=
$_SESSION
[
'id_member'
];
}
$menu
=
mysqli_query
(
$GLOBALS
[
"___mysqli_ston"
],
"select * from menu limit
$start
,
$per_hal
"
);
?>
<h1><span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Daftar Menu
</h1>
<br/>
<hr/>
<br/>
<?php
while
(
$b
=
mysqli_fetch_array
(
$menu
))
{
?>
...
...
pesan_proses.php
View file @
c88a9bc1
...
...
@@ -10,5 +10,5 @@
$jumlah
=
$_POST
[
'jumlah'
];
mysqli_query
(
$koneksi
,
"INSERT INTO pemesanan VALUES('', '
$member_id
', '
$menu_id
', '
$tanggal
',
$jumlah
)"
);
header
(
'Location:
detail.php?id='
.
$id
.
'&
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