Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA1-1617-D3TI107
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
Franciskus Partogu Hamonangan Napitupulu
PA1-1617-D3TI107
Commits
4dfe3fe4
Commit
4dfe3fe4
authored
Jun 13, 2017
by
Franciskus Partogu Hamonangan Napitupulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pemesanan
parent
10a97dda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
checkout.php
checkout.php
+15
-16
No files found.
checkout.php
View file @
4dfe3fe4
...
...
@@ -44,7 +44,9 @@
foreach
(
$_SESSION
[
'items'
]
as
$key
=>
$val
)
{
$query
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku WHERE isbn = '
$key
'"
);
$data
=
mysqli_fetch_array
(
$query
);
if
(
isset
(
$_SESSION
[
'pengunjung'
]))
{
$id_user
=
$_SESSION
[
'id_user'
];
}
else
{}
$jumlah_harga
=
$data
[
'harga'
]
*
$val
;
$total
+=
$jumlah_harga
;
$no
=
1
;
...
...
@@ -78,21 +80,19 @@
}
?>
<?php
if
(
$total
!=
0
&&
isset
(
$_SESSION
[
'pengunjung'
])){
echo
'
<tr style="background-color:#dbase_delete_record(dbase_identifier, record_number);"><td colspan="5" align="right"><b>Total :</b></td><td align="right"><b>Rp. '
.
number_format
(
$total
,
2
,
","
,
"."
)
.
'</b></tr></table>
if
(
$total
!=
0
&&
isset
(
$_SESSION
[
'pengunjung'
])){
?>
<tr
style=
"background-color:#dbase_delete_record(dbase_identifier, record_number);"
><td
colspan=
"5"
align=
"right"
><b>
Total :
</b></td><td
align=
"right"
><b>
Rp.
<?php
echo
number_format
(
$total
,
2
,
","
,
"."
)
?>
</b></tr></table>
<p><div
align=
"right"
>
<div
class=
"checkout-right-basket"
>
<a
href=
"allbook.php"
><span
class=
"glyphicon glyphicon-menu-left"
aria-hidden=
"true"
></span>
Lanjut Berbelanja
</a>
<a href="savebook.php">Lakukan pembayaran   <span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></a>
<a
href=
"savebook.php
?isbn=
<?php
echo
$data
[
'isbn'
]
?>
&id_user=
<?php
echo
$id_user
;
?>
&total=
<?php
echo
$jumlah_harga
;
?>
"
>
Lakukan pembayaran
 
<span
class=
"glyphicon glyphicon-menu-right"
aria-hidden=
"true"
></span></a>
<br><br><br><br><br><br>
</div>
</div></p>
'
;
}
elseif
(
$total
!=
0
)
{
echo
'
<tr style="background-color:#dbase_delete_record(dbase_identifier, record_number);"><td colspan="5" align="right"><b>Total :</b></td><td align="right"><b>Rp. '
.
number_format
(
$total
,
2
,
","
,
"."
)
.
'</b></td></td></td></tr></table>
;
<?php
}
elseif
(
$total
!=
0
)
{
?>
<tr
style=
"background-color:#dbase_delete_record(dbase_identifier, record_number);"
><td
colspan=
"5"
align=
"right"
><b>
Total :
</b></td><td
align=
"right"
><b>
Rp.
<?php
echo
number_format
(
$total
,
2
,
","
,
"."
)
?>
</b></td></td></td></tr></table>
<p><div
align=
"right"
>
<div
class=
"checkout-right-basket"
>
<a
href=
"allbook.php"
><span
class=
"glyphicon glyphicon-menu-left"
aria-hidden=
"true"
></span>
Lanjut Berbelanja
</a>
...
...
@@ -100,18 +100,17 @@
<br><br><br><br><br>
</div>
</div></p>
'
;
}
else
{
echo
'
;
<?php
}
else
{
?>
<tr><td
colspan=
"7"
align=
"center"
style=
"background-color:#ffffff"
>
Ups, Keranjang belanja kosong !
</td></tr></table>
<div
class=
"checkout-right-basket"
>
<a
href=
"allbook.php"
><span
class=
"glyphicon glyphicon-menu-left"
aria-hidden=
"true"
></span>
Lanjut Berbelanja
</a>
<br><br><br><br><br>
</div>
'
;
}
;
<?php
}
?>
?>
</table>
</div>
...
...
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