From fdab1dae5c47df932560ab7b451600f512c24f60 Mon Sep 17 00:00:00 2001 From: freedomfeather <fadlurohmanakmal@rocketmail.com> Date: Sat, 7 Oct 2017 20:34:06 +0700 Subject: [PATCH] Memperbaiki tampilan list preferred location driver --- css/profile.css | 7 ++++++- profile/profile.php | 46 ++++++++++++++++++++++----------------------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/css/profile.css b/css/profile.css index d12007e4..8df0c56a 100755 --- a/css/profile.css +++ b/css/profile.css @@ -31,9 +31,14 @@ } .prefloc_container { height: 50%; + margin-top : 0%; } -.prefloc_container ul { +.prefloc_list ul { list-style-type: none; + margin: 0; +} +.prefloc_list ul:first-child { + padding-left: 0px; } .edit_prefloc_button { float: right; diff --git a/profile/profile.php b/profile/profile.php index 1ea48363..8f58184b 100644 --- a/profile/profile.php +++ b/profile/profile.php @@ -73,31 +73,31 @@ <div class="edit_prefloc_button"><a href=<?php echo 'edit_location.php?id='.$user_id; ?>>✎</a></div> </div> <div class="prefloc_list"> - <?php - if ($row['status'] != "driver") { - echo '<script>document.getElementById("display_prefloc").style.display = "none";</script>'; - } - $query=mysqli_query($con,"SELECT pref_loc FROM driver_prefloc WHERE driver_id='".$user_id."'") or die(mysqli_error()); - $numrows = mysqli_num_rows($query); - if($numrows !=0) - { - $i = 1; - $buffer = '<ul>'; - while ($row=mysqli_fetch_assoc($query)) { - if ($i != $numrows) { - $buffer .= '<li>►'.$row['pref_loc'].'</li><ul>'; - $i++; - } else { - $buffer .= '<li>►'.$row['pref_loc'].'</li>'; - } - } - for ($i = 0;$i <= $row; $i++) { - $buffer .= '</ul>'; + <?php + if ($row['status'] != "driver") { + echo '<script>document.getElementById("display_prefloc").style.display = "none";</script>'; + } + $query=mysqli_query($con,"SELECT pref_loc FROM driver_prefloc WHERE driver_id='".$user_id."'") or die(mysqli_error()); + $numrows = mysqli_num_rows($query); + if($numrows !=0) + { + $i = 1; + $buffer = '<ul>'; + while ($row=mysqli_fetch_assoc($query)) { + if ($i != $numrows) { + $buffer .= '<li>►'.$row['pref_loc'].'</li><ul>'; + $i++; + } else { + $buffer .= '<li>►'.$row['pref_loc'].'</li>'; } - echo $buffer; } - mysqli_close($con); - ?> + for ($i = 0;$i <= $row; $i++) { + $buffer .= '</ul>'; + } + echo $buffer; + } + mysqli_close($con); + ?> </div> </div> </div> -- GitLab