From e7cf0e99f41ab8ba3bab8aed516123c6f4ff3979 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Thu, 5 Jul 2018 00:34:06 +0200 Subject: Version final-03-27-12h --- final/app/auth_dialog.php | 193 ++++++++++++++++--------- final/app/css/ice.css | 18 ++- final/app/css/ice_moche.css | 162 ++++++++++++++++----- final/app/css/ice_moche_nohelp.css | 207 +++++++++++++++++---------- final/app/css/ice_nohelp.css | 21 ++- final/app/include/connect.inc.php | 4 +- final/app/include/je.inc.php | 5 +- final/app/include/ju.inc.php | 10 +- final/app/include/ludo/auth.inc.php | 31 ++-- final/app/include/ludo/config.inc.php | 10 +- final/app/include/ludo/fonctions.inc.php | 8 +- final/app/include/ludo/html_elements.inc.php | 23 +-- final/app/listes.php | 2 +- final/app/profil.php | 56 ++++++-- final/app/script.js | 14 +- 15 files changed, 529 insertions(+), 235 deletions(-) (limited to 'final/app') diff --git a/final/app/auth_dialog.php b/final/app/auth_dialog.php index caf3297..fce5948 100644 --- a/final/app/auth_dialog.php +++ b/final/app/auth_dialog.php @@ -1,4 +1,117 @@ + \ No newline at end of file diff --git a/final/app/css/ice.css b/final/app/css/ice.css index a60500d..f643bee 100644 --- a/final/app/css/ice.css +++ b/final/app/css/ice.css @@ -1,6 +1,7 @@ em {color:#F00;} img { border : none ; } img.spacing{ margin: 0 0.2em 0 0.2em;} + body { color: #000000; background-color:#F5F5DC; @@ -26,6 +27,10 @@ th , thead tr { color: #FFFFFF; background-color:#551A8B; } +tr.empty { + height:5px; + background-color:#8470FF; +} th.selected {color:#FFF;background-color:#8470FF} td { border-bottom-width: thin; @@ -326,7 +331,7 @@ div.popup_contenu em margin-top:0px; padding:0px; } -#footer li.right { +#footer li.author { display:inline; float:left; list-style:none; @@ -335,7 +340,12 @@ div.popup_contenu em padding-left:10px; margin-left:0px; } -#footer li.center { +#footer li.author li { + display:inline; + padding:0px; + margin:0px 5px; +} +#footer li.wwwc { display:inline; float:right; list-style: none; @@ -344,10 +354,10 @@ div.popup_contenu em padding-right:30px; margin-left:0px; } -#footer li.left select { +#footer li.csschooser select { border:thin solid #000; } -#footer li.left { +#footer li.csschooser { float:left; display:inline; list-style: none; diff --git a/final/app/css/ice_moche.css b/final/app/css/ice_moche.css index 0004b1a..90702a1 100644 --- a/final/app/css/ice_moche.css +++ b/final/app/css/ice_moche.css @@ -44,52 +44,50 @@ h2 { color: #5C5CFF; margin: 0px; } +li { + margin-left:-20px; +} select { width:auto; } /***** Titre *****/ #titre h2 { color: #551A8B; - height:60px; - width:200px; - margin-left:60px; + height:3em; + width:12em; padding-top:5px; -/* background-image:url(ice_img/titre.png); - background-position:left; - background-repeat:no-repeat;*/ + padding-left:1em; color:#FFFFFF; - font-size:40px; + font-size:2em; } #titre { - height:60px; - padding-top:5px; - width:100%; + height:3em; + width:12em; clear:left; background-color:#551A8B; - background-image:url(ice_img/logo.png); - background-position:left; - background-repeat:no-repeat; } /*****************/ /***** Menu *****/ #menu { - padding:0px; + padding:50px 0 50px 0; + margin:0px; - color:#551A8B; - width:15em; - background-color:#FFFFFF; + background-color:#551A8B; + width:12em; + } #menu a { text-decoration:none; display:block; font-weight:bold; text-align:center; - color:#551A8B; -} -#menu a:hover { color:#FFFFFF; background-color:#551A8B; } +#menu a:hover { + color:#551A8B; + background-color:#FFFFFF; +} /* Pour IE5/MAC \*/#menu a{float:none;}/**/ #menu li { list-style: none; @@ -112,38 +110,44 @@ select { width:auto; } /*******************/ /***** Contenu *****/ #contenu { - padding-top:10px; - padding-bottom:10px; - padding-right:3em; - padding_left:3em; + margin:20px; + padding:20px; + top:30px; + left:12em; + border:thin solid #F7F7F7; + background-color:#8470FF; position:absolute; - top:60px; - left:15em; } #help { - text-align:justify; + text-align:left; color:#000000; float:left; - margin-top:20px; - margin-left:10px; + margin:0px; padding:5px; border:thin solid #000000; background-color:#F7F7F7; + width:14em; font-size:small; - width:15em; } -#help h2 , #help a +#help a:link,#help a:hover,#help a:visited +{ + text-align:center; + font-size:small; + color:#8470FF; + background-color:#F7F7F7; +} +#help h2, #help h2 a, #help h2 a:link, #help h2 a:hover, #help h2 a:visited { text-align:center; font-size:medium; color:#FFFFFF; background-color:#551A8B; - color:#FFFFFF; margin-top:0; margin-bottom:10px; } + #no_help, #no_help h2 { display:none; @@ -231,3 +235,97 @@ div.popup_contenu background-repeat:repeat; z-index: 499; } + +#page_accueil h1 +{ + display:none; + +} + +#page_accueil +{ + position:absolute; + text-align:center; + left:12em; + margin:3em; + top:50px; +} + +#msg +{ + display:none; + position:absolute; + text-align:center; + left:50%; + margin-left:-20%; + width:40%; + background-color:#551A8B; + top:-10px; + padding-top:15px; + padding-bottom:10px; + color:#FFF; + -moz-border-radius:16px; +} +#msg em +{ + color:#FFF; +} + + +#footer +{ + float:left; + clear:left; + display:block; + width:19em; + background-color:#551A8B; + color:#FFF; + font-size:x-small; + margin:0px; + padding-top:10px; + padding-bottom:0px; +} +#footer ul +{ + + list-style-type:none; + white-space:nowrap; + margin-top:0px; + margin-bottom:10px; + padding:0px; + margin-left:0px; +} +#footer li.author { + display:block; + float:left; + list-style:none; + vertical-align:middle; + padding-left:10px; + margin-left:0px; +} +#footer li.author li +{ + padding:0px; + margin:0px; +} +#footer li.wwwc { + float:left; + list-style: none; + padding:0 4em; + margin:10px 0px; +} +#footer li.wwwc a{ + display:block; + +} +#footer li.csschooser select { + border:thin solid #000; +} +#footer li.csschooser { + float:left; + list-style: none; + vertical-align:middle; + margin-top:0px; + padding-left:30px; + margin-left:0px; +} diff --git a/final/app/css/ice_moche_nohelp.css b/final/app/css/ice_moche_nohelp.css index 9032594..45f2014 100644 --- a/final/app/css/ice_moche_nohelp.css +++ b/final/app/css/ice_moche_nohelp.css @@ -1,4 +1,3 @@ - img { border : none ; } body { color: #000000; @@ -6,7 +5,6 @@ body { font-family: Verdana, Arial, Helvetica, sans-serif; padding:0px; margin:0px; - min-width:750px; /*Pour eviter le chevauchement pour FireFox, ne change rien pour IE (qui gere pas trop mal sans ca) */ } table { border-spacing:0px; @@ -22,8 +20,9 @@ th { border-right:none; font-weight: bold; color: #FFFFFF; - background-color: #551A8B; + background-color:#551A8B; } + th.selected {color:#8470FF;} td { border-bottom-width: thin; @@ -34,6 +33,7 @@ th a:link, th a:visited { font-size: x-small; color: #FFFFFF; } + h1 { font-weight: bold; color: #9999FF; @@ -43,62 +43,58 @@ h2 { color: #5C5CFF; margin: 0px; } +li { + margin-left:-20px; +} select { width:auto; } /***** Titre *****/ #titre h2 { color: #551A8B; - margin-left:50px; - height:50px; - width:200px; - background-image:url(ice_img/titre.png); - background-position:left; - background-repeat:no-repeat; + height:3em; + width:12em; + padding-top:5px; + padding-left:1em; color:#FFFFFF; - font-size:0px; + font-size:2em; + } #titre { - height:50px; + height:3em; + width:12em; clear:left; - background-color:#FFFFFF; - background-image:url(ice_img/logo.png); - background-position:left; - background-repeat:no-repeat; + background-color:#551A8B; } /*****************/ /***** Menu *****/ #menu { - padding:0px; + padding:50px 0 50px 0; + margin:0px; - width:100%; - height:1.5em; background-color:#551A8B; + width:12em; + } #menu a { text-decoration:none; display:block; font-weight:bold; text-align:center; - color:#FFFFFF; - height:1.5em; + color:#FFFFFF; + background-color:#551A8B; } #menu a:hover { - color:#000000; + color:#551A8B; background-color:#FFFFFF; - height:1.5em; } /* Pour IE5/MAC \*/#menu a{float:none;}/**/ #menu li { list-style: none; - float:left; - padding:0; - margin:0; - width:10em; - white-space:nowrap;/*Evite l'étalement sur deux ligne*/ + padding:0px; + margin:0px; vertical-align:middle; } #menu #deconnection { - float:right; } #main_menu { @@ -107,68 +103,37 @@ select { width:auto; } /*********************/ /***** Sous Menu *****/ #sous_menu { - clear:left; - padding-top:5px; - padding-bottom:3px; - padding-left:15px; - border-bottom:1px solid #000000; - background-color:#8470FF; -} -/* -------------- Arbre -------------------*/ -p.arbre { - font-size: small; - color: #FFFFFF; - text-align: left; - margin-top: 0px; - margin-right: 0px; - margin-bottom: 0px; - margin-left: 0px; + display:none; } -p.arbre a:link, p.arbre a:visited {color:#FFFFFF; } - /*******************/ /***** Contenu *****/ - #contenu { - padding-top:10px; - padding-bottom:20px; - padding-left:5px; - padding-right:5px; - float:left; - width:95%; -} -#no_help { - display:block; - text-align:justify; - color:#000000; + margin:20px; + padding:20px; + top:30px; + left:12em; + border:thin solid #F7F7F7; + background-color:#8470FF; float:right; - margin:0px; - padding:1px; - border:thin solid #000000; - background-color:#F7F7F7; - font-size:small; - width:3%; + position:absolute; + } -#no_help h2 , #no_help a +#help { + display:none; +} + +#no_help, #no_help h2 , #no_help h2 a { display:block; - text-align:center; - font-size:medium; color:#FFFFFF; background-color:#551A8B; - margin:0px; - padding:0px; -} -#help,#help h2 -{ - display:none; + width:8em; + text-align:center; } - - -.popup , .popup_creneau , .popup_personne , .popup_commentaire , .popup_fichier , .popup_deletelist { +.popup , .popup_creneau , .popup_personne , .popup_commentaire , .popup_fichier , .popup_deletelist { display: none; position: absolute; left:50%; @@ -211,7 +176,6 @@ p.arbre a:link, p.arbre a:visited {color:#FFFFFF; } margin-top: -4em ;/*moitié de height */ margin-left: -15em ;/*moitié de width */ } - .popup_deletelist { width: 26em; height: 8em; @@ -219,7 +183,7 @@ p.arbre a:link, p.arbre a:visited {color:#FFFFFF; } margin-left: -13em ;/*moitié de width */ } -.popup h2 , .popup_creneau h2 , .popup_personne h2 , .popup_commentaire h2 , .popup_fichier h2 , .popup_deletelist h2 +.popup h2 , .popup_creneau h2 , .popup_personne h2 , .popup_commentaire h2 , .popup_fichier h2 , .popup_deletelist h2 { background:#551A8B; color:#FFFFFF; @@ -249,4 +213,89 @@ div.popup_contenu background-image:url(ice_img/masque.png); background-repeat:repeat; z-index: 499; -} \ No newline at end of file +} + +#page_accueil h1 +{ + background:#551A8B; + color:#FFF; + margin-top:0; +} + +#page_accueil +{ + text-align:center; +} + +#msg +{ + display:none; + position:absolute; + text-align:center; + left:50%; + margin-left:-20%; + width:40%; + background-color:#551A8B; + top:-10px; + padding-top:15px; + padding-bottom:10px; + color:#FFF; + -moz-border-radius:16px; +} +#msg em +{ + color:#FFF; +} + + +#footer +{ + float:left; + clear:left; + display:block; + width:19em; + background-color:#551A8B; + color:#FFF; + font-size:x-small; + margin:0px; + padding-top:10px; + padding-bottom:0px; +} +#footer ul +{ + + list-style-type:none; + white-space:nowrap; + margin-top:0px; + margin-bottom:10px; + padding:0px; +} +#footer li.right { +display:block; + float:left; + list-style:none; + vertical-align:middle; + padding-left:10px; + margin-left:0px; +} +#footer li.center { + float:left; + list-style: none; + padding:0 4em; + margin:10px 0px; +} +#footer li.center a{ + display:block; + +} +#footer li.left select { + border:thin solid #000; +} +#footer li.left { + float:left; + list-style: none; + vertical-align:middle; + margin-top:0px; + padding-left:30px; + margin-left:0px; +} diff --git a/final/app/css/ice_nohelp.css b/final/app/css/ice_nohelp.css index 9724abd..5de91fe 100644 --- a/final/app/css/ice_nohelp.css +++ b/final/app/css/ice_nohelp.css @@ -26,6 +26,10 @@ th, thead tr { color: #FFFFFF; background-color: #551A8B; } +tr.empty { + height:5px; + background-color:#8470FF; +} th.selected {color:#FFF;background-color:#8470FF} td { margin:0.5em; @@ -185,9 +189,10 @@ p.arbre a:link, p.arbre a:visited {color:#FFFFFF; } font-size:medium; color:#8470FF; } -#help,#help h2 +#help,#help h2, #help ul , #help li { display:none; + visibility:hidden; } @@ -332,7 +337,7 @@ div.popup_contenu em margin-top:0px; padding:0px; } -#footer li.right { +#footer li.author { display:inline; float:left; list-style:none; @@ -341,7 +346,12 @@ div.popup_contenu em padding-left:10px; margin-left:0px; } -#footer li.center { +#footer li.author li { + display:inline; + padding:0px; + margin:0px 5px; +} +#footer li.wwwc { display:inline; float:right; list-style: none; @@ -350,7 +360,10 @@ div.popup_contenu em padding-right:30px; margin-left:0px; } -#footer li.left { +#footer li.csschooser select { + border:thin solid #000; +} +#footer li.csschooser { float:left; display:inline; list-style: none; diff --git a/final/app/include/connect.inc.php b/final/app/include/connect.inc.php index 0bc0a10..469ebd1 100644 --- a/final/app/include/connect.inc.php +++ b/final/app/include/connect.inc.php @@ -4,9 +4,9 @@ */ // $bd représente le nom de la database à utiliser -$bd = "awor"; +$bd = "awor_final"; // mysql_connect(, , ); -$link = @mysql_connect('localhost', 'awor', 'blagnac'); +$link = @mysql_connect('localhost', 'lud_restricted', 'maille_ess_ku_elle'); @mysql_select_db($bd , $link); diff --git a/final/app/include/je.inc.php b/final/app/include/je.inc.php index d7d1081..5205b47 100644 --- a/final/app/include/je.inc.php +++ b/final/app/include/je.inc.php @@ -163,7 +163,7 @@ require_once ('include/connect.inc.php'); if ($row['estPrivee'] == 'oui' || $row['idP_Createur']==$idP) echo "\"Supprimer\n" ; else echo "\n"; if ($row['estPrivee'] == 'oui') echo "Privée" ; else echo "Public"; echo "\n"; - echo ""; + echo ""; echo htmlentities($row['libelleL'], ENT_QUOTES); echo "\n"; echo "\n"; @@ -237,5 +237,6 @@ require_once ('include/connect.inc.php'); } } echo ''; - } +} + ?> \ No newline at end of file diff --git a/final/app/include/ju.inc.php b/final/app/include/ju.inc.php index 4bb9330..4ab1a1c 100644 --- a/final/app/include/ju.inc.php +++ b/final/app/include/ju.inc.php @@ -153,9 +153,13 @@ function traiter_formulaire_maj_profil() { require_once ('include/tools.inc.php'); $requete = "UPDATE AWOR_Personne SET courrielP = '".addslashes_if_needed($_POST["courrielP"])."', loginP = '".addslashes_if_needed($_POST["loginP"])."', nomP = '".addslashes_if_needed($_POST["nomP"])."', prenomP = '".addslashes_if_needed($_POST["prenomP"])."', methodeAuth = '".addslashes_if_needed($_POST["methodeAuth"])."' WHERE idP = '".$_SESSION['session_idP']."'"; - if(mysql_query($requete) == false) return "Une erreur MySQL est survenu : ".mysql_error(); - $_SESSION['session_prenomP'] = $_POST["prenomP"]; - $_SESSION['session_nomP'] = $_POST["nomP"]; + if(mysql_query($requete) === false) return false;// "Une erreur MySQL est survenu : ".mysql_error(); + else + { + $_SESSION['session_prenomP'] = $_POST["prenomP"]; + $_SESSION['session_nomP'] = $_POST["nomP"]; + return true; + } //print_r($_POST); } diff --git a/final/app/include/ludo/auth.inc.php b/final/app/include/ludo/auth.inc.php index 2491203..516bd45 100644 --- a/final/app/include/ludo/auth.inc.php +++ b/final/app/include/ludo/auth.inc.php @@ -13,24 +13,33 @@ define("ERR_BAD_PARAMS", -100); // Fonction d'authentification pop3 function pop3_auth_simple($mail, $upw) { - if ( ($ret = ereg ( "(^.*)@([[:alnum:]]+\.[[:alnum:]]+)", $mail, $re_tokens ) ) ) + //~ echo "DEBUG : function pop3_auth_simple($mail, $upw)\n"; + //~ if ( ($ret = ereg ( "(^.*)@([[:alnum:]]+\.[[:alnum:]]+)", $mail, $re_tokens ) ) ) + if ( ($ret = ereg ( "(^.*)@(.+)", $mail, $re_tokens ) ) ) { /* $re_tokens [] * [0] : email complet * [1] : nom_mail * [2] : serveur_mail */ - require_once('config.inc.php'); - $srv_conf = $CONFIG['AUTH']['POP']['SERVERS'][strtolower($re_tokens[2])]; - if ( is_array($srv_conf) ) + $server_mail=strtolower($re_tokens[2]); + include('config.inc.php'); + + if ( isset($CONFIG['AUTH']['POP']['SERVERS'][$server_mail]) ) { - $server=$srv_conf['subdomain']; - $port=$srv_conf['port']; - if ( $srv_conf['username_is_full_mail'] ) - { $user = $mail; } else { $user = $re_tokens[1]; } - return pop3_auth ($server, $port, $user, $upw); + $srv_conf = $CONFIG['AUTH']['POP']['SERVERS'][$server_mail]; + if ( is_array($srv_conf) ) + { + $server=$srv_conf['subdomain']; + $port=$srv_conf['port']; + if ( $srv_conf['username_is_full_mail'] ) + { $user = $mail; } else { $user = $re_tokens[1]; } + return pop3_auth ($server, $port, $user, $upw); + } } - } + //~ else { print_r($CONFIG); echo "\nDEBUG : \$server_mail==$server_mail\n";} + }//else echo "Pb EREG\n"; + /* DEBUG echo $mail . "\n" . $ret . "\n";; print_r($re_tokens); @@ -40,6 +49,8 @@ function pop3_auth_simple($mail, $upw) function pop3_auth ($server, $port, $user, $upw) { + //~ echo "function pop3_auth ($server, $port, $user, $upw)\n"; + //echo "DEBUG : fsockopen($server, $port, $errno, $errstr, 10);"; $sock = @fsockopen($server, $port, $errno, $errstr, 10); if ( $sock === false) diff --git a/final/app/include/ludo/config.inc.php b/final/app/include/ludo/config.inc.php index c016342..92be407 100644 --- a/final/app/include/ludo/config.inc.php +++ b/final/app/include/ludo/config.inc.php @@ -9,6 +9,12 @@ $CONFIG = array ( 'SERVERS' => array ( + 'etu.iut-blagnac.fr' => array + ( + 'subdomain' => 'mail.google.com', + 'port' => 110, + 'username_is_full_mail' => true + ), 'wanadoo.fr' => array ( 'subdomain' => 'pop.orange.fr', @@ -31,8 +37,8 @@ $CONFIG = array ( // 'nom à afficher' => 'nom_fichier_sans_extension' 'standard' => 'ice', - 'Glace (ancien)' => 'ice_moche', - 'bleu' => 'style1' + 'vertical demo' => 'ice_moche' + //'bleu' => 'style1' ) ), 'MAIL' => array diff --git a/final/app/include/ludo/fonctions.inc.php b/final/app/include/ludo/fonctions.inc.php index 3361827..1dd9117 100644 --- a/final/app/include/ludo/fonctions.inc.php +++ b/final/app/include/ludo/fonctions.inc.php @@ -145,7 +145,7 @@ function generate_html_array_personnes_crenaux($idR) if ( $is_admin ) { echo ' ' . "\n"; + echo '&idL=' . $idL_interne . '&idP_orga=' . $idP_orga . '\',\'poppersonne\',true);popon(\'poppersonne\');loadid(\'help/reunion_admin_participants.php.hlp\',\'help\',false)">' . "\n"; echo ' Ajouter une personne' . "\n"; echo '  '; } @@ -185,7 +185,7 @@ function generate_html_array_personnes_crenaux($idR) { ?> - + Editer les creneaux @@ -275,7 +275,7 @@ function generate_html_array_personnes_crenaux($idR) ' . "\n"; + echo '&idL=' . $idL_interne . '&idP_orga=' . $idP_orga . '\',\'poppersonne\',true);popon(\'poppersonne\');loadid(\'help/reunion_admin_participants.php.hlp\',\'help\',false)">' . "\n"; ?> Ajouter une personne @@ -443,7 +443,7 @@ function generate_html_reunion_detail2($idR) echo '(Editer)\n"; + echo "','details_reunion',false);loadid('help/reunion_admin_info.php.hlp','help',false)\">(Editer)\n"; } $objetR=htmlentities($objetR, ENT_QUOTES); $ordreJourR=htmlentities($ordreJourR, ENT_QUOTES); diff --git a/final/app/include/ludo/html_elements.inc.php b/final/app/include/ludo/html_elements.inc.php index 35eaa68..a252662 100644 --- a/final/app/include/ludo/html_elements.inc.php +++ b/final/app/include/ludo/html_elements.inc.php @@ -16,9 +16,9 @@ echo ''."\n" '."\n" } echo ' ' . "\n"; echo ' ' . "\n"; - +/* if ( isset($CONFIG['CSS']['CHOOSER_LIST']) ) { foreach ( $CONFIG['CSS']['CHOOSER_LIST'] as $cssname => $cssfile ) @@ -39,6 +39,7 @@ echo ''."\n" } } } +*/ ?> @@ -101,15 +102,15 @@ function generate_html_div_css_chooser() if ( ! is_array($CONFIG['CSS']['CHOOSER_LIST']) ) { return false; } - if ( isset($_COOKIE['aworcustom_css'] ) ) { $css_selected=$_COOKIE['aworcustom_css']; }else{$css_selected='';}; + if ( isset($_COOKIE['aworchoose_css'] ) ) { $css_selected=$_COOKIE['aworchoose_css']; }else{$css_selected='';}; echo '
' . "\n"; //print_r($_COOKIE); echo ' '. "\n"; echo '
'. "\n"; @@ -120,10 +121,10 @@ function generate_html_div_footer() ?> diff --git a/final/app/listes.php b/final/app/listes.php index e4529f1..df7182e 100644 --- a/final/app/listes.php +++ b/final/app/listes.php @@ -35,7 +35,7 @@ generate_html_div_help('help/listes.php.hlp');


-Créer une liste +Créer une liste diff --git a/final/app/profil.php b/final/app/profil.php index 16d3449..eebc750 100644 --- a/final/app/profil.php +++ b/final/app/profil.php @@ -3,20 +3,37 @@ require('include/ludo/session_verify.inc.php'); require_once('include/ludo/html_elements.inc.php'); require_once('include/connect.inc.php'); require_once('include/ju.inc.php'); +require_once('include/je.inc.php'); +require_once('include/tools.inc.php'); if ( isset($_REQUEST['action']) ) { + if ($_POST['action'] == "maj_profil") { - if (1==1)//Verification auth puis traitement + include('auth_dialog.php'); + if ( authentification(addslashes_if_needed($_POST['loginP']),addslashes_if_needed($_POST['pass']),addslashes_if_needed($_POST['methodeAuth'])) === true ) { $nom_func = 'traiter_formulaire_' . $_REQUEST['action']; - $nom_func(); + $result_fonc = $nom_func(); + } + else + { + $result_fonc = -1; } } } +if (isset($_POST['pre_action']) ) +{ + if (($_POST['pre_action'] == "verif_profil" & ($_POST["oldLogin"] == $_POST["loginP"]) | ($_POST["oldMethodeAuth"] == $_POST["methodeAuth"]))) + { + $nom_func = 'traiter_formulaire_maj_profil'; + $result_fonc = $nom_func(); + } +} generate_html_doctype_and_head("Administration du profil"); echo "\n"; + generate_html_divs_menu(); ?>
@@ -37,29 +54,42 @@ else { $nom = $_SESSION['session_loginP']; } -if (isset($_POST['pre_action']) & $_POST['pre_action']=="verif_profil") +$verif_auth = false; +if (isset($_POST['pre_action']) ) { - + if ($_POST['pre_action']=="verif_profil" & ($_POST["oldLogin"] != $_POST["loginP"]) | ($_POST["oldMethodeAuth"] != $_POST["methodeAuth"])) + { + echo "
\n"; echo ""; - echo ""; + echo ""; echo ""; echo ""; echo "
Confirmer votre authentification
Identifiant : ".$_POST['loginP']."
Identifiant : ".stripslashes_if_needed($_POST['loginP'])."
Mot de passe :
"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "
\n"; + $verif_auth=true; + } } -else +if ($verif_auth==false) { $resultat = mysql_query("SELECT * FROM AWOR_Personne WHERE idP = '".$_SESSION['session_idP']."'"); if($resultat != false) { + if (isset($result_fonc)) + { + if ($result_fonc === true) echo "Les modifications ont été prises en compte."; + if ($result_fonc === false) echo "Erreur de modification de votre compte."; + if ($result_fonc === -1) echo "Erreur, le mot de passe et le login ne sont pas conformes."; + echo "

\n"; + + } $p = mysql_fetch_array($resultat); echo "
\n"; echo "\n"; @@ -71,9 +101,13 @@ else echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "
Votre adresse mail :
Votre nom :
Votre prenom :
Votre choix d'apparence :";generate_html_div_css_chooser();echo"
\n"; + echo "\n"; + echo "\n"; echo "\n"; + echo "
\n"; echo "
\n"; } diff --git a/final/app/script.js b/final/app/script.js index c8c0a06..824dcb6 100644 --- a/final/app/script.js +++ b/final/app/script.js @@ -32,11 +32,19 @@ function switchCSS() { if (listCSS.options.selectedIndex>=0) { - - setActiveStyleSheet(listCSS.options[listCSS.options.selectedIndex].value); + var date_exp = new Date(); + date_exp.setTime(date_exp.getTime()+(365*24*3600*1000)); + document.cookie="aworchoose_css"+"="+listCSS.options[listCSS.options.selectedIndex].value+ + "; expires="+date_exp.toGMTString()+ + "; path=/"; + window.location.reload(); + window.location=document.location; + + } - } + } + } function addAllPers(form) -- cgit v1.2.3