diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-07-05 00:35:24 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-07-05 00:35:24 +0200 |
commit | a5dba7cbf654d45763d85130e52f66cdce7871ba (patch) | |
tree | f5623cbdc7500c3f639d722b346b8576b01ceb11 /final/app | |
parent | e7cf0e99f41ab8ba3bab8aed516123c6f4ff3979 (diff) | |
download | 2007-AWOR-a5dba7cbf654d45763d85130e52f66cdce7871ba.tar.gz 2007-AWOR-a5dba7cbf654d45763d85130e52f66cdce7871ba.tar.bz2 2007-AWOR-a5dba7cbf654d45763d85130e52f66cdce7871ba.zip |
Diffstat (limited to 'final/app')
-rw-r--r-- | final/app/auth_dialog.php | 15 | ||||
-rw-r--r-- | final/app/css/default_img/index.html | 0 | ||||
-rw-r--r-- | final/app/css/ice_img/index.html | 0 | ||||
-rw-r--r-- | final/app/css/ice_moche_img/index.html | 0 | ||||
-rw-r--r-- | final/app/include/connect.inc.php | 4 | ||||
-rw-r--r-- | final/app/profil.php | 13 |
6 files changed, 15 insertions, 17 deletions
diff --git a/final/app/auth_dialog.php b/final/app/auth_dialog.php index fce5948..180f23c 100644 --- a/final/app/auth_dialog.php +++ b/final/app/auth_dialog.php @@ -96,13 +96,14 @@ function authentification($loginP,$pass,$verifAuth="") } } - - - session_start(); - $_SESSION['session_loginP']=$loginP; - $_SESSION['session_nomP']=$nomP; - $_SESSION['session_prenomP']=$prenomP; - $_SESSION['session_idP']=$idP; + if ($verifAuth == "") + { + session_start(); + $_SESSION['session_loginP']=$loginP; + $_SESSION['session_nomP']=$nomP; + $_SESSION['session_prenomP']=$prenomP; + $_SESSION['session_idP']=$idP; + } } return ($auth_is_ok?true:$errmsg); } diff --git a/final/app/css/default_img/index.html b/final/app/css/default_img/index.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/final/app/css/default_img/index.html diff --git a/final/app/css/ice_img/index.html b/final/app/css/ice_img/index.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/final/app/css/ice_img/index.html diff --git a/final/app/css/ice_moche_img/index.html b/final/app/css/ice_moche_img/index.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/final/app/css/ice_moche_img/index.html diff --git a/final/app/include/connect.inc.php b/final/app/include/connect.inc.php index 469ebd1..b5a70a7 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_final"; +$bd = "awor"; // mysql_connect(<nom_ou_ip_serveur_mysql>, <utilisateur_mysql>, <mot_de_passe_en_clair_mysql>); -$link = @mysql_connect('localhost', 'lud_restricted', 'maille_ess_ku_elle'); +$link = @mysql_connect('localhost', 'root', ''); @mysql_select_db($bd , $link); diff --git a/final/app/profil.php b/final/app/profil.php index eebc750..55e91ff 100644 --- a/final/app/profil.php +++ b/final/app/profil.php @@ -11,20 +11,17 @@ if ( isset($_REQUEST['action']) ) if ($_POST['action'] == "maj_profil") { include('auth_dialog.php'); - if ( authentification(addslashes_if_needed($_POST['loginP']),addslashes_if_needed($_POST['pass']),addslashes_if_needed($_POST['methodeAuth'])) === true ) + $result_fonc = authentification(addslashes_if_needed($_POST['loginP']),addslashes_if_needed($_POST['pass']),addslashes_if_needed($_POST['methodeAuth'])); + if ($result_fonc === true ) { $nom_func = 'traiter_formulaire_' . $_REQUEST['action']; $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"]))) + if (($_POST['pre_action'] == "verif_profil" & ($_POST["oldLogin"] == $_POST["loginP"]) & ($_POST["oldMethodeAuth"] == $_POST["methodeAuth"]))) { $nom_func = 'traiter_formulaire_maj_profil'; $result_fonc = $nom_func(); @@ -85,8 +82,7 @@ if ($verif_auth==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."; + else echo $result_fonc; echo "<br/><br/>\n"; } @@ -94,6 +90,7 @@ if ($verif_auth==false) echo "<form method=\"post\" action=\"profil.php\" onSubmit=\"return verifProfil()\" >\n"; echo "<table summary=\"Formulaire permettant de modifier le profil de l'utilisateur\" >\n"; echo "<tr><td>Methode d'authentification : </td><td>\n<select name=\"methodeAuth\">\n"; + //echo "<option value=\"bypass\" selected=\"selected\">bypass</option>\n"; if($p["methodeAuth"] == "webetud") echo "<option value=\"webetud\" selected=\"selected\">Webetud</option>\n"; else echo "<option value=\"webetud\">Webetud</option>\n"; if($p["methodeAuth"] == "pop") echo "<option value=\"pop\" selected=\"selected\">POP3</option>\n"; else echo "<option value=\"pop\">POP3</option>\n"; echo "</select></td></tr>\n"; |