Skip to content
Snippets Groups Projects
Commit 980538d8 authored by Muhammad Umar Fariz Tumbuan's avatar Muhammad Umar Fariz Tumbuan
Browse files

History page: My previous order sudah bisa menquery database; avatar, tanggal,...

History page: My previous order sudah bisa menquery database; avatar, tanggal, username driver, kota asal-tujuan, rating (masih angka), dan komen sudah keluar
parent a328cca8
1 merge request!45OneHundred - 13515005 - Husnulzaki Wibisono Haryadi
...@@ -58,7 +58,6 @@ table.history_table { ...@@ -58,7 +58,6 @@ table.history_table {
table.history_table p { table.history_table p {
margin: 0; margin: 0;
padding: 0; padding: 0;
font-size: 14px;
font-style: "Lucida Console", Monaco, monospace; font-style: "Lucida Console", Monaco, monospace;
} }
...@@ -67,6 +66,7 @@ td.history_column { ...@@ -67,6 +66,7 @@ td.history_column {
} }
p.history_date { p.history_date {
font-size: 14px;
color: grey; color: grey;
font-weight: bold; font-weight: bold;
} }
...@@ -77,20 +77,20 @@ p.history_username { ...@@ -77,20 +77,20 @@ p.history_username {
} }
p.history_loc { p.history_loc {
font-size: 14px;
} }
p.history_rating { p.history_rating {
font-size: 14px;
} }
p.history_comment { p.history_comment {
font-size: 14px;
} }
table.history_table th, td { table.history_table th, td {
border: 1px solid purple; border: 1px solid purple;
padding: 0; padding: 5px;
border-collapse: collapse; border-collapse: collapse;
} }
...@@ -101,7 +101,6 @@ p.history_table td { ...@@ -101,7 +101,6 @@ p.history_table td {
img.history_pict { img.history_pict {
width: 100px; width: 100px;
height: 100px; height: 100px;
overflow: auto;
border-radius: 50%; border-radius: 50%;
display: inline; display: inline;
margin: 0; margin: 0;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
$username = $row['username']; $username = $row['username'];
include("../template/header.php"); include("../template/header.php");
} }
mysqli_close($con);
?> ?>
</div> </div>
<div class="menu_container"> <div class="menu_container">
...@@ -52,51 +51,33 @@ ...@@ -52,51 +51,33 @@
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <?php
<td> $query_order=mysqli_query($con,"SELECT * FROM `order` WHERE `cust_id`='".$user_id."'") or die(mysqli_error($con));
<img class="history_pict" src="../img/default_profile.jpeg">
</td> if(mysqli_num_rows($query_order)!=0)
<td class="history_column"> {
<p class="history_date">tanggal</p> while($row=mysqli_fetch_assoc($query_order)) {
<p class="history_username">Username</p> $driver_query=mysqli_query($con,"SELECT username FROM user WHERE user_id='".$row['driver_id']."'") or die(mysqli_error());
<p class="history_loc">asal - tujuan</p> $driver_row=mysqli_fetch_assoc($driver_query);
<p class="history_rating">rating</p> $driver_name=$driver_row['username'];
<p class="history_comment">You commented:</p> echo
<p class="history_comment" style="margin-left: 30px;">ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod "<tr>
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, <td>
</p> <img class='history_pict' src='../profile/getProfilePict.php?id=".$row['driver_id']."'
</td> </td>
</tr> <td>
<tr> <p class='history_date'>".$row['date']."</p>
<td> <p class='history_username'>".$driver_name."</p>
<img class="history_pict" src="../img/default_profile.jpeg"> <p class='history_loc'>".$row['pick_city']." - ".$row['dest_city']."</p>
</td> <p class='history_rating'>rating ".$row['score']."</p>
<td class="history_column"> <p class='history_comment'>You commented:</p>
<p class="history_date">tanggal</p> <p class='history_comment' style='margin-left: 30px;'>".$row['comment']."</p>
<p class="history_username">Username</p> </td>
<p class="history_loc">asal - tujuan</p> </tr>";
<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 mysqli_close($con);
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>
</tbody> </tbody>
</table> </table>
</div> </div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment