diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-06-30 11:13:09 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-06-30 11:13:09 +0200 |
commit | 3fc908d3a1d0f6c9b1fca690561098541a73266e (patch) | |
tree | c1f2dd9663a2cba43abd6b59b2612ad214a92c79 /appli_3_alpha_old/app/index.php | |
parent | 1269889704386de951d7f91eb169eb1e1bb36cc0 (diff) | |
download | 2007-AWOR-3fc908d3a1d0f6c9b1fca690561098541a73266e.tar.gz 2007-AWOR-3fc908d3a1d0f6c9b1fca690561098541a73266e.tar.bz2 2007-AWOR-3fc908d3a1d0f6c9b1fca690561098541a73266e.zip |
Version alpha_old5 2007-02-22+15:00:00 - 2007-03-11+16:30:15
Diffstat (limited to 'appli_3_alpha_old/app/index.php')
-rw-r--r-- | appli_3_alpha_old/app/index.php | 38 |
1 files changed, 22 insertions, 16 deletions
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 " <tr>\n"; echo ' <td><a href="details_reunion.php?idR=' . $idR . '">' . "$objetR</a></td>\n"; echo " <td>$prenomP $nomP</td>\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 ' <td>' . date('d/m/Y \à H:i', $idC_Fixe) . "</td>\n"; + echo " <td class='$etat'>Fixée</td>\n"; + break; + case 'reunion_en_cours': + echo " <td></td>\n"; + echo " <td class='$etat'>En préparation</td>\n"; + break; + case 'reunion_annulee': + echo " <td></td>\n"; + echo " <td class='$etat'>Annulée</td>\n"; + break; } - echo " <td>$dateStr</td>\n"; - echo " <td>$stateStr</td>\n"; + + echo ' <td>'; generate_html_reunion_detail_button($idR); echo "</td>\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(); <?php if ( isset ($errmsg) ) { generate_html_div_errmsg($errmsg); } ?> +<div id="msg"></div> </body> </html> |