-
Notifications
You must be signed in to change notification settings - Fork 4
/
formulaire.php
203 lines (191 loc) · 11.2 KB
/
formulaire.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
<?php
/************************************************************************/
/* SFORM Extender for NPDS USER */
/* =========================== */
/* NPDS Copyright (c) 2002-2024 by Philippe Brunier */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License. */
/************************************************************************/
/* Dont modify this file if you dont know what you do */
/************************************************************************/
$m->add_title(translate("Inscription"));
$m->add_mess(translate("* Désigne un champ obligatoire"));
$m->add_field('uname', translate("ID utilisateur (pseudo)"),$uname,'text',true,25,'','');
$m->add_field('name', translate("Votre véritable identité"),$name,'text',false,60,'','');
$m->add_extender('name', '', '<span class="help-block"><span class="float-end" id="countcar_name"></span></span>');
$m->add_field('email', translate("Véritable adresse Email"),$email,'email',true,60,'','');
$m->add_extender('email', '','<span class="help-block">'.translate("(Cette adresse Email ne sera pas divulguée, mais elle nous servira à vous envoyer votre Mot de Passe si vous le perdez)").'<span class="float-end" id="countcar_email"></span></span>');
$m->add_checkbox('user_viewemail',translate("Autoriser les autres utilisateurs à voir mon Email"), "1", false, false);
// ---- AVATAR
if ($smilies) {
global $theme;
$direktori="images/forum/avatar";
if (function_exists("theme_image")) {
if (theme_image("forum/avatar/blank.gif"))
$direktori="themes/$theme/images/forum/avatar";
}
$handle=opendir($direktori);
while (false!==($file = readdir($handle))) {$filelist[] = $file;}
asort($filelist);
foreach($filelist as $key => $file) {
if (!preg_match('#\.gif|\.jpg|\.png$#i', $file)) continue;
$tmp_tempo[$file]['en']=$file;
$tmp_tempo[$file]['selected']=false;
if ($file=='blank.gif') $tmp_tempo[$file]['selected']=true;
}
$m->add_select('user_avatar', translate("Votre Avatar"), $tmp_tempo, false, '', false);
$m->add_extender('user_avatar', 'onkeyup="showimage();" onchange="showimage();"', '<img class="img-thumbnail n-ava mt-3" src="'.$direktori.'/blank.gif" name="avatar" alt="avatar" />');
$m->add_field('B1','B1','','hidden',false);
}
// ---- AVATAR
$m->add_field('user_from', translate("Votre situation géographique"),StripSlashes($user_from),'text',false,100,'','');
$m->add_extender('user_from', '', '<span class="help-block"><span class="float-end" id="countcar_user_from"></span></span>');
$m->add_field('user_occ', translate("Votre activité"),StripSlashes($user_occ),'text',false,100,'','');
$m->add_extender('user_occ', '', '<span class="help-block"><span class="float-end" id="countcar_user_occ"></span></span>');
$m->add_field('user_intrest', translate("Vos centres d'intérêt"),StripSlashes($user_intrest),'text',false,150,'','');
$m->add_extender('user_intrest', '', '<span class="help-block"><span class="float-end" id="countcar_user_intrest"></span></span>');
$m->add_field('user_sig', translate("Signature"),StripSlashes($user_sig),'textarea',false,255,'7','');
$m->add_extender('user_sig', '', '<span class="help-block">'.translate("(255 characters max. Type your signature with HTML coding)").'<span class="float-end" id="countcar_user_sig"></span></span>');
// --- MEMBER-PASS
if ($memberpass) {
$m->add_field('pass', translate("Mot de passe"),'','password',true,40,'','');
$m->add_extra('<div class="mb-3 row"><div class="col-sm-8 ms-sm-auto" ><div class="progress" style="height: 0.2rem;"><div id="passwordMeter_cont" class="progress-bar bg-danger" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"></div></div></div></div>');
$m->add_field('vpass', translate("Entrez à nouveau votre mot de Passe"),'','password',true,40,'','');
}
// --- MEMBER-PASS
$m->add_checkbox('user_lnl',translate("S'inscrire à la liste de diffusion du site"), "1", false, true);
// --- EXTENDER
if (file_exists("modules/sform/extend-user/extender/formulaire.php"))
include("modules/sform/extend-user/extender/formulaire.php");
// --- EXTENDER
// ----------------------------------------------------------------
// CES CHAMPS sont indispensables --- Don't remove these fields
// Champ Hidden
$m->add_field('op','','new user','hidden',false);
// --- CHARTE du SITE
$m->add_checkbox('charte','<a href="static.php?op=charte.html" target="_blank">'.translate("Vous devez accepter la charte d'utilisation du site").'</a>', "1", true, false);
// --- CHARTE du SITE
// --- CONSENTEMENT
$m->add_checkbox('consent',aff_langue('[french]En soumettant ce formulaire j\'accepte que les informations saisies soient exploitées dans le cadre de l\'utilisation et du fonctionnement de ce site.[/french][english]By submitting this form, I accept that the information entered will be used in the context of the use and operation of this website.[/english][spanish]Al enviar este formulario, acepto que la información ingresada se utilizará en el contexto del uso y funcionamiento de este sitio web.[/spanish][german]Mit dem Absenden dieses Formulars erkläre ich mich damit einverstanden, dass die eingegebenen Informationen im Rahmen der Nutzung und des Betriebs dieser Website verwendet werden.[/german][chinese]提交此表格即表示我接受所输入的信息将在本网站的使用和操作范围内使用。[/chinese]'), "1", true, false);
// --- CONSENTEMENT
$m->add_extra('
<div class="mb-3 row">
<div class="col-sm-8 ms-sm-auto" >
<button class="btn btn-primary" type="submit">'.translate("Valider").'</button>
</div>
</div>');
$m->add_extra(aff_langue('
<div class="mb-3 row">
<div class="col-sm-8 ms-sm-auto small" >
[french]Pour connaître et exercer vos droits notamment de retrait de votre consentement à l\'utilisation des données collectées veuillez consulter notre <a href="static.php?op=politiqueconf.html&npds=1&metalang=1">politique de confidentialité</a>.[/french][english]To know and exercise your rights, in particular to withdraw your consent to the use of the data collected, please consult our <a href="static.php?op=politiqueconf.html&npds=1&metalang=1">privacy policy</a>.[/english][spanish]Para conocer y ejercer sus derechos, en particular para retirar su consentimiento para el uso de los datos recopilados, consulte nuestra <a href="static.php?op=politiqueconf.html&npds=1&metalang=1">política de privacidad</a>.[/spanish][german]Um Ihre Rechte zu kennen und auszuüben, insbesondere um Ihre Einwilligung zur Nutzung der erhobenen Daten zu widerrufen, konsultieren Sie bitte unsere <a href="static.php?op=politiqueconf.html&npds=1&metalang=1">Datenschutzerklärung</a>.[/german][chinese]要了解并行使您的权利,尤其是要撤回您对所收集数据的使用的同意,请查阅我们<a href="static.php?op=politiqueconf.html&npds=1&metalang=1">的隐私政策</a>。[/chinese]
</div>
</div>'));
$m->add_extra('
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
inpandfieldlen("name",60);
inpandfieldlen("email",60);
inpandfieldlen("femail",60);
inpandfieldlen("url",100);
inpandfieldlen("user_from",100);
inpandfieldlen("user_occ",100);
inpandfieldlen("user_intrest",150);
inpandfieldlen("bio",255);
inpandfieldlen("user_sig",255);
inpandfieldlen("pass",40);
inpandfieldlen("vpass",40);
inpandfieldlen("C2",5);
inpandfieldlen("C1",100);
inpandfieldlen("T1",40);
})
//]]>
</script>');
/*
test encodage de l'input : btoa(input.value) dans la recherche dans tableau is ok from IE9
encodé en php dans la fonction autocomplete du mainfile ...
*/
$fv_parametres ='
uname: {
validators: {
callback: {
message: "Ce surnom n\'est pas disponible",
callback: function(input) {
if($.inArray(btoa(input.value), aruser) !== -1)
return false;
else
return true;
}
}
}
},
pass: {
validators: {
checkPassword: {
message: "Le mot de passe est trop simple."
},
}
},
vpass: {
validators: {
identical: {
compare: function() {
return register.querySelector(\'[name="pass"]\').value;
},
}
}
},
'.$ch_lat.': {
validators: {
regexp: {
regexp: /^[-]?([1-8]?\d(\.\d+)?|90(\.0+)?)$/,
message: "La latitude doit être entre -90.0 and 90.0"
},
numeric: {
thousandsSeparator: "",
decimalSeparator: "."
},
between: {
min: -90,
max: 90,
message: "La latitude doit être entre -90.0 and 90.0"
}
}
},
'.$ch_lon.': {
validators: {
regexp: {
regexp: /^[-]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/,
message: "La longitude doit être entre -180.0 and 180.0"
},
numeric: {
thousandsSeparator: "",
decimalSeparator: "."
},
between: {
min: -180,
max: 180,
message: "La longitude doit être entre -180.0 and 180.0"
}
}
},
!###!
register.querySelector(\'[name="pass"]\').addEventListener("input", function() {
fvitem.revalidateField("vpass");
});
flatpickr("#T1", {
altInput: true,
altFormat: "l j F Y",
maxDate:"today",
minDate:"'.date("Y-m-d",(time()-3784320000)).'",
dateFormat:"d/m/Y",
"locale": "'.language_iso(1,'','').'",
});
';
$arg1='
var formulid = ["register"];
'.auto_complete ('aruser', 'uname', 'users', '', '0');
// ----------------------------------------------------------------
?>