46 lines
1.4 KiB
PHP
46 lines
1.4 KiB
PHP
<?php include('header.php'); ?>
|
|
<div id="consult">
|
|
<table style="width: 100%" cellspacing="0">
|
|
<tr>
|
|
<td><strong>Projet</strong></td>
|
|
<td><strong>Nom et Prénom</strong></td>
|
|
<td><strong>Ce que tu as fait</strong></td>
|
|
<td><strong>Ce que tu va faire</strong></td>
|
|
<td><strong>Date du rapport</strong></td>
|
|
</tr>
|
|
<?php
|
|
$fichier = fopen('config.txt','r');
|
|
fgets($fichier);
|
|
$week = fgets($fichier);
|
|
|
|
if (isset($_GET['page'])) {
|
|
$page = $_GET['page'];
|
|
} else {
|
|
$page = $week;
|
|
}
|
|
|
|
$sql = $bdd->prepare('SELECT g.nom AS group_name, u.prenom, u.nom, r.fait, r.afaire, r.date FROM reports AS r JOIN groups AS g JOIN users AS u WHERE r.group_id = g.id AND r.user_id = u.id AND week = :page');
|
|
$sql->execute(array('page' => $page));
|
|
|
|
while ($result = $sql->fetch()) {
|
|
echo '<tr>
|
|
<td>'. $result['group_name'] .'</td>
|
|
<td>'. $result['prenom'] .' '. $result['nom'] .'</td>
|
|
<td>'. stripslashes($result['fait']) .'</td>
|
|
<td>'. stripslashes($result['afaire']) .'</td>
|
|
<td>'. $result['date'] .'</td>
|
|
</tr>';
|
|
}
|
|
?>
|
|
</table>
|
|
|
|
<form method="get" action="consulter.php">
|
|
<div><br/>
|
|
<input name="page" type="hidden" value="<?php echo --$page; ?>" />
|
|
<input type="submit" value="Rapport Précédent" />
|
|
<input name="acceuil" type="button" value="Retour à l'accueil" onclick="window.location.href='report.php'" />
|
|
</div>
|
|
</form>
|
|
|
|
<?php include('footer.php'); ?>
|