diff --git a/css/default_style.css b/css/default_style.css index 9af0c20d29d2168a55c955bd043bd6443eceae96..37be8b575bdd34cac07b7443dfe64f0fba2d0982 100755 --- a/css/default_style.css +++ b/css/default_style.css @@ -1,3 +1,8 @@ +body { + margin: 0; + padding: 0; +} + .frame { width: 360px; height: 550px; @@ -92,3 +97,17 @@ a:hover { margin: 0; } +.profile_pict_frame { + width: 100px; + height: 100px; + overflow: auto; + border-radius: 50%; + margin-left: auto; + margin-right: auto; +} +.profile_pict_frame img { + display: inline; + margin: 0 auto; + height: 100%; + width: 100%; +} \ No newline at end of file diff --git a/css/history.css b/css/history.css index a260d6c2607f7b0542ec35c8da5fb6b54a806363..0154a7f0a6c9193f49132000bc3a762cd0b9aac6 100755 --- a/css/history.css +++ b/css/history.css @@ -1,7 +1,7 @@ .history_container { margin-top: 10%; height: 79%; - border: 1px solid red; + border: 1px solid red; /*OJO LALI HAPUS IKI*/ } .history_container .subheader { @@ -40,3 +40,70 @@ .history_menu > h3 { margin: 5px 1px; } + +#history_table_container { + overflow-y: auto; + height: inherit; +} + +table.history_table { + margin-top: 5px; + border: 1px solid blue; /*OJO LALI HAPUS IKI*/ + width: 100%; + border: 1px solid purple; + padding: 0; + border-collapse: collapse; +} + +table.history_table p { + margin: 0; + padding: 0; + font-size: 14px; + font-style: "Lucida Console", Monaco, monospace; +} + +td.history_column { + padding: 2px 0 0 8px; +} + +p.history_date { + color: grey; + font-weight: bold; +} + +p.history_username { + font-size: 20px; + font-weight: bold; +} + +p.history_loc { + +} + +p.history_rating { + +} + +p.history_comment { + +} + +table.history_table th, td { + border: 1px solid purple; + padding: 0; + border-collapse: collapse; +} + +p.history_table td { + vertical-align: top; +} + +img.history_pict { + width: 100px; + height: 100px; + overflow: auto; + border-radius: 50%; + display: inline; + margin: 0; + +} \ No newline at end of file diff --git a/css/location.css b/css/location.css index e2c604f9ee2ea78d751276079668763199771117..9fd3dbec79bab20370abbf988c8d133554014d60 100644 --- a/css/location.css +++ b/css/location.css @@ -51,7 +51,7 @@ tr th:nth-child(3) { margin-left: 15%; } .delete_button { - color: red; + color: #ff0000; float: right; margin-right: 15%; } diff --git a/css/profile.css b/css/profile.css index 7f8bf4f16d9505f526ec87acf8a3333dbd0f9e3e..67b7397be081e9bd17ff8096b4888c9251c8dd53 100755 --- a/css/profile.css +++ b/css/profile.css @@ -17,20 +17,7 @@ margin-left: auto; margin-right: auto; } -.profile_pict_frame { - width: 100px; - height: 100px; - overflow: auto; - border-radius: 50%; - margin-left: auto; - margin-right: auto; -} -.profile_pict_frame img { - display: inline; - margin: 0 auto; - height: 100%; - width: 100%; -} + .profile_data_container { height: 100px; } diff --git a/history/driver_history.php b/history/driver_history.php index 5d2fe7d1029a520d6a5594ea19e4869addb7e066..a2812c70929ff1e27940b82dbd1452fd2af83cd3 100644 --- a/history/driver_history.php +++ b/history/driver_history.php @@ -44,6 +44,63 @@ </a> </li> </ul> + + <div id="history_table_container"> + <table class="history_table"> + <colgroup> + <col style="width: 20%;"> + <col style="width: 80%;"> + </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> + </tbody> + </table> + </div> </div> </div> </body> diff --git a/history/transaction_history.php b/history/transaction_history.php index ea67f9bf4cdb5f49b008e96d44a593468bc62188..871ccdeec87253a32bcf90fa28aa042cb0f75880 100644 --- a/history/transaction_history.php +++ b/history/transaction_history.php @@ -43,6 +43,63 @@ </a> </li> </ul> + + <div id="history_table_container"> + <table class="history_table"> + <colgroup> + <col style="width: 20%;"> + <col style="width: 80%;"> + </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> + </tbody> + </table> + </div> </div> </div> </body> diff --git a/profile/deletePrefLoc.php b/profile/deletePrefLoc.php new file mode 100644 index 0000000000000000000000000000000000000000..e9aa1749eec5f06a76555552faad89cd177f1f88 --- /dev/null +++ b/profile/deletePrefLoc.php @@ -0,0 +1,10 @@ +<?php + include '../database/dbconnect.php'; + $user_id = urldecode($_GET['id']); + $deletedLoc = urldecode($_GET['loc']); + $query = mysqli_query($con,"DELETE FROM driver_prefloc WHERE driver_id='".$user_id."' AND pref_loc='".$deletedLoc."'") or die(mysqli_error($con)); + mysqli_close($con); + if ($query) { + header("Location: edit_location.php?id=$user_id"); + } +?> diff --git a/profile/edit_location.php b/profile/edit_location.php index 0d25d1d0d45e7caf68d3823020d603bf05cbe637..e8a34d9770b612427a882ee62224858aca1dedef 100644 --- a/profile/edit_location.php +++ b/profile/edit_location.php @@ -43,11 +43,11 @@ { $i = 1; while($row=mysqli_fetch_assoc($query)) { - echo ' <tr> + echo '<tr> <td>'.$i.'</td> - <td>'.$row['pref_loc'].'</td> - <td><div class="edit_button">✎</div><div class="delete_button">✖</div></td> - </tr>'; + <td>'.$row['pref_loc'].'</td> + <td><div class="edit_button">✎</div><div class="delete_button"><a href=deletePrefLoc.php?id='.urlencode($user_id).'&loc='.urlencode($row['pref_loc']).'>✖</a></div></td> + </tr>'; $i++; } } diff --git a/profile/updateLocation.php b/profile/updateLocation.php index e2468caf320c99242ffaeb26bd018df6245248df..0334b045fe99ce117ac6c22eb33d59ae827dd4a0 100644 --- a/profile/updateLocation.php +++ b/profile/updateLocation.php @@ -5,6 +5,7 @@ $user_id = $_POST['hidden_userid']; $new_loc = $_POST['new_location']; $query = mysqli_query($con,"INSERT INTO driver_prefloc (driver_id,pref_loc) VALUES ('$user_id', '$new_loc')") or die(mysqli_error($con)); + mysqli_close($con); if ($query) { header("Location: edit_location.php?id=$user_id"); }