// // This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. // // To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/1.0/ // // or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. // // Francais (brouillon): http://creativecommons.org/projects/international/fr/translated-license // ////////////////////////////////////////////////////////////////////////////////////////////////////// // Inscription // Version 0.2.0 // Inclusion des en têtes $nocheck = TRUE; $requiredFiles = array("membres","groupes"); include_once("head.php"); if($cfg['inscription_libre'] != TRUE) { header("location: login?err=".urlencode("Les inscriptions ne sont pas ouvertes.")); exit; } if(!empty($_POST['etape1']) && empty($_POST['groupe'])) { $err = "Veuillez sélectionner un groupe."; unset($_POST); $_POST = array("accept"=>"oui"); } if(!empty($_POST['etape2'])) { if(empty($_POST['login'])) $err = "Vous devez donner un login."; elseif(empty($_POST['email'])) $err = "Vous devez donner une adresse E-Mail."; else { $grp = $groupes->get($_POST['groupe']); if(($grp['max_membres'] != "-1") && ($groupes->count_membres($id) >= $grp['max_membres'])) die("Le groupe choisi a atteint son effectif maximum autorisé."); $ok = $membres->inscription($_POST['login'],$_POST['email'],$_POST['groupe']); if($ok) { header("location: login?err=".urlencode("L'inscription a été effectuée. Un E-Mail vous a été envoyé avec votre mot de passe.")); exit; } else $err = $membres->erreur; } $groupe = $_POST['groupe']; unset($_POST); $_POST = array("etape1"=>1,"groupe"=>$groupe); } echo '