summaryrefslogtreecommitdiff
path: root/appli_3_alpha_old/include/je.inc.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/include/je.inc.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/include/je.inc.php')
-rw-r--r--appli_3_alpha_old/include/je.inc.php99
1 files changed, 99 insertions, 0 deletions
diff --git a/appli_3_alpha_old/include/je.inc.php b/appli_3_alpha_old/include/je.inc.php
new file mode 100644
index 0000000..cb80df0
--- /dev/null
+++ b/appli_3_alpha_old/include/je.inc.php
@@ -0,0 +1,99 @@
+<?php
+ function traiter_formulaire_valider_modif_personnes()
+ {
+ require_once ('include/connect.inc.php');
+ $result = mysql_query("SELECT P.idP,P.courrielP FROM Appartenir A, Personne P WHERE P.idP = A.idP AND A.idL=".$_GET['idL']);
+ if (mysql_num_rows($result)>=0)
+ {
+ //Fabrication des trois tableaux
+ $tabOldPers = array();
+ $tabOldPersMail = array();
+ $tabNewPers = array();
+ if (isset( $_GET['dataParticipants'] ) ) $tabNewPers = $_GET['dataParticipants'];
+ for($i=0;$i<mysql_num_rows($result);$i++)
+ {
+ $row = mysql_fetch_array($result);
+ $tabOldPers[$i] = $row[0];
+ $tabOldPersMail[$i] = $row[1];
+ }
+ //Boucle permettant de suprimer les élements identiques aux deux tableaux
+ $i = 0;
+ while ($i < count($tabOldPers))
+ {
+ $exist=false;
+ for ($j=0;$j<count($tabNewPers);$j++)
+ {
+ echo $tabOldPers[$i] . "==<b>" . $tabNewPers[$j] . "</b>OU " . $tabOldPersMail[$i] . "==<b>" . $tabNewPers[$j] . "</b>->" ;
+ echo "<i>" . (($tabOldPers[$i] == $tabNewPers[$j]) or ($tabOldPersMail[$i] == $tabNewPers[$j])) . "</i><br/>";
+
+ if (($tabOldPers[$i] == $tabNewPers[$j]) or ($tabOldPersMail[$i] == $tabNewPers[$j]))
+ {
+ $exist = true;
+ print_r($tabNewPers);
+ $tabNewPers[$j]=NULL;
+ echo "<br/>";
+ print_r($tabNewPers);
+ echo "<br/>";
+ }
+ }
+ if ($exist)
+ {
+ /*
+ $tabOldPers[$i] = $tabOldPers[(count($tabOldPers)-1)];unset($tabOldPers[(count($tabOldPers)-1)]);
+ $tabOldPersMail[$i] = $tabOldPersMail[(count($tabOldPersMail)-1)];unset($tabOldPersMail[(count($tabOldPersMail)-1)]);
+ }
+ else
+ {i++;}
+ */
+ $tabOldPers[$i]=NULL;
+ $tabOldPersMail[$i]=NULL;
+ }
+ $i++;
+ }
+ //Tableau permet de savoir qui doit etre supprimer et ajouter
+ echo "--TabOldPers--<br/>";
+ print_r ($tabOldPers);
+ //for ($i=0;$i<(int)$sizeTabOldPers;$i++) echo "<br/> - " . $tabOldPers[$i];
+ echo "<br/>--TabNewPers--<br/>";
+ print_r ($tabNewPers);
+ //for ($i=0;$i<(int)$sizeTabNewPers;$i++) echo " - " . $tabNewPers[$i] ."<br/>";
+ }
+ /*
+ for ($i=0;$i<count($_GET['dataParticipants']); $i++)
+ {
+ if (!stristr($_GET['dataParticipants'][$i],'@')===false)
+ {
+ echo "Nouvel inscrit : ".$_GET['dataParticipants'][$i];
+ }
+ }
+ */
+ }
+
+ //Fonction qui affiche toutes les liste public ainsi que les liste privée possédées par idP
+ function generate_html_array_list ($idP)
+ {
+
+ // Connexion à la base et sélection de la database
+ require_once ('include/connect.inc.php');
+ $result = mysql_query("SELECT idL,libelleL,estPrivee FROM Liste WHERE idP_Createur=$idP OR estPrivee='non' ORDER BY estPrivee");
+ echo "<table>\n<tr>\n<th>Type</th>\n<th>Libell&eacute;</th>\n</tr>\n";
+ if (mysql_num_rows($result)>0)
+ {
+
+ for($i=0;$i<mysql_num_rows($result);$i++)
+ {
+ $row = mysql_fetch_array($result);
+ echo "<tr>\n<td>";
+ if ($row['estPrivee'] == 'oui') echo 'Priv&eacute;e' ; else echo 'Public';
+ echo "</td>\n<td>";
+ echo "<a href=\"#\" onclick=\"loadid('poppersonne.php?idL=".$row['idL']."&amp;idP_orga=$idP','poppersonne',true);popon('poppersonne')\" \>";
+ echo $row['libelleL'];
+ echo "</a>\n";
+ echo "</td>\n</tr>\n";
+ }
+
+ }
+ echo "</table>\n";
+
+ }
+?> \ No newline at end of file