-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinscription.php
229 lines (176 loc) · 10.2 KB
/
inscription.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css">
<script type="text/javascript" src="scripts/jquery.js"></script>
<link rel="stylesheet" href="css/jquery-ui.min.css" type="text/css" />
<script src="scripts/jquery.qtip.min.js"></script>
<link rel="stylesheet" href="scripts/jquery.qtip.min.css" />
<script type="text/javascript" src="scripts/jquery-ui.min.js"></script>
<script>
$(document).ready(function()
{
$('[title!=""]').qtip(
{
position: {
my:'center left',
at:'center right',
},
style : {
classes: 'qtip-bootstrap'
}
});
});
</script>
<script>
$(document).ready(function()
{
$('#userCas').click( function() {
$('#infoUser').slideDown( "slow", function() {
// Animation complete.
});
$('#categorie').slideUp( "slow", function() {
// Animation complete.
});
//$('#categorie').hide();
});
$('#entrepriseCas').click( function() {
$('#infoEntreprise').slideDown( "slow", function() {
// Animation complete.
});
$('#categorie').slideUp( "slow", function() {
// Animation complete.
});
//$('#info').hide();
});
$('#accueil').click( function() {
$( "#bodycentered" ).fadeOut( "slow", function() {
// Animation complete.
document.location.href="accueil.php";
//???
$( "#bodycentered" ).fadeIn( "slow", function() {
});
});
//$('#categorie').hide();
});
window.onload = function() {
$( "#bodycentered" ).fadeIn( "slow", function() {
// Animation complete.
});
};
});
</script>
<script src="scripts/script_checkform.js"></script>
<title>Ulike : S'enregistrer</title>
</head>
<body>
<?php include("include/entete.php"); ?>
<div id="bodycentered">
<div id="categorie">
<h2>Inscription</h2>
<div class="msgbox">
<p>Choisissez votre catégorie</p>
<div class="msgbox_btn_box">
<div class="bouton bleu" id="userCas">Utilisateur</div>
<div class="bouton bleu" id="entrepriseCas">Entreprise</div>
</div>
</div>
</div>
<div id="infoUser">
<h2>Informations personnelles</h2>
<div class="moitieGauche">
<form action="controleurs/inscrire_membre.php" method="post" enctype="multipart/form-data" autocomplete="on">
<label for="pseudo_membre">Pseudonyme :<span class="obligatoire">*</span></label>
<input type="text" id="pseudo_membre" name="pseudo" title="Sera affiché sur vos commentaires. <br> Retenez-le, il servira à vous authentifier" class="pseudo"<?php if (isset($_SESSION['ajout_membre.pseudo']))
echo ' value="' . $_SESSION['ajout_membre.pseudo'] .'"'; ?>>
<label for="passwd_membre">Mot de passe :<span class="obligatoire">*</span></label>
<input type="password" title="Votre mot de passe doit comporter au moins : <br>- 1 majuscule,<br>- 1 minuscule, <br>- 1 chiffre" required pattern="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$" name="passwd" id="passwd_membre" onchange=" this.setCustomValidity(this.validity.patternMismatch ? 'Votre mot de passe doit comporter au moins 1 majuscule, 1 minuscule et un chiffre' : ''); if(this.checkValidity()) form.passwordconfirm.pattern = this.value; ">
<label for="passwdconfirm_membre">Confirmez le mot de passe :<span class="obligatoire">*</span></label>
<input type="password" id="passwdconfirm_membre" title="Doit être identique à celui ci-dessus" required pattern="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$" onchange=" this.setCustomValidity(this.validity.patternMismatch ? 'Veuillez entrer un mot de passe identique à celui ci-dessus' : ''); " name="passwdconfirm" class="passwdconfirm">
<label for="mail_membre">Email :<span class="obligatoire">*</span></label>
<input type="email" id="mail_membre" title="Doit être de la forme :<br>nom@domain.zone" name="mail" class="email"<?php if (isset($_SESSION['ajout_membre.mail']))
echo ' value="' . $_SESSION['ajout_membre.mail'] .'"'; ?>>
<label for="nom">Nom :</label>
<input type="text" title="Votre nom ne sera jamais publié<br>ni transmis" name="nom" id="nom"<?php if (isset($_SESSION['ajout_membre.nom']))
echo ' value="' . $_SESSION['ajout_membre.nom'] .'"'; ?>>
<label for="prenom">Prénom :</label>
<input type="text" title="Votre prénom ne sera jamais publié<br>ni transmis" name="prenom" id="prenom"<?php if (isset($_SESSION['ajout_membre.prenom']))
echo ' value="' . $_SESSION['ajout_membre.prenom'] .'"'; ?>>
<label for="age">Date de naissance :</label>
<input type="text" title="Votre âge ne sera utilisé<br>qu'à des fin statistiques" name="age" id="age"<?php if (isset($_SESSION['ajout_membre.dateN']))
echo ' value="' . $_SESSION['ajout_membre.dateN'] .'"'; ?>>
<label>Sexe:</label>
<SELECT title="Cette information ne sera utilisé<br>qu'à des fin statistiques" id="sexe" name="sexe">
<?php
$categorie = array('M', 'F', 'Autre');
$categorie_name = array('sexe_m', 'sexe_f', 'sexe_autre');
for($i = 0; $i<count($categorie);$i++){
if (isset($_SESSION['ajout_membre.sexe']) and $_SESSION['ajout_membre.sexe'] == $categorie_name[i]){
echo '<option value="' . $categorie_name[$i] . '" selected >' . $categorie[$i] . '</OPTION>';
}else{
echo '<option value="' . $categorie_name[$i] . '">' . $categorie[$i] . '</OPTION>';
}
}
?>
</SELECT>
<div class="msgObligatoire">Les champs notés avec un astérique rouge sont obligatoires.</div>
<input type="submit" value="valider">
</form>
</div>
<div class="moitieDroite">
<p>
<span class="validateUsername"><?php if(isset($error)) { if ($error) { echo $error['msg']; }} ?></span>
</p>
<p>
<span class="validateEmail"><?php if(isset($error)) { if ($error) { echo $error['msg']; }} ?></span>
</p>
</div>
</div>
<div id="infoEntreprise">
<h2>Informations confidentielles</h2>
<div class="moitieGauche">
<form action="controleurs/inscrire_entreprise.php" method="post" enctype="multipart/form-data" autocomplete="on">
<label for="pseudo_entreprise">Nom de l'entreprise:<span class="obligatoire">*</span></label>
<input type="text" id="pseudo_entreprise" title="Sera affiché sur la description de vos objets <br> Retenez-le, il servira à vous authentifier" required name="pseudo" class="pseudo"<?php if (isset($_SESSION['ajout_ent.nom_ent']))
echo ' value="' . $_SESSION['ajout_ent.nom_ent'] .'"'; ?>>
<label for="passwd_entreprise">Mot de passe :<span class="obligatoire">*</span></label>
<input type="password" title="Votre mot de passe doit comporter au moins : <br>- 1 majuscule,<br>- 1 minuscule, <br>- 1 chiffre" required pattern="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$" name="passwd" id="passwd_entreprise" onchange=" this.setCustomValidity(this.validity.patternMismatch ? 'Votre mot de passe doit comporter au moins 1 majuscule, 1 minuscule et un chiffre' : ''); if(this.checkValidity()) form.passwordconfirm.pattern = this.value; ">
<label for="passwdconfirm_entreprise">Confirmez le mot de passe :<span class="obligatoire">*</span></label>
<input type="password" id="passwdconfirm_entreprise" title="Doit être identique à celui ci-dessus" required pattern="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$" onchange=" this.setCustomValidity(this.validity.patternMismatch ? 'Veuillez entrer un mot de passe identique à celui ci-dessus' : ''); " name="passwdconfirm" class="passwdconfirm">
<label for="mail_entreprise">Email :<span class="obligatoire">*</span></label>
<input type="email" id="mail_entreprise" title="Doit être de la forme :<br>nom@domain.zone" name="mail_ent" class="email" <?php if (isset($_SESSION['ajout_ent.mail_ent']))
echo ' value="' . $_SESSION['ajout_ent.mail_ent'] .'"'; ?>>
<label for="siren">N° SIREN:<span class="obligatoire">*</span></label>
<input type="text" title="Sert à identifier votre entreprise<br>Cette information ne sera jamais publié" required name="siren" id="siren"<?php if (isset($_SESSION['ajout_ent.siren']))
echo ' value="' . $_SESSION['ajout_ent.siren'] .'"'; ?>>
<label for="nom_gerant">Nom du gérant<span class="obligatoire">*</span></label>
<input type="text" title="Sert à identifier votre entreprise<br>Cette information ne sera jamais publié" required name="nom_gerant" id="nom_gerant"<?php if (isset($_SESSION['ajout_ent.nom_gerant']))
echo ' value="' . $_SESSION['ajout_ent.nom_gerant'] .'"'; ?>>
<label for="adr_ent">Adresse:<span class="obligatoire">*</span></label>
<input type="text" required name="adr_ent" id="adr_ent"<?php if (isset($_SESSION['ajout_ent.adr_ent']))
echo ' value="' . $_SESSION['ajout_ent.adr_ent'] .'"'; ?>>
<label for="code_ent">Code postal:<span class="obligatoire">*</span></label>
<input type="text" required name="code_ent" id="code_ent"<?php if (isset($_SESSION['ajout_ent.code_ent']))
echo ' value="' . $_SESSION['ajout_ent.code_ent'] .'"'; ?>>
<label for="pays_ent">Pays:<span class="obligatoire">*</span></label>
<input type="text" required name="pays_ent" id="pays_ent"<?php if (isset($_SESSION['ajout_ent.pays_ent']))
echo ' value="' . $_SESSION['ajout_ent.pays_ent'] .'"'; ?>>
<div class="msgObligatoire">Les champs notés avec un astérique rouge sont obligatoires.</div>
<input type="submit" value="valider">
</form>
</div>
<div class="moitieDroite">
<p>
<span class="validateUsername"><?php if(isset($error)) { if ($error) { echo $error['msg']; }} ?></span>
</p>
<p>
<span class="validateEmail"><?php if(isset($error)) { if ($error) { echo $error['msg']; }} ?></span>
</p>
</div>
</div>
</div>
<?php include("include/footer.php");?>
</body>
</html>