Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA1-1617-D3TI08
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
Dodi Agustin Refansius Pakpahan
PA1-1617-D3TI08
Commits
33598321
Commit
33598321
authored
May 27, 2017
by
Dodi Agustin Refansius Pakpahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
e24d8e77
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
16 deletions
+27
-16
Daftar_pesanan.php
Daftar_pesanan.php
+10
-11
konfirmasi.php
konfirmasi.php
+8
-2
pembayaran.php
pembayaran.php
+4
-3
pemesanan.php
pemesanan.php
+5
-0
No files found.
Daftar_pesanan.php
View file @
33598321
...
...
@@ -122,25 +122,24 @@
</thead>
<?php
require_once
(
dirname
(
__FILE__
)
.
'/fungsi.php'
);
$query
=
mysqli_query
(
$conn
,
"SELECT * FROM pembayaran"
);
$queryy
=
mysqli_query
(
$conn
,
"SELECT * FROM pemesanan"
);
$dataa
=
mysqli_fetch_assoc
(
$queryy
);
$query
=
mysqli_query
(
$conn
,
"SELECT * FROM `pemesanan` INNER JOIN pembayaran ON pemesanan.id = pembayaran.id_pemesanan
"
);
//jika data tidak kosong, maka akan melakukan perulangan while
$no
=
1
;
//membuat variabel $no untuk membuat nomor urut
while
(
$data
=
mysqli_fetch_a
ssoc
(
$query
))
while
(
$data
=
mysqli_fetch_a
rray
(
$query
))
{
//perulangan while dg membuat variabel $data yang akan mengambil data di database
//menampilkan row dengan data di database
echo
'<tr>'
;
echo
'<td style="text-align:center">'
.
$data
[
'id_pemesanan'
]
.
'</td>'
;
echo
'<td>'
.
$data
a
[
'namalengkap'
]
.
'</td>'
;
echo
'<td>'
.
$data
[
'namalengkap'
]
.
'</td>'
;
echo
'<td>'
.
$data
a
[
'alamat'
]
.
'</td>'
;
echo
'<td>'
.
$data
a
[
'email'
]
.
'</td>'
;
echo
'<td style="text-align:center">'
.
$data
a
[
'jumlahpeserta'
]
.
'</td>'
;
echo
'<td>'
.
$data
a
[
'waktumulai'
]
.
'</td>'
;
echo
'<td>'
.
$data
a
[
'waktuselesai'
]
.
'</td>'
;
echo
'<td style="text-align:center" >'
.
$data
a
[
'namaruangan'
]
.
'</td>'
;
echo
'<td>'
.
$data
[
'alamat'
]
.
'</td>'
;
echo
'<td>'
.
$data
[
'email'
]
.
'</td>'
;
echo
'<td style="text-align:center">'
.
$data
[
'jumlahpeserta'
]
.
'</td>'
;
echo
'<td>'
.
$data
[
'waktumulai'
]
.
'</td>'
;
echo
'<td>'
.
$data
[
'waktuselesai'
]
.
'</td>'
;
echo
'<td style="text-align:center" >'
.
$data
[
'namaruangan'
]
.
'</td>'
;
echo
'<td><img src="gambar/'
.
$data
[
'bukti'
]
.
'"style="width:200px"></td>'
;
echo
'<td>
...
...
konfirmasi.php
View file @
33598321
...
...
@@ -10,7 +10,12 @@ $bukti = $_FILES['gambar']['name'];
move_uploaded_file
(
$_FILES
[
'gambar'
][
'tmp_name'
],
'gambar/'
.
$bukti
);
mysqli_query
(
$conn
,
"INSERT INTO pembayaran VALUES('', '
$id_pemesanan
', '
$total
', '
$bukti
', '')"
);
header
(
'Location: pembayaran.php?id='
.
$id_pemesanan
);
$action
=
mysqli_query
(
$conn
,
"INSERT INTO pembayaran VALUES('', '
$id_pemesanan
', '
$total
', '
$bukti
', '')"
);
if
(
!
$action
){
echo
mysqli_error
();
}
else
{
echo
"<script>alert('berhasil');window.location.href='pembayaran.php';</script>"
;
}
?>
\ No newline at end of file
pembayaran.php
View file @
33598321
...
...
@@ -21,11 +21,12 @@ $id = $_GET['id'];
$query
=
mysqli_query
(
$conn
,
"SELECT * FROM pembayaran INNER JOIN pemesanan ON pembayaran.id_pemesanan = pemesanan.id where id_pemesanan = '
$id
'"
);
$row
=
mysqli_fetch_array
(
$query
);
if
(
$row
[
'bukti'
]
==
NULL
&&
$row
[
'status'
]
==
NULL
){
echo
'<form action="konfirmasi.php?id=<?= $id_pemesanan?>" method="POST" enctype="multipart/form-data"
>
<input type="file" style="width:200px" name="gambar">
if
(
$row
[
'bukti'
]
==
NULL
&&
$row
[
'status'
]
==
NULL
){
?>
<form
action=
"konfirmasi.php?id=
<?php
echo
$id
;
?>
"
method=
"POST"
enctype=
"multipart/form-data"
>
<input
type=
"file"
style=
"width:200px"
name=
"gambar"
>
<input
type=
"submit"
name=
"submit"
class=
"btn btn-info"
value=
"Pesan Sekarang"
>
</form>
';
<?php
}
else
if
(
$row
[
'bukti'
]
!=
NULL
&&
$row
[
'status'
]
==
NULL
){
echo
'<center> <h1> Terimakasih telah membayar. </h1>'
;
...
...
pemesanan.php
View file @
33598321
...
...
@@ -26,5 +26,9 @@ include_once('fungsi.php');
header
(
'Location: konfirmasipemesanan.php?id_kamar='
.
$id_kamar
);
}
if
(
$memesan
){
echo
mysqli_error
();
}
?>
\ 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