From 35a23f6145bb772b9bfa8c8eeb500aa8c02437d3 Mon Sep 17 00:00:00 2001
From: Ludovic Pouzenc <ludovic@pouzenc.fr>
Date: Thu, 5 Jul 2018 00:28:24 +0200
Subject: Version awor_1.0_20070316.tar.bz2

---
 final/app/index.php | 55 ++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 46 insertions(+), 9 deletions(-)

(limited to 'final/app/index.php')

diff --git a/final/app/index.php b/final/app/index.php
index abdfca1..c01142b 100644
--- a/final/app/index.php
+++ b/final/app/index.php
@@ -50,6 +50,7 @@ generate_html_div_help();
 		{
 			require_once('fonctions.inc.php');
 			$errmsg=mysql_generate_errmsg();
+			echo " DEBUG : $errmsg\n";
 		}
 		else
 		{
@@ -81,8 +82,6 @@ generate_html_div_help();
 						echo "			<td class='$etat'>Annul&eacute;e</td>\n";
 					break;
 				}
-
-
 				echo '			<td>';
 				generate_html_reunion_detail_button($idR);
 				echo "</td>\n";
@@ -92,20 +91,58 @@ generate_html_div_help();
 	}
 
 
-	// R&eacute;unions fix&eacute;es et pass&eacute;es
-	
+	// R�union en pr�paration � moi, pas annul�e
+	$query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, NULL, R.estAnnulee'
+		. ' FROM AWOR_Liste L,AWOR_Reunion R,AWOR_Appartenir A,AWOR_Personne P' // Creneau C,
+		. " WHERE ((A.idP = $idP AND A.idL = L.idL) OR R.idP_Orga = $idP) AND P.idP = '$idP'"
+		. ' AND R.estAnnulee=\'non\' AND  R.idL = L.idL AND P.idP = R.idP_Orga AND ISNULL(R.idC_Fixe)'
+		. ' ORDER BY R.idR ASC;';
+	fill_array_liste_reunion($query);
+	//~ echo $query . "\n";
+
+	// R�unions fix�es, � moi, pas annul�e
 	$query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, UNIX_TIMESTAMP(C.dateHeure), R.estAnnulee'
 		. ' FROM AWOR_Liste L,AWOR_Reunion R,AWOR_Appartenir A,AWOR_Creneau C,AWOR_Personne P'
-		. " WHERE ((A.idP = $idP AND A.idL = L.idL) OR R.idP_Orga = $idP)"
-		. ' AND  R.idL = L.idL AND P.idP = R.idP_Orga AND R.idC_Fixe = C.idC'
+		. " WHERE ((A.idP = '$idP' AND A.idL = L.idL) OR R.idP_Orga = '$idP')  AND P.idP = '$idP'"
+		. ' AND R.estAnnulee=\'non\' AND  R.idL = L.idL AND P.idP = R.idP_Orga AND R.idC_Fixe = C.idC'
 		. ' ORDER BY C.dateHeure DESC;';
 	fill_array_liste_reunion($query);
+	
+	// R�union en annul�e � moi
+	$query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, NULL, R.estAnnulee'
+		. ' FROM AWOR_Liste L,AWOR_Reunion R,AWOR_Appartenir A,AWOR_Personne P' // Creneau C,
+		. " WHERE ((A.idP = $idP AND A.idL = L.idL) OR R.idP_Orga = $idP) AND P.idP = '$idP'"
+		. ' AND R.estAnnulee=\'oui\' AND  R.idL = L.idL AND P.idP = R.idP_Orga AND ISNULL(R.idC_Fixe)'
+		. ' ORDER BY R.idR ASC;';
+	fill_array_liste_reunion($query);
+
+	echo "<tr class=\"empty\"><td></td><td></td><td></td><td></td><td></td></tr>\n";
 
-	// R&eacute;union en pr&eacute;paration
+	// R�union en pr�paration pas � moi, pas annul�e
+	$query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, NULL, R.estAnnulee'
+		. ' FROM AWOR_Liste L,AWOR_Reunion R,AWOR_Appartenir A,AWOR_Personne P' // Creneau C,
+		. " WHERE ((A.idP = $idP AND A.idL = L.idL) OR R.idP_Orga = $idP) AND P.idP <> '$idP'"
+		. ' AND R.estAnnulee=\'non\' AND  R.idL = L.idL AND P.idP = R.idP_Orga AND ISNULL(R.idC_Fixe)'
+		. ' ORDER BY R.idR ASC;';
+	//~ echo $query . "\n";	
+	fill_array_liste_reunion($query);
+		
+	// R�unions fix�es, pas � moi, pas annul�e
+	$query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, UNIX_TIMESTAMP(C.dateHeure), R.estAnnulee'
+		. ' FROM AWOR_Liste L,AWOR_Reunion R,AWOR_Appartenir A,AWOR_Creneau C,AWOR_Personne P'
+		. " WHERE ((A.idP = '$idP' AND A.idL = L.idL) OR R.idP_Orga = '$idP')  AND P.idP <> '$idP'"
+		. ' AND R.estAnnulee=\'non\' AND  R.idL = L.idL AND P.idP = R.idP_Orga AND R.idC_Fixe = C.idC'
+		. ' ORDER BY C.dateHeure DESC;';
+	fill_array_liste_reunion($query);
+		
+	// R�union en annul�e pas � moi
 	$query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, NULL, R.estAnnulee'
 		. ' FROM AWOR_Liste L,AWOR_Reunion R,AWOR_Appartenir A,AWOR_Personne P' // Creneau C,
-		. " WHERE ((A.idP = $idP AND A.idL = L.idL) OR R.idP_Orga = $idP)"
-		. ' AND  R.idL = L.idL AND P.idP = R.idP_Orga AND ISNULL(R.idC_Fixe);';
+		. " WHERE ((A.idP = $idP AND A.idL = L.idL) OR R.idP_Orga = $idP) AND P.idP <> '$idP'"
+		. ' AND R.estAnnulee=\'oui\' AND  R.idL = L.idL AND P.idP = R.idP_Orga AND ISNULL(R.idC_Fixe)'
+		. ' ORDER BY R.idR ASC;';
+		
+		
 	//echo "DEBUG : $query\n";
 	fill_array_liste_reunion($query);
 	
-- 
cgit v1.2.3