= 40)
$label = "warning";
if($ratio >= 80)
$label = "success";
$table .= "
";
$table .= "| " . $result['title'] . " | ";
$table .= "" . $result['difficulty'] . " | ";
$table .= "" . $ratio . "% | ";
$table .= "" . $result['buttons_pressed'] . " | ";
$table .= "" . $result['joystick_moved'] . " | ";
$table .= "" . format($result['play_time'])['string'] . " | ";
$table .= "" . $result['start_time'] . " | ";
$table .= "
";
}
// ======================================================
// LATEST GAMES
// ======================================================
$table2 = "";
$query = "SELECT `title`, `difficulty`, songinstance.id as siid, song.id as sid, `username`, `score`, `date`
FROM `highscore`, `songinstance`, `song`
WHERE highscore.songinstance = songinstance.id AND songinstance.song = song.id
AND songinstance.id = $songinstance_id
ORDER BY `date` DESC";
$result_temp = mysqli_query($connection, $query);
while($result = mysqli_fetch_assoc($result_temp))
{
$table2 .= "";
$table2 .= "| " . $result['title'] . " | ";
$table2 .= "" . $result['difficulty'] . " | ";
$table2 .= "" . $result['username'] . " | ";
$table2 .= "" . $result['score'] . " | ";
$table2 .= "" . $result['date'] . " | ";
$table2 .= "
";
}
?>
| Song Name |
Difficulty |
Hit Ratio |
Buttons Pressed |
Joystick Moved |
Length |
Time |
| Song Name |
Difficulty |
Name |
Score |
Time |