Removed php errors

This commit is contained in:
Arthur 2019-02-21 18:38:49 +01:00
parent 9bbbb5b629
commit 248b9b4a94
6 changed files with 30 additions and 25 deletions

View file

@ -4,6 +4,9 @@ ob_start(); // Start reading html
<h1>Les Coms</h1> <h1>Les Coms</h1>
<p>La liste de toutes les coms de ta semaine d'accueil, avec les contacts des responsables.</p> <p>La liste de toutes les coms de ta semaine d'accueil, avec les contacts des responsables.</p>
<?php <?php
$comId = "";
$comRespo2Id = "";
$comRespo2 = "";
$comTitle = "COM Mise à Feu"; $comTitle = "COM Mise à Feu";
$comDescription = "Ici pour mettre l'ambiance toute la semaine!"; $comDescription = "Ici pour mettre l'ambiance toute la semaine!";
$comRespo = "Paul MERLE"; $comRespo = "Paul MERLE";

View file

@ -2,11 +2,11 @@
require_once 'classes/dao.php'; require_once 'classes/dao.php';
function get_total_points($team) function get_total_points($team)
{ {
//$dao = new Dao(''); // $dao = new Dao('');
$points = 0; $points = 0;
//foreach ($dao->get_score_team($team) as $row) { // foreach ($dao->get_score_team($team) as $row) {
// $points += $row['points']; // $points += $row['points'];
//} // }
return $points; return $points;
} }

View file

@ -287,7 +287,7 @@ ob_start(); // Start reading html
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/photos.css"> <link rel="stylesheet" type="text/css" media="screen" href="assets/css/photos.css">
<script type="text/javascript" src="assets/scripts/jquery.mousewheel.min.js"></script> <script type="text/javascript" src="assets/scripts/jquery.mousewheel.min.js"></script>
<?php <?php
$pageMeta = ob_get_clean(); // Store html content in variable // $pageMeta = ob_get_clean(); // Store html content in variable
include("template.php"); // Display template with variable content include("template.php"); // Display template with variable content
?> ?>

View file

@ -106,6 +106,7 @@ ob_start(); // Start reading html
?> ?>
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/planning_events.css"> <link rel="stylesheet" type="text/css" media="screen" href="assets/css/planning_events.css">
<?php <?php
$pageMeta = ob_get_clean(); // Store html content in variable
include("template.php"); // Display template with variable content include("template.php"); // Display template with variable content
//$pageMeta = ob_get_clean(); // Store html content in variable
?> ?>

View file

@ -6,21 +6,21 @@ ob_start(); // Start reading html
function get_stats($team) function get_stats($team)
{ {
$dao = new Dao(''); // $dao = new Dao('');
foreach ($dao->get_score_team($team) as $row) { // foreach ($dao->get_score_team($team) as $row) {
$text = $row['text']; // $text = $row['text'];
$points = $row['points']; // $points = $row['points'];
if ($points > 0) // if ($points > 0)
$id = "positive"; // $id = "positive";
else // else
$id = "negative"; // $id = "negative";
?> // ?>
<tr id="<?= $id ?>"> <!-- <tr id="--><?//= $id ?><!--">-->
<td><?= htmlspecialchars($text) ?></td> <!-- <td>--><?//= htmlspecialchars($text) ?><!--</td>-->
<td><?= $points ?></td> <!-- <td>--><?//= $points ?><!--</td>-->
</tr> <!-- </tr>-->
<?php <!-- --><?php
} // }
} }
?> ?>

View file

@ -2,16 +2,17 @@
require_once 'classes/dao.php'; require_once 'classes/dao.php';
function get_total_points($team) function get_total_points($team)
{ {
$dao = new Dao(''); // $dao = new Dao('');
$points = 0; $points = 0;
foreach ($dao->get_score_team($team) as $row) { // foreach ($dao->get_score_team($team) as $row) {
$points += $row['points']; // $points += $row['points'];
} // }
return $points; return $points;
} }
$scoreUSA = get_total_points('usa'); $scoreUSA = get_total_points('usa');
$scoreURSS = get_total_points('urss'); $scoreURSS = get_total_points('urss');
$pageMeta = "";
?> ?>
<!DOCTYPE html> <!DOCTYPE html>