From 679551b7b545a72d376d9e60a8f3da66e44a6855 Mon Sep 17 00:00:00 2001
From: Ludovic Pouzenc <ludovic@pouzenc.fr>
Date: Sat, 30 Jun 2018 10:06:47 +0200
Subject: Version alpha_old2 2007-02-04+10:57:50 - 2007-02-21+19:05:18

---
 appli_3_alpha_old/include/ju.inc.php | 123 ++++++++++++++++++++++-------------
 1 file changed, 78 insertions(+), 45 deletions(-)

(limited to 'appli_3_alpha_old/include/ju.inc.php')

diff --git a/appli_3_alpha_old/include/ju.inc.php b/appli_3_alpha_old/include/ju.inc.php
index 1a03ca9..7f52bea 100644
--- a/appli_3_alpha_old/include/ju.inc.php
+++ b/appli_3_alpha_old/include/ju.inc.php
@@ -1,53 +1,87 @@
 <?php
-	function traiter_formulaire_cequetuveux_aussi()
-	{
-		echo "coucou\n";
-	}
+function traiter_formulaire_cequetuveux_aussi()
+{
+	echo "coucou\n";
+}
 	
-	function generate_html_reunion_commentaires($idR)
+function generate_html_reunion_commentaires($idR)
+{
+	$requete = "SELECT * FROM Repondre WHERE idP != '".$_SESSION['idP']."' AND idR = '".$idR."'";
+	$resultat = mysql_query($requete);
+	if($resultat != false)
 	{
-?>
-	<table cellspacing="0" class="commentaires">
-		<thead>
-			<tr>
-				<th>Commentaires <a href="#">(Editer votre commentaire)</a></th>
-			</tr>
-		</thead>
-		<tr>
-			<td>Ludo : J'ai mont&eacute; le DC sur lequel sera bas&eacute; le SNI</td>
-		</tr>
-		<tr>
-			<td>J&eacute;r&eacute;mie : J'ai fais une premi&egrave;re ebauche du DC</td>
-		</tr>
-	</table>
-<?php
+		if(mysql_num_rows($resultat) > 0)
+		{
+			echo '<table cellspacing="0" class="commentaires">';
+			echo '<thead>';
+			echo '<tr>';
+			echo '<th>Commentaires <a href="#">(Editer votre commentaire)</a></th>';
+			echo '</tr>';
+			echo '</thead>';
+			while($commentaire = mysql_fetch_array($resultat));
+			{
+				if(isset($_SESSION["PrenomP"]))
+				{
+					$nom = $_SESSION["PrenomP"];
+				}
+				else
+				{
+					$nom = $commentaire["idP"];
+				}
+				echo "<tr><td>".$nom." : ".$commentaire["commentaireReponse"]."</td></tr>\n";
+			}
+			echo '</table>';
+		}
 	}
+}
 	
-	
-	function generate_html_reunion_fichiers($idR)
+function generate_html_reunion_fichiers($idR)
+{
+	$requete = "SELECT * FROM Repondre WHERE idP != '".$_SESSION['idP']."' AND idR = '".$idR."'";
+	$resultat = mysql_query($requete);
+	if($resultat != false)
 	{
-?>
-<table cellspacing="0" class="fichiers">
-	<thead>
-		<tr>
-			<th>Fichiers attach&eacute;s <a href="#popfichier" class="pop">(Ajouter un fichier)</a></th>
-		</tr>
-	</thead>
-	<tr>
-		<td><a href="compte-rendu.txt">compte-rendu.txt</a></td>
-	</tr>
-	<tr>
-		<td><a href="photos-ru.jpg">photos-ru.jpg</a></td>
-	</tr>
-</table>
-<?php
+		if(mysql_num_rows($resultat) > 0)
+		{
+			echo '<table cellspacing="0" class="commentaires">';
+			echo '<thead>';
+			echo '<tr>';
+			echo '<th>Commentaires <a href="#">(Editer votre commentaire)</a></th>';
+			echo '</tr>';
+			echo '</thead>';
+			while($commentaire = mysql_fetch_array($resultat))
+			{
+				if(isset($_SESSION["PrenomP"]))
+				{
+					$nom = $_SESSION["PrenomP"];
+				}
+				else
+				{
+					$nom = $commentaire["idP"];
+				}
+				echo "<tr><td>".$nom." : ".$commentaire["commentaireReponse"]."</td></tr>\n";
+			}
+			echo '</table>';
+		}
 	}
+	echo '<table cellspacing="0" class="fichiers">';
+	echo '<thead>';
+	echo '<tr>';
+	echo '<th>Fichiers attach&eacute;s <a href="#popfichier" class="pop">(Ajouter un fichier)</a></th>';
+	echo '</tr>';
+	echo '</thead>';
+	echo '<tr>';
+	echo '<td><a href="compte-rendu.txt">compte-rendu.txt</a></td>';
+	echo '</tr>';
+	echo '<tr>';
+	echo '<td><a href="photos-ru.jpg">photos-ru.jpg</a></td>';
+	echo '</tr>';
+	echo '</table>';
+}
 
-	
-	function generate_html_reunion_detail($idR)
-	{
-?>
-	<table cellspacing="0" class="detail_reunion">
+function generate_html_reunion_detail($idR)
+{
+	echo '<table cellspacing="0" class="detail_reunion">
 		<thead>
 			<tr>
 				<th>D&eacute;tails de la r&eacute;union </th>
@@ -74,7 +108,6 @@
 			<td><strong>Remarque :</strong></td>
 			<td>aucune</td>
 		</tr>
-	</table>
-<?php
-	}
+	</table>';
+}
 ?>
\ No newline at end of file
-- 
cgit v1.2.3