summaryrefslogtreecommitdiff
path: root/appli_3_alpha_old/app/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'appli_3_alpha_old/app/index.php')
-rw-r--r--appli_3_alpha_old/app/index.php38
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>