diff options
Diffstat (limited to 'appli_3_alpha_old/app/profil.php')
-rw-r--r-- | appli_3_alpha_old/app/profil.php | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/appli_3_alpha_old/app/profil.php b/appli_3_alpha_old/app/profil.php index 97a172f..c75e188 100644 --- a/appli_3_alpha_old/app/profil.php +++ b/appli_3_alpha_old/app/profil.php @@ -2,6 +2,12 @@ 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'); +if ( isset($_REQUEST['action']) ) +{ + $nom_func = 'traiter_formulaire_' . $_REQUEST['action']; + $nom_func(); +} generate_html_doctype_and_head("Modèle"); echo "<body>\n"; generate_html_divs_menu(); @@ -24,15 +30,23 @@ else { $nom = $_SESSION['session_loginP']; } -$requete = "SELECT * FROM 'Personne' WHERE = ''"; -echo "<table>\n"; -echo "<tr><td>Votre login :</td><td><input type=\"text\" name=\"login\" /></td></tr>\n"; -echo "<tr><td>Votre mot de passe :</td><td><input type=\"text\" name=\"mdp\" /></td></tr>\n"; -echo "<tr><td>Votre nom :</td><td><input type=\"text\" name=\"nom\" /></td></tr>\n"; -echo "<tr><td>Votre prenom :</td><td><input type=\"text\" name=\"prenom\" /></td></tr>\n"; -echo "<tr><td colspan=\"2\"><input type=\"submit\" /></td></tr>\n"; -echo "</table>\n"; -echo "</div>\n"; +$resultat = mysql_query("SELECT * FROM Personne WHERE idP = '".$_SESSION['session_idP']."'"); +if($resultat != false) +{ + $p = mysql_fetch_array($resultat); + echo "<form method=\"post\" action=\"profil.php\">\n"; + echo "<table>\n"; + echo "<tr><td>Methode d'authentification : </td><td><select name=\"methodeAuth\"><option value=\"webetud\">Webetud</option><option value=\"pop\">POP3</option></select></td></tr>\n"; + echo "<tr><td>Votre login :</td><td><input type=\"text\" name=\"loginP\" value=\"".$p["loginP"]."\"/></td></tr>\n"; + echo "<tr><td>Votre adresse mail :</td><td><input type=\"text\" name=\"courrielP\" value=\"".$p["courrielP"]."\"/></td></tr>\n"; + echo "<tr><td>Votre nom :</td><td><input type=\"text\" name=\"nomP\" value=\"".$p["nomP"]."\"/></td></tr>\n"; + echo "<tr><td>Votre prenom :</td><td><input type=\"text\" name=\"prenomP\" value=\"".$p["prenomP"]."\"/></td></tr>\n"; + echo "<tr><td colspan=\"2\"><input type=\"submit\" /></td></tr>\n"; + echo "</table>\n"; + echo "</div>\n"; + echo "<input type=\"hidden\" name=\"action\" value=\"maj_profil\">"; + echo "</form>"; +} if ( isset ($errmsg) ) generate_html_div_errmsg($errmsg); ?> </body> |