From 3fc908d3a1d0f6c9b1fca690561098541a73266e Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sat, 30 Jun 2018 11:13:09 +0200 Subject: Version alpha_old5 2007-02-22+15:00:00 - 2007-03-11+16:30:15 --- appli_3_alpha_old/app/index.php | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'appli_3_alpha_old/app/index.php') diff --git a/appli_3_alpha_old/app/index.php b/appli_3_alpha_old/app/index.php index 8356264..9ffe140 100644 --- a/appli_3_alpha_old/app/index.php +++ b/appli_3_alpha_old/app/index.php @@ -54,28 +54,32 @@ generate_html_div_help(); else { // On écrit ligne à ligne les personnes et les disponibilités - while ( list($idR, $objetR, $nomP, $prenomP, $dateR) = mysql_fetch_array($result) ) + while ( list($idR, $objetR, $nomP, $prenomP, $idC_Fixe, $estAnnulee) = mysql_fetch_array($result) ) { // Boucle sur chaque personne echo " \n"; echo ' ' . "$objetR\n"; echo " $prenomP $nomP\n"; + if ( $estAnnulee=='oui' ) { $etat = 'reunion_annulee'; } elseif ( $idC_Fixe!=null) { $etat ='reunion_fixee'; } else { $etat = 'reunion_en_cours'; } + $dateStr=''; - $stateStr='En préparation'; - if ( isset($dateR) ) + switch($etat) { - $dateStr=date('d/m/Y \à H:i', $dateR); - if ( $dateR > time() ) - { - $stateStr='Fixée'; - } - else - { - $stateStr='Passée'; - } + case 'reunion_fixee': + echo ' ' . date('d/m/Y \à H:i', $idC_Fixe) . "\n"; + echo " Fixée\n"; + break; + case 'reunion_en_cours': + echo " \n"; + echo " En préparation\n"; + break; + case 'reunion_annulee': + echo " \n"; + echo " Annulée\n"; + break; } - echo " $dateStr\n"; - echo " $stateStr\n"; + + echo ' '; generate_html_reunion_detail_button($idR); echo "\n"; @@ -86,7 +90,8 @@ generate_html_div_help(); // Réunions fixées et passées - $query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, UNIX_TIMESTAMP(C.dateHeure)' + + $query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, UNIX_TIMESTAMP(C.dateHeure), R.estAnnulee' . ' FROM Liste L,Reunion R,Appartenir A,Creneau C,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' @@ -94,7 +99,7 @@ generate_html_div_help(); fill_array_liste_reunion($query); // Réunion en préparation - $query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, NULL' + $query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, NULL, R.estAnnulee' . ' FROM Liste L,Reunion R,Appartenir A,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);'; @@ -111,6 +116,7 @@ generate_html_div_help(); +
-- cgit v1.2.3