diff --git a/index.php b/index.php index d8c4893fa1634b4d88f6459cffb2d04d8f6a6061..dea66e73de0760930afa055d616acfe97fd25f9c 100644 --- a/index.php +++ b/index.php @@ -15,7 +15,7 @@ $app->get( $sam = $samPics[array_rand($samPics)]; - $events = $bdd->prepare('SELECT s.id, title, date, place, description, GROUP_CONCAT(nick SEPARATOR ", ") as nicks + $events = $bdd->prepare('SELECT s.id, title, date, place, description, link, GROUP_CONCAT(nick SEPARATOR ", ") as nicks FROM sam s LEFT OUTER JOIN sam_users su ON s.id = su.event WHERE date > '.time().' @@ -44,6 +44,7 @@ $app->get( <th>Titre</th> <th>Description</th> <th>Salle</th> + <th>Site web</th> <th>Participants</th> </tr> </thead> @@ -57,10 +58,16 @@ EOF; <tr> <td>$event[0]</td> <td>$date</td> - <td>$event[1]</td> +EOF; + if ($event[5]) + echo '<td><a href="'.$event[5].'">'.$event[1].'</a></td>'; + else + echo '<td>'.$event[1].'</td>'; + + echo <<<EOF <td>$description</td> <td>$event[3]</td> - <td>$event[5]</td> + <td>$event[6]</td> </tr> EOF; }