diff --git a/web/css/basic.css b/web/css/basic.css index e979bf27ac47a3200134a65098e52618d4b17607..3a0c1402363c028e7c2c1e56544e9ca873bf092b 100644 --- a/web/css/basic.css +++ b/web/css/basic.css @@ -153,6 +153,11 @@ a { } +.c-border { + border: 2px solid black!important; +} + + .alert-box:before, .alert-box:after { content: ""; diff --git a/web/history/controller.php b/web/history/controller.php index f9bc55b22e85221834c730daa00d2767975bada4..970f7baaf0d2a0fa5f29bcb799318ba508b2ac79 100644 --- a/web/history/controller.php +++ b/web/history/controller.php @@ -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()) { diff --git a/web/history/view.php b/web/history/view.php index 2f93b12bdfcc248e3a3b290f438152eb5a057a44..02ea0b9945aec3bfb7ea14c3328ac3db1d7396ca 100644 --- a/web/history/view.php +++ b/web/history/view.php @@ -40,7 +40,7 @@ class historyView { $resultHTML = '