diff --git a/css/default_style.css b/css/default_style.css index 37be8b575bdd34cac07b7443dfe64f0fba2d0982..cb3a7d17278c8478e0388e35b364ebb71be185f4 100755 --- a/css/default_style.css +++ b/css/default_style.css @@ -98,9 +98,10 @@ a:hover { } .profile_pict_frame { - width: 100px; - height: 100px; + width: 90px; + height: 90px; overflow: auto; + border: 5px solid #333333; border-radius: 50%; margin-left: auto; margin-right: auto; @@ -110,4 +111,4 @@ a:hover { margin: 0 auto; height: 100%; width: 100%; -} \ No newline at end of file +} diff --git a/css/profile.css b/css/profile.css index e343acb4e8ae7430161d21940b539dc62bb74fe8..9b23357ebccc65dd8f9a9846ee1d704c6ec78d08 100755 --- a/css/profile.css +++ b/css/profile.css @@ -10,6 +10,7 @@ } .edit_profile_button a { text-decoration: none; + color: #f9880e; } .profile_info_container { text-align: center; @@ -21,9 +22,12 @@ .profile_data_container { height: 100px; } +.username_display { + margin-top: 10px; + margin-bottom: 10px; +} .profile_data_container p { - margin-top: 0px; - margin-bottom: 0px; + margin: 0px; padding: 0px; } .prefloc_container { @@ -39,6 +43,7 @@ } .edit_prefloc_button a { text-decoration: none; + color: #f9880e; } .edit_profile_container { margin-top: 10%; diff --git a/profile/profile.php b/profile/profile.php index 50eedc9fb80432bec20c3d28a41a57a666832de1..0f45fde3346be1f477e476c13258db180b3b1b7b 100644 --- a/profile/profile.php +++ b/profile/profile.php @@ -39,15 +39,24 @@ </div> <div class="profile_data_container"> <?php - echo "</br><p><strong>".$row['username']."</strong></p>"; + echo "<div class='username_display'><strong>".$row['username']."</strong></div>"; echo "<p>".$row['name']."</p>"; if ($row['status'] == "driver") { - echo "<p>Driver | <span id='driver_rating'>Rating (xxx Votes)</span></p>"; + echo "<p>Driver | <span style='color : #f9880e'>☆<span id='driver_rating'>Rating</span></span> (<span id='driver_votes'>(xxx Votes)</span> votes)</p>"; + $query=mysqli_query($con,"SELECT * FROM driver WHERE driver_id='".$user_id."'") or die(mysqli_error()); + if (mysqli_num_rows($query) != 0) { + $getDriver = mysqli_fetch_assoc($query); + $driver_score = $getDriver['total_score']; + $driver_votes = $getDriver['votes']; + $rating = $driver_score / $driver_votes; + echo '<script>document.getElementById("driver_rating").innerHTML = '.$rating.';</script>'; + echo '<script>document.getElementById("driver_votes").innerHTML = '.$driver_votes.';</script>'; + } } else { echo "<p>Non-Driver</p>"; } - echo "<p>".$row['email']."</p>"; - echo "<p>".$row['phone']."</p>"; + echo "<p>✉".$row['email']."</p>"; + echo "<p>â˜".$row['phone']."</p>"; if (isset($row['pict'])) { echo "<script>document.getElementById('profile_pict').src ='getProfilePict.php?id=".$user_id."'</script>"; }