-
Notifications
You must be signed in to change notification settings - Fork 0
/
records.html
91 lines (73 loc) · 3.79 KB
/
records.html
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="images/fav.png">
<title>Les records</title>
<script src="./js/lib/jquery.js"></script>
<link rel="stylesheet" href="./js/lib/css/font-awesome.min.css">
<!-- Bootstrap core CSS -->
<link href="./js/bootstrap/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/accueil.css" rel="stylesheet">
<link href="css/records.css" rel="stylesheet">
<script type="text/javascript" src="js/timer.js"></script>
<script type="text/javascript" src="js/machine.js"></script>
<script src="./js/bootstrap/js/bootstrap.js" charset="utf-8"></script>
</head>
<body>
<div class="container">
<div class="jumbotron">
<img src="images/logo.png" alt="HTML5 Icon" style="width:200px;height:200px;"/>
<h2 color="#41C632">Les records</h2>
<br/>
<br/>
<div class="responsive-table-line" style="margin:0px auto;max-width:700px;">
<table class="table table-bordered table-condensed table-body-center CSSTableGenerator" id="tableRecord" >
<tr>
<td>Numéro</td>
<td>Pseudo</td>
<td>Score</td>
<td>Message</td>
</tr>
<script>
(function() {
$.ajax({
url: 'http://' + ip + ':3000/top/'+idMachine+'/10',
})
.done(function(data) {
var obj = jQuery.parseJSON(data);
$.each(obj, function(i) {
var table = "<tr>";
table +="<td data-title='numero'>";
table += i+1 + "</td>";
table +="<td data-title='pseudo'>";
table += obj[i].nameUser + "</td>";
table +="<td data-title='score'>";
table += obj[i].score + "</td>";
table +="<td data-title='feedback'>";
table += obj[i].feedback + "</td>";
table += "</tr>";
$("#tableRecord").append(table);
});
})
.fail(function() {
alert("Ajax failed to fetch data")
})
})();
</script>
</table>
<br/>
<br/>
<br/>
<br/>
</div>
<p><a style="margin-right:1em" class="btn btn-lg btn-success btnRetour" href="./recordsAll.html" role="button">Voir tous les records</a><a class="btn btn-lg btn-success btnRetour" href="./accueil.html" role="button">Retour</a></p>
</div>
</body>
</html>