forked from vergnet/site-accueil-insa
stats.php
This commit is contained in:
parent
4d6add6799
commit
2726660593
2 changed files with 121 additions and 1 deletions
|
@ -0,0 +1,62 @@
|
|||
main {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
section {
|
||||
display: block;
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
width: 80%;
|
||||
max-width: 800px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 50px;
|
||||
font-size: 1.2rem;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
table.out {
|
||||
margin-top: 50px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
width: 80%;
|
||||
padding: 40px;
|
||||
/*background-color: rgba(255,255,255,0.5);*/
|
||||
}
|
||||
|
||||
span.box-point {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-top: 10px;
|
||||
display: block;
|
||||
width: 80%;
|
||||
height: 70px;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
border-radius: 20px;
|
||||
color: white;
|
||||
border: 3px solid white;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.in {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
table.in .left {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
table.in .right {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: inline-block;
|
||||
background-color: white;
|
||||
color: black;
|
||||
padding: 20px;
|
||||
margin: 30px;
|
||||
margin-top: 0;
|
||||
font-size: 1.5rem;
|
||||
}
|
60
stats.php
60
stats.php
|
@ -1,8 +1,66 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
header('Location: construction.php');
|
||||
include "script/db.php";
|
||||
?>
|
||||
<main>
|
||||
<div class="box-jaune">
|
||||
<span class="corners corners-top"></span>
|
||||
<span class="corners corners-bottom"></span>
|
||||
|
||||
<div class="title">Stats de la semaine</div>
|
||||
|
||||
<span class="circles circles-top"></span>
|
||||
<span class="circles circles-bottom"></span>
|
||||
</div>
|
||||
<section>
|
||||
<strong>Les stats de la semaine.</strong>
|
||||
<br><br>
|
||||
Remporte le plus de points possible pour faire gagner ton équipe, mais attention à ne pas lui en faire
|
||||
perdre !
|
||||
<br><br>
|
||||
|
||||
</section>
|
||||
|
||||
<table class="out">
|
||||
<td>
|
||||
<div class="title">PKpeach</div>
|
||||
<?php
|
||||
$req = $db->query('SELECT texte, points FROM scores WHERE team = 0 ORDER BY id DESC');
|
||||
while($r = $req->fetch()) {
|
||||
?>
|
||||
<span class="box-point">
|
||||
<table class="in">
|
||||
<td class="left"><?= $r['texte'] ?></td>
|
||||
<td class="right"><?= $r['points'] ?></td>
|
||||
</table>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="title">Boomario</div>
|
||||
<?php
|
||||
$req = $db->query('SELECT texte, points FROM scores WHERE team = 1 ORDER BY id DESC');
|
||||
while($r = $req->fetch()) {
|
||||
?>
|
||||
<span class="box-point">
|
||||
<table class="in">
|
||||
<td class="left"><?= $r['texte'] ?></td>
|
||||
<td class="right"><?= $r['points'] ?></td>
|
||||
</table>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</table>
|
||||
|
||||
|
||||
</main>
|
||||
<?php
|
||||
$infopage = ["", "Statistiques", ob_get_clean(), "", "stats"]; //relativepath, pagetitle, pagecontent, pagescript | cf structure/template.php ligne 2 à 6
|
||||
include("structure/template.php");
|
||||
|
|
Loading…
Reference in a new issue