tabella per classifica completa di tutte le partite
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
body {
|
||||||
|
font-family: "Arial";
|
||||||
|
}
|
||||||
|
table, h1 {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
width: 75vw;
|
||||||
|
text-align: center;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
th, td {
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
+16
-18
@@ -4,31 +4,29 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Classifica completa</title>
|
<title>Classifica completa</title>
|
||||||
<style>
|
<link rel="stylesheet" href="classifica.css">
|
||||||
body {
|
|
||||||
font-family: "Arial";
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
td {
|
|
||||||
|
|
||||||
border: 1px solid black;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<h1>Classifica</h1>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Posizione</td>
|
<th>Posizione</th>
|
||||||
<td>Nome</td>
|
<th>Nome</th>
|
||||||
<td>Punteggio 1° fase</td>
|
<th>Punteggio 1° fase</th>
|
||||||
<td>Punteggio 2° fase</td>
|
<th>Punteggio 2° fase</th>
|
||||||
<td>Punteggio totale</td>
|
<th>Punteggio totale</th>
|
||||||
<td>Data di gioco</td>
|
<th>Data di gioco</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
require 'db.php';
|
||||||
|
foreach ($db_test as $posizione => $record) {
|
||||||
|
riga($posizione, $record);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
$debug = false;
|
||||||
|
function setDebug($val) {
|
||||||
|
$debug = $val;
|
||||||
|
if ($debug) {
|
||||||
|
echo "db";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$db_test = [
|
||||||
|
[
|
||||||
|
'nome' => 's1',
|
||||||
|
'p1' => 95,
|
||||||
|
'p2' => 90,
|
||||||
|
'pt' => 50,
|
||||||
|
'g' => '24-11-2025'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'nome' => 's1',
|
||||||
|
'p1' => 95,
|
||||||
|
'p2' => 90,
|
||||||
|
'pt' => 50,
|
||||||
|
'g' => '24-11-2025'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$classifica = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||||
|
function riga($pos, $data) {
|
||||||
|
$pos++;
|
||||||
|
$nome = $data['nome'];
|
||||||
|
$p1 = $data['p1'];
|
||||||
|
$p2 = $data['p2'];
|
||||||
|
$pt = $data['pt'];
|
||||||
|
$g = $data['g'];
|
||||||
|
echo '<tr><td>'.$pos.'</td><td>'.$nome.'</td><td>'.$p1.'</td><td>'.$p2.'</td><td>'.$pt.'</td><td>'.$g.'</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user