-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinscription.php
91 lines (85 loc) · 5.28 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
<?php
declare(strict_types=1);
require "autoload.php";
$webPage = new WebPage("Inscription");
$webPage->appendJsUrl("js/sha512.js");
$webPage->appendJs(<<<JS
function hash512() {
document.getElementById('code').value = Sha512.hash(document.getElementById('password').value.toString());
}
JS);
$form = <<<HTML
<div class="d-flex flex-row justify-content-center mb-5">
<img src="img/animal/cat1.png" height="250px" class="align-self-center mr-5"/>
<div class="d-flex flex-column pt-2 pb-2 pr-5 pl-5" style="background-color: #DDDDDD; border-radius: 10px">
<form action="trmt/inscription_trmt.php" method="post" onsubmit="hash512();">
<div class="d-flex pb-4 justify-content-center">
<h2 style="font-weight: bold;">Inscription</h2>
</div>
<div class="d-flex flex-row">
<div class="form-group d-flex flex-column">
<div class="d-flex flex-row">
{$webPage->getIcon("user")}
<div style="font-weight: bold;">Nom</div>
</div>
<input type="text" id="lastName" name="lastName" class="pt-1 pb-1 pr-2 pl-2 mr-3 rounded" style="outline: 0; border:0; background-color: #C9C9C9;" placeholder="Votre Nom" required>
</div>
<div class="form-group d-flex flex-column">
<div class="d-flex flex-row">
{$webPage->getIcon("user")}
<div style="font-weight: bold;">Prénom</div>
</div>
<input type="text" id="firstName" name="firstName" class="pt-1 pb-1 pr-2 pl-2 rounded" style="outline: 0; border:0;background-color: #C9C9C9;" placeholder="Votre Prénom" required>
</div>
</div>
<div class="form-group d-flex flex-column">
<div class="d-flex flex-row">
{$webPage->getIcon("mail")}
<div style="font-weight: bold;">Adresse Mail</div>
</div>
<input type="email" id="email" name="email" class="pt-1 pb-1 pr-2 pl-2 rounded" style="outline: 0; border:0;background-color: #C9C9C9;" placeholder="Votre Adresse Mail" required>
</div>
<div class="form-group d-flex flex-column">
<div class="d-flex flex-row">
{$webPage->getIcon("mail")}
<div style="font-weight: bold;">Répétez Votre Adresse Mail</div>
</div>
<input type="email" id="repeat_email" name="repeat_mail" class="pt-1 pb-1 pr-2 pl-2 rounded" style="outline: 0; border:0;background-color: #C9C9C9;" placeholder="Votre Adresse Mail" required>
</div>
<div class="form-group d-flex flex-column">
<div style="font-weight: bold;" class="d-flex flex-row">
{$webPage->getIcon("lock")}
<div>Mot de passe</div>
</div>
<input type="password" id="password" class="pt-1 pb-1 pr-2 pl-2 rounded" style="outline: 0; border:0;background-color: #C9C9C9;" placeholder="Votre mot de passe" required>
</div>
<div class="form-group d-flex flex-column">
<div class="d-flex flex-row">
{$webPage->getIcon("lock")}
<div style="font-weight: bold;">Répétez Votre Mot de passe</div>
</div>
<input type="password" id="repeat_password" name="repeat_password" class="pt-1 pb-1 pr-2 pl-2 rounded" style="outline: 0; border:0;background-color: #C9C9C9;" placeholder="Votre mot de passe" required>
</div>
<div class="form-group d-flex flex-column">
<div class="d-flex flex-row">
{$webPage->getIcon("phone")}
<div style="font-weight: bold;">Numéro de Téléphone</div>
</div>
<input type="tel" id="phone" name="phone" pattern="^(?:0|\(?\+33\)?\s?|0033\s?)[1-79](?:[\.\-\s]?\d\d){4}$" class="pt-1 pb-1 pr-2 pl-2 rounded" style="outline: 0; border:0;background-color: #C9C9C9;" placeholder="Votre numéro de Téléphone" required>
</div>
<div class="form-group custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="conditions_utilisations" required>
<label class="custom-control-label" style="font-weight: bold;" for = "conditions_utilisations">Accepter les <a href="#" style="text-decoration: none; color: #02897A">conditions d'utilisations</a></label>
</div>
<input type="text" id="code" name="code" hidden>
<div class="d-flex flex-row justify-content-center">
<div class="form-group d-inline-flex">
{$webPage->getHTMLButton(true, "S'inscrire")}
</div>
</div>
</form>
</div>
</div>
HTML;
$webPage->appendContent($form);
echo $webPage->toHTML();