first commit
This commit is contained in:
commit
d975e212f9
35 changed files with 813 additions and 0 deletions
49
similverifica/statistics.php
Normal file
49
similverifica/statistics.php
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
global $votes;
|
||||
include "includes/security.php";
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="it">
|
||||
|
||||
<head>
|
||||
<title>Login</title>
|
||||
<?php require "includes/head.php" ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h1>Statistiche dei voti</h1>
|
||||
<canvas id="statistiche"></canvas>
|
||||
</div>
|
||||
|
||||
<?php require "includes/footer.php" ?>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
|
||||
<script>
|
||||
const ctx = document.getElementById('statistiche');
|
||||
|
||||
new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Avengers', 'Wall-E', 'Napoleon'],
|
||||
datasets: [{
|
||||
label: '# of Votes',
|
||||
data: [<?= $votes["avengers"] ?>, <?= $votes["walle"] ?>, <?= $votes["napoleon"] ?>,],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue