-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfeedback_view.php
More file actions
52 lines (40 loc) · 978 Bytes
/
Copy pathfeedback_view.php
File metadata and controls
52 lines (40 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
$sql = "SELECT fid, username, comment, rating FROM feedback";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
for($i = 0; $i<4096; $i++)
{
echo "<!-- Lol you can't see this :P -->";
}
echo "<table class='feedback_table'>
<tr>
<th>No.</th>
<th>User</th>
<th>Comment</th>
<th>Rating</th> ";
// echo "<th>Date</th>";
echo "</tr>";
while($row = mysqli_fetch_assoc($result)) {
echo "<tr>";
echo "<td>".$row["fid"]."</td>";
echo "<td>".$row["username"]."</td>";
echo "<td>".$row["comment"]."</td>";
$rating = $row["rating"];
if($rating > 0) {
echo "<td>";
for($i = 0; $i<$rating; $i++)
echo "<img src=\"images/ui/star.gif\"></img> ";
echo "</td>";
}
else
echo "<td>n/a</td>";
// echo "<td>".$row["stamp"]."</td>";
echo "</tr>";
}
echo "</table>";
} else {
echo "0 results";
}
flush();
?>