diff --git a/css/history.css b/css/history.css index dd3da3a4a4d0a78a73d2ae396e0a16831bafa735..f54827c6fdfbcd9f1c89eff19daaa8b8f9816154 100755 --- a/css/history.css +++ b/css/history.css @@ -52,7 +52,7 @@ table.history_table { } table.history_table p { - margin: 0; + margin: 5px 0; padding: 0; font-style: "Lucida Console", Monaco, monospace; } @@ -85,11 +85,11 @@ p.history_comment { } table.history_table th, td { - padding: 5px; + padding: 0 5px; border-collapse: collapse; } -p.history_table td { +table.history_table tr td.order_data { vertical-align: top; } @@ -102,9 +102,20 @@ img.history_pict { } -.hide_hist_button { +button.hide_hist_button { margin: 0; color: white; background-color: red; font-size: 9px; + margin-bottom: 45px; +} + +.checked { + color:orange +} + +.yellow_score { + font-size: 20px; + color: orange; + vertical-align: middle; } \ No newline at end of file diff --git a/history/driver_history.php b/history/driver_history.php index f9789aabea9e82b3ce7324a7cd24606fdb032320..16f0e00afdd826ec44d20d2e3ad8f8e86502b31e 100644 --- a/history/driver_history.php +++ b/history/driver_history.php @@ -64,17 +64,19 @@ $driver_query=mysqli_query($con,"SELECT username FROM user WHERE user_id='".$row['cust_id']."'") or die(mysqli_error()); $driver_row=mysqli_fetch_assoc($driver_query); $driver_name=$driver_row['username']; + $given_score=(int)$row['score']; + echo "<tr> <td> <img class='history_pict' src='../profile/getProfilePict.php?id=".$row['cust_id']."'> <button class='hide_hist_button' type='button' value='hide' onclick='hide_row(this)'>Hide</button> </td> - <td> + <td class='order_data'> <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'>gave ".$row['score']." stars for this order</p> + <p class='history_rating'>gave <span class='yellow_score'>  ".$given_score." </span> stars for this order</p> <p class='history_comment'>and left comment:</p> <p class='history_comment' style='margin-left: 30px;'>".$row['comment']."</p> </td> diff --git a/history/transaction_history.php b/history/transaction_history.php index 789778ffa99161c62bcfa67db4c59f0d40fd06b8..068d2cea11b42bcbcf380a96e1042f1a75738172 100644 --- a/history/transaction_history.php +++ b/history/transaction_history.php @@ -2,6 +2,7 @@ <html> <head> <title>transaction history</title> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="../css/default_style.css"> <link rel="stylesheet" type="text/css" href="../css/history.css"> <link rel="stylesheet" type="text/css" href="../css/header.css"> @@ -72,11 +73,18 @@ <img class='history_pict' src='../profile/getProfilePict.php?id=".$row['driver_id']."'> <button class='hide_hist_button' type='button' value='hide' onclick='hide_row(this)'>Hide</button> </td> - <td> + <td class='order_data'> <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_rating'>You rated: "; + + for ($i = 0; $i < $row['score']; $i++) { + echo "<span class='fa fa-star checked'></span>"; + } + + echo + "</p> <p class='history_comment'>You commented:</p> <p class='history_comment' style='margin-left: 30px;'>".$row['comment']."</p> </td> diff --git a/order/order.php b/order/order.php index dd2165055dc367c38037c8eb7446f2552abd83b5..c6fd2793578861251ff5149480119cf33bc73845 100644 --- a/order/order.php +++ b/order/order.php @@ -5,6 +5,7 @@ <link rel="stylesheet" type="text/css" href="../css/default_style.css"> <link rel="stylesheet" type="text/css" href="../css/order.css"> <link rel="stylesheet" type="text/css" href="../css/header.css"> + </head> <body> <div class="frame">