-
Notifications
You must be signed in to change notification settings - Fork 0
/
blabla.txt
59 lines (42 loc) · 1.9 KB
/
blabla.txt
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
-inpute type date ?
voir eventuel modif pour de case et modif bdd
b166e1518483 Principal
DESCRIPTION b166e1518483 185.98.131.149
function inscription($userName, $userFirstname,$userPhone, $userAdress, $userMail, $userPWD){
$inscription = new \Project\Models\UserManager;
// Removing all illegal characters from email
$userMail = filter_var($userMail, FILTER_SANITIZE_EMAIL);
$errorsx = array();
if(empty($userName)){
$errorsx["required_name"] = "The name is required";
}
if(empty($userFirstname)){
$errorsx["required_Firstname"] = "The Firstname is required";
}
if(empty($userAdress)){
$errorsx["required_adress"] = "The adress is required";
}
if(empty($userPhone)){
$errorsx["required_Phone"] = "The Phone number is required";
}
if(!empty($userMail) && filter_var($userMail, FILTER_VALIDATE_EMAIL) == false) {
$errorsx["invalid_email"] = "The e-mail is invalid";
}
if(empty($userMail)){
$errorsx["required_email"] = "The e-mail is required";
}
if(empty($userPWD)){
$errorsx["required_PWD"] = "The password is required";
}
if(!empty($userName) && (!empty($userFirstname) && (!empty($userAdress) && (!empty($userPhone) && (!empty($userMail) && (!empty($userPWD) )))))) {
if(empty($errorsx)) {
$inscription = $userManager->inscription($userName, $userFirstname, $userAdress, $userPhone, $userMail, $userPWD);
$aLaUne = new \Project\Models\ImagesManager();
$allALaUne = $aLaUne->getALaUne();
require "app/Views/front/contact.php";
echo '<script>alert("message envoyé");</script>';
}
} else{
$this->contact($errorsx);
}
}