diff --git a/css/history.css b/css/history.css index 0154a7f0a6c9193f49132000bc3a762cd0b9aac6..62d0ac3baefc07ec0cb431950db38ff8f673f80d 100755 --- a/css/history.css +++ b/css/history.css @@ -58,7 +58,6 @@ table.history_table { table.history_table p { margin: 0; padding: 0; - font-size: 14px; font-style: "Lucida Console", Monaco, monospace; } @@ -67,6 +66,7 @@ td.history_column { } p.history_date { + font-size: 14px; color: grey; font-weight: bold; } @@ -77,20 +77,20 @@ p.history_username { } p.history_loc { - + font-size: 14px; } p.history_rating { - + font-size: 14px; } p.history_comment { - + font-size: 14px; } table.history_table th, td { border: 1px solid purple; - padding: 0; + padding: 5px; border-collapse: collapse; } @@ -101,7 +101,6 @@ p.history_table td { img.history_pict { width: 100px; height: 100px; - overflow: auto; border-radius: 50%; display: inline; margin: 0; diff --git a/history/transaction_history.php b/history/transaction_history.php index 871ccdeec87253a32bcf90fa28aa042cb0f75880..9be4a6d8871de85b61c668da0461ce722d77ee81 100644 --- a/history/transaction_history.php +++ b/history/transaction_history.php @@ -21,7 +21,6 @@ $username = $row['username']; include("../template/header.php"); } - mysqli_close($con); ?> </div> <div class="menu_container"> @@ -52,51 +51,33 @@ </colgroup> <tbody> - <tr> - <td> - <img class="history_pict" src="../img/default_profile.jpeg"> - </td> - <td class="history_column"> - <p class="history_date">tanggal</p> - <p class="history_username">Username</p> - <p class="history_loc">asal - tujuan</p> - <p class="history_rating">rating</p> - <p class="history_comment">You commented:</p> - <p class="history_comment" style="margin-left: 30px;">ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - </p> - </td> - </tr> - <tr> - <td> - <img class="history_pict" src="../img/default_profile.jpeg"> - </td> - <td class="history_column"> - <p class="history_date">tanggal</p> - <p class="history_username">Username</p> - <p class="history_loc">asal - tujuan</p> - <p class="history_rating">rating</p> - <p class="history_comment">You commented:</p> - <p class="history_comment" style="margin-left: 30px;">ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - </p> - </td> - </tr> - <tr> - <td> - <img class="history_pict" src="../img/default_profile.jpeg"> - </td> - <td class="history_column"> - <p class="history_date">tanggal</p> - <p class="history_username">Username</p> - <p class="history_loc">asal - tujuan</p> - <p class="history_rating">rating</p> - <p class="history_comment">You commented:</p> - <p class="history_comment" style="margin-left: 30px;">ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - </p> - </td> - </tr> + <?php + $query_order=mysqli_query($con,"SELECT * FROM `order` WHERE `cust_id`='".$user_id."'") or die(mysqli_error($con)); + + if(mysqli_num_rows($query_order)!=0) + { + while($row=mysqli_fetch_assoc($query_order)) { + $driver_query=mysqli_query($con,"SELECT username FROM user WHERE user_id='".$row['driver_id']."'") or die(mysqli_error()); + $driver_row=mysqli_fetch_assoc($driver_query); + $driver_name=$driver_row['username']; + echo + "<tr> + <td> + <img class='history_pict' src='../profile/getProfilePict.php?id=".$row['driver_id']."' + </td> + <td> + <p class='history_date'>".$row['date']."</p> + <p class='history_username'>".$driver_name."</p> + <p class='history_loc'>".$row['pick_city']." - ".$row['dest_city']."</p> + <p class='history_rating'>rating ".$row['score']."</p> + <p class='history_comment'>You commented:</p> + <p class='history_comment' style='margin-left: 30px;'>".$row['comment']."</p> + </td> + </tr>"; + } + } + mysqli_close($con); + ?> </tbody> </table> </div> diff --git a/img/demon.jpg b/img/demon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..97064d77d36323d63a50a2e9ef28b3a468f34a55 Binary files /dev/null and b/img/demon.jpg differ diff --git a/img/knight.jpg b/img/knight.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8a422b2efb94ff846c84ab2933984b1e5d350ea3 Binary files /dev/null and b/img/knight.jpg differ diff --git a/img/vegas.jpg b/img/vegas.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c93bff93a1bc770f4b4ac6a13c230494b61c4bda Binary files /dev/null and b/img/vegas.jpg differ diff --git a/profile/getProfilePict.php b/profile/getProfilePict.php index 1a448af3e58a7421981a65768857f246f6a52145..7218f35dc96612d6d15ea45880604f1a92910051 100644 --- a/profile/getProfilePict.php +++ b/profile/getProfilePict.php @@ -6,6 +6,9 @@ mysqli_close($con); if (isset($row['pict'])) { header("Content-type: image/jpeg"); - echo $row['pict']; + echo $row['pict']; + } else { + header("Content-type: image/jpeg"); + echo "../img/default_profile.jpeg"; } ?>