summaryrefslogtreecommitdiff
path: root/appli_3_alpha_old/index.php
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-06-30 10:05:02 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-06-30 10:05:02 +0200
commit71b503f07007346eda3d1da71d4a64f31f13d846 (patch)
tree3d1aaa880857eb05e7e9c1f2d75f309507dd9c07 /appli_3_alpha_old/index.php
parent756f0fa75c7d8e18188dffdfbdd4416651dca9fe (diff)
download2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.tar.gz
2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.tar.bz2
2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.zip
Prmère version alpha 2007-02-03+09:07:04 - 2007-02-06+12:19:50
Diffstat (limited to 'appli_3_alpha_old/index.php')
-rw-r--r--appli_3_alpha_old/index.php111
1 files changed, 111 insertions, 0 deletions
diff --git a/appli_3_alpha_old/index.php b/appli_3_alpha_old/index.php
new file mode 100644
index 0000000..7decdd6
--- /dev/null
+++ b/appli_3_alpha_old/index.php
@@ -0,0 +1,111 @@
+<?php
+require('include/ludo/session_verify.inc.php');
+require_once('include/ludo/html_elements.inc.php');
+generate_html_doctype_and_head("Modèle");
+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['idP'];
+ if ( isset( $_SESSION['prenomP'] ) && isset( $_SESSION['prenomP'] ) )
+ { $nom=$_SESSION['prenomP'] . ' ' . $_SESSION['nomP']; }
+ else { $nom = $_SESSION['loginP']; }
+
+ echo "Bonjour $nom, nous sommes le " . date('d/m/Y') . ' et il est ' . date('H:i');
+?>
+ <br/><br/>
+ <a href="organiser.php">Organiser une r&eacute;union</a>
+ <br/><br/>
+ <table class="listeReunions" summary="Liste des réunions vous concernant">
+ <tr>
+ <th>Objet</th>
+ <th>Organisateur</th>
+ <th>Date</th>
+ <th>Etat</th>
+ <th>D&eacute;tails</th>
+ </tr>
+<?php
+ // Connexion à la base et sé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 écrit ligne à ligne les personnes et les disponibilités
+ while ( list($idR, $objetR, $nomP, $prenomP, $dateR) = mysql_fetch_array($result) )
+ {
+ // Boucle sur chaque personne
+ echo " <tr>\n";
+ echo ' <td><a href="details_reunion.php?idR=' . $idR . '">' . "$objetR</td>\n";
+ echo " <td>$prenomP $nomP</td>\n";
+ $dateStr='';
+ $stateStr='En préparation';
+ if ( isset($dateR) )
+ {
+ $dateStr=date('d/m/Y \à H:i', $dateR);
+ if ( $dateR > time() )
+ {
+ $stateStr='Fixée';
+ }
+ else
+ {
+ $stateStr='Pasée';
+ }
+ }
+ echo " <td>$dateStr</td>\n";
+ echo " <td>$stateStr</td>\n";
+ echo ' <td>';
+ generate_html_reunion_detail_button($idR);
+ echo "</td>\n";
+ echo " </tr>\n";
+ }
+ }
+ }
+
+
+ // Réunions fixées et passées
+ $query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, UNIX_TIMESTAMP(C.dateHeure)'
+ . ' 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'
+ . ' ORDER BY C.dateHeure DESC;';
+ fill_array_liste_reunion($query);
+
+ // Réunion en préparation
+ $query = 'SELECT DISTINCT R.idR, R.objetR, P.nomP, P.prenomP, NULL'
+ . ' 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);';
+ //echo "DEBUG : $query\n";
+ fill_array_liste_reunion($query);
+
+ //$query =
+ //echo "DEBUG : $query\n";
+?>
+ </table>
+ <br/>
+ <a href="organiser.php">Organiser une r&eacute;union</a>
+ </div>
+<?php
+ if ( isset ($errmsg) ) { generate_html_div_errmsg($errmsg); }
+?>
+</body>
+</html>
+