X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=php%2Fconnexion.php;h=8464b3352a3fd7a08955a001d4916597fffbe174;hb=HEAD;hp=49c68a147c9f2c77bcd27dceee75c57f985a41fc;hpb=6b9eac51629ad6fcec7da5f48b92f4c2b54c5901;p=cl7.git diff --git a/php/connexion.php b/php/connexion.php index 49c68a1..8464b33 100644 --- a/php/connexion.php +++ b/php/connexion.php @@ -17,7 +17,7 @@ class Connexion if (!file_exists("php/config_bd.php")) { echo "Le fichier 'php/config_bd.php' n'existe pas, création en cours...\n"; - if (!is_writable(".")) + if (!is_writable("php/")) { echo "Le dossier 'php' n'est pas accessible en écriture, veuillez changer les droits et recommencer."; exit(); @@ -44,19 +44,16 @@ class Connexion exit(); } - //mysql_set_charset("UTF8"); - //mysql_query('SET AUTOCOMMIT=0'); - if (isset($_POST['effacer_cookie'])) # le membre se délogue { setcookie("COOKIE_INFO_PARTICIPANT", "", time() - 100); # 'efface' le cookie membre unset($_COOKIE["COOKIE_INFO_PARTICIPANT"]); } - + if (isset($_POST['log'])) # le membre se logue { $this->participant = new Participant($_POST['pseudo'], $_POST['password']); - if ($this->participant->valide) + if ($this->participant->existe()) { setcookie("COOKIE_INFO_PARTICIPANT", $this->participant->info->id, time() + 31104000); $this->message_utilisateur = "Loggation ok";