Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IF3110-2018-K03-Petjah
TugasBesar1_2018
Commits
5ecbf0b9
Commit
5ecbf0b9
authored
Oct 26, 2018
by
Wildan Dicky Alnatara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing history controller
parent
9b0a2abf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
web/history/controller.php
web/history/controller.php
+16
-1
web/history/view.php
web/history/view.php
+2
-2
web/uploads/21.jpg
web/uploads/21.jpg
+0
-0
No files found.
web/history/controller.php
View file @
5ecbf0b9
...
...
@@ -20,7 +20,22 @@ class historyController {
$conn
=
connect_to_mysql
();
$arrResult
=
array
();
if
(
$conn
!=
null
)
{
$sql_query
=
"SELECT * FROM book_order JOIN books ON book_id=books.ID where user_Id=
$userId
ORDER BY tanggal DESC"
;
// $sql_query = "SELECT * FROM book_order JOIN books ON book_id=books.ID where user_Id=$userId ORDER BY tanggal DESC";
$sql_query
=
"
SELECT
*,
(CASE
WHEN EXISTS (SELECT * FROM review where Nomor_Order=order_id) THEN TRUE
ELSE FALSE
END) as reviewed
FROM
book_order
JOIN
books
ON
book_id=books.ID
where user_Id=
$userId
ORDER BY tanggal DESC, Nomor_Order DESC
"
;
$result
=
$conn
->
query
(
$sql_query
);
if
(
$result
!=
NULL
){
while
(
$row
=
$result
->
fetch_assoc
())
{
...
...
web/history/view.php
View file @
5ecbf0b9
...
...
@@ -76,8 +76,8 @@ class historyView {
</div>
<div id="right-most-column-history-item">
<div class="flex-container align-items-flex-end add-flex-direction-column ">
<div class="font-weight-bold gray-text">'
.
$data
[
'date'
]
.
'</div>
<div class="font-weight-bold gray-text">Nomor Order #'
.
$data
[
'orderNumber'
]
.
'</div>
<div class="font-weight-bold
text-size-20
gray-text">'
.
$data
[
'date'
]
.
'</div>
<div class="font-weight-bold
text-size-20
gray-text">Nomor Order #'
.
$data
[
'orderNumber'
]
.
'</div>
</div>
</div>
</div>
...
...
web/uploads/21.jpg
0 → 100644
View file @
5ecbf0b9
138 KB
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