site-accueil-insa/includes/score_functions.php
2019-05-18 17:58:23 +02:00

16 lines
No EOL
416 B
PHP

<?php
function get_total_points($team, $path)
{
$dao = new Dao($path);
$points = 0;
foreach ($dao->get_score_team($team) as $row) {
$points += $row['points'];
}
return $points;
}
$scoreGli = get_total_points('gli', $relativePath);
$scorePek = get_total_points('pek', $relativePath);
$scoreBoo = get_total_points('boo', $relativePath);
$scoreVer = get_total_points('ver', $relativePath);