summaryrefslogtreecommitdiff
path: root/final/app/index.php
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-07-05 00:25:51 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-07-05 00:25:51 +0200
commitac54f5224d4470de9d8ae088e1338dea52668c9d (patch)
tree7f77b2a8176343e6632fbd99ff431c21974ef482 /final/app/index.php
parent9738017972a6d4fea655926525b3c67dd85740cf (diff)
download2007-AWOR-ac54f5224d4470de9d8ae088e1338dea52668c9d.tar.gz
2007-AWOR-ac54f5224d4470de9d8ae088e1338dea52668c9d.tar.bz2
2007-AWOR-ac54f5224d4470de9d8ae088e1338dea52668c9d.zip
Renommage beta_accents -> final pour diffs
Diffstat (limited to 'final/app/index.php')
-rw-r--r--final/app/index.php126
1 files changed, 126 insertions, 0 deletions
diff --git a/final/app/index.php b/final/app/index.php
new file mode 100644
index 0000000..abdfca1
--- /dev/null
+++ b/final/app/index.php
@@ -0,0 +1,126 @@
+<?php
+require('include/ludo/session_verify.inc.php');
+require_once('include/ludo/html_elements.inc.php');
+generate_html_doctype_and_head("R&eacute;unions");
+echo "<body>\n";
+generate_html_divs_menu();
+?>
+ <div id="sous_menu">
+ <p class="arbre">
+ &gt; <a href="index.php">Accueil</a>
+ &gt; <a href="index.php">R&eacute;unions</a>
+ &gt; Liste des r&eacute;unions
+ </p>
+ </div>
+<?php
+generate_html_div_help();
+?>
+ <div id="contenu">
+<?php
+ $idP= $_SESSION['session_idP'];
+ if ( isset( $_SESSION['session_prenomP'] ) && isset( $_SESSION['session_prenomP'] ) )
+ { $nom=$_SESSION['session_prenomP'] . ' ' . $_SESSION['session_nomP']; }
+ else { $nom = $_SESSION['loginP']; }
+
+ echo "Bonjour $nom, nous sommes le " . date('d/m/Y') . ' et il est ' . date('H:i');
+ //~ echo "<pre>DEBUG : SESSION :\n";
+ //~ print_r($_SESSION);
+ //~ echo "\nDEBUG : REQUEST :\n";
+ //~ print_r($_REQUEST);
+ //~ echo "</pre>";
+?>
+ <br/><br/>
+ <a href="details_reunion.php?action=creer_reunion">Organiser une r&eacute;union</a>
+ <br/><br/>
+ <table class="listeReunions" summary="Liste des r&eacute;unions vous concernant">
+ <tr>
+ <th>Objet</th>
+ <th>Organisateur</th>
+ <th>Date</th>
+ <th>Etat</th>
+ <th>D&eacute;tails</th>
+ </tr>
+<?php
+ // Connexion &agrave; la base et s&eacute;lection de la database
+ require_once 'include/connect.inc.php';
+
+ function fill_array_liste_reunion($query)
+ {
+ if ( ! $result = @mysql_query($query) )
+ {
+ require_once('fonctions.inc.php');
+ $errmsg=mysql_generate_errmsg();
+ }
+ else
+ {
+ // On &eacute;crit ligne &agrave; ligne les personnes et les disponibilit&eacute;s
+ while ( list($idR, $objetR, $nomP, $prenomP, $idC_Fixe, $estAnnulee) = mysql_fetch_array($result) )
+ {
+ $objetR=htmlentities($objetR, ENT_QUOTES);
+ $nomP=htmlentities($nomP, ENT_QUOTES);
+ $prenomP=htmlentities($prenomP, ENT_QUOTES);
+ // 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='';
+ switch($etat)
+ {
+ case 'reunion_fixee':
+ echo ' <td>' . date('d/m/Y - H:i', $idC_Fixe) . "</td>\n";
+ echo " <td class='$etat'>Fix&eacute;e</td>\n";
+ break;
+ case 'reunion_en_cours':
+ echo " <td></td>\n";
+ echo " <td class='$etat'>En pr&eacute;paration</td>\n";
+ break;
+ case 'reunion_annulee':
+ echo " <td></td>\n";
+ echo " <td class='$etat'>Annul&eacute;e</td>\n";
+ break;
+ }
+
+
+ echo ' <td>';
+ generate_html_reunion_detail_button($idR);
+ echo "</td>\n";
+ echo " </tr>\n";
+ }
+ }
+ }
+
+
+ // R&eacute;unions fix&eacute;es et pass&eacute;es
+
+ $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'
+ . ' ORDER BY C.dateHeure DESC;';
+ fill_array_liste_reunion($query);
+
+ // R&eacute;union en pr&eacute;paration
+ $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);';
+ //echo "DEBUG : $query\n";
+ fill_array_liste_reunion($query);
+
+ //$query =
+ //echo "DEBUG : $query\n";
+?>
+ </table>
+ <br/>
+ <a href="details_reunion.php?action=creer_reunion">Organiser une r&eacute;union</a>
+ </div>
+<?php
+ if ( isset ($errmsg) ) { generate_html_div_errmsg($errmsg); }
+ generate_html_div_footer();
+?>
+<div id="msg"></div>
+</body>
+</html>
+