From 679551b7b545a72d376d9e60a8f3da66e44a6855 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sat, 30 Jun 2018 10:06:47 +0200 Subject: Version alpha_old2 2007-02-04+10:57:50 - 2007-02-21+19:05:18 --- appli_3_alpha_old/include/je.inc.php | 107 ++++++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 34 deletions(-) (limited to 'appli_3_alpha_old/include/je.inc.php') diff --git a/appli_3_alpha_old/include/je.inc.php b/appli_3_alpha_old/include/je.inc.php index cb80df0..b5a7672 100644 --- a/appli_3_alpha_old/include/je.inc.php +++ b/appli_3_alpha_old/include/je.inc.php @@ -1,7 +1,9 @@ =0) { @@ -16,65 +18,102 @@ $tabOldPers[$i] = $row[0]; $tabOldPersMail[$i] = $row[1]; } - //Boucle permettant de suprimer les élements identiques aux deux tableaux + //Boucle permettant de mettre a NULL les élements identiques aux deux tableaux $i = 0; while ($i < count($tabOldPers)) { $exist=false; for ($j=0;$j" . $tabNewPers[$j] . "OU " . $tabOldPersMail[$i] . "==" . $tabNewPers[$j] . "->" ; - echo "" . (($tabOldPers[$i] == $tabNewPers[$j]) or ($tabOldPersMail[$i] == $tabNewPers[$j])) . "
"; - if (($tabOldPers[$i] == $tabNewPers[$j]) or ($tabOldPersMail[$i] == $tabNewPers[$j])) { $exist = true; - print_r($tabNewPers); $tabNewPers[$j]=NULL; - echo "
"; - print_r($tabNewPers); - echo "
"; } } 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; + $tabOldPers[$i]=NULL; + $tabOldPersMail[$i]=NULL; } $i++; } - //Tableau permet de savoir qui doit etre supprimer et ajouter - echo "--TabOldPers--
"; - print_r ($tabOldPers); - //for ($i=0;$i<(int)$sizeTabOldPers;$i++) echo "
- " . $tabOldPers[$i]; - echo "
--TabNewPers--
"; - print_r ($tabNewPers); - //for ($i=0;$i<(int)$sizeTabNewPers;$i++) echo " - " . $tabNewPers[$i] ."
"; } - /* - for ($i=0;$i0) + { + $row = mysql_fetch_array($result); + return ($row['idP']); + } + else + { + $result = mysql_query("INSERT INTO Personne (courrielP,loginP) VALUES ('$persMail','$persMail')"); + return (mysql_insert_id($result)); } - */ + + return (0); } + + //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 "\n\n\n\n\n"; if (mysql_num_rows($result)>0) @@ -86,7 +125,7 @@ echo "\n\n\n\n"; -- cgit v1.2.3
TypeLibellé
"; if ($row['estPrivee'] == 'oui') echo 'Privée' ; else echo 'Public'; echo ""; - echo ""; + echo ""; echo $row['libelleL']; echo "\n"; echo "