2990 |
rexy |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/********************************************************************
|
|
|
4 |
* *
|
|
|
5 |
* ALCASAR EMAIL INSCRIPTION *
|
|
|
6 |
* *
|
|
|
7 |
* By K@M3L 1101130512.1901090409 & T3RRY @ La Plateforme_ *
|
|
|
8 |
* V 1.0 June 2021. *
|
|
|
9 |
* *
|
|
|
10 |
* Partie front de la page d'inscription des utilisateurs *
|
|
|
11 |
* elle envoi les infos à traiter à la page de traitement *
|
|
|
12 |
* via AJAX. *
|
|
|
13 |
* *
|
|
|
14 |
/********************************************************************/
|
|
|
15 |
|
|
|
16 |
$l_title = "Inscription";
|
|
|
17 |
?>
|
|
|
18 |
<!DOCTYPE html>
|
|
|
19 |
<html>
|
|
|
20 |
<head>
|
|
|
21 |
<meta charset="UTF-8">
|
|
|
22 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
23 |
<title>ALCASAR - <?=$l_title ?></title>
|
|
|
24 |
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
|
|
|
25 |
<link rel="stylesheet" type="text/css" href="css/pass.css">
|
|
|
26 |
<link rel="icon" href="images/favicon-48.ico" type="image/ico">
|
|
|
27 |
<script type="text/javascript" src="js/jquery.min.js"></script>
|
|
|
28 |
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
|
|
29 |
</head>
|
|
|
30 |
<body>
|
|
|
31 |
<nav class="navbar navbar navbar-inverse" style="margin-bottom:0px;">
|
|
|
32 |
<div class="container-fluid">
|
|
|
33 |
<div class="navbar-header">
|
|
|
34 |
<a href="index.php"><img src="images/logo-alcasar_70.png" width="50" ><font color=red><b> ALCASAR Accueil</b></font></a>
|
|
|
35 |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
|
|
36 |
<span class="sr-only">Toggle navigation</span>
|
|
|
37 |
<span class="icon-bar"></span>
|
|
|
38 |
<span class="icon-bar"></span>
|
|
|
39 |
<span class="icon-bar"></span>
|
|
|
40 |
</button>
|
|
|
41 |
</div>
|
|
|
42 |
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
|
|
43 |
<ul class="nav navbar-nav">
|
|
|
44 |
<li>
|
|
|
45 |
<a href="index.php?url=www.euronews.com">Login</a>
|
|
|
46 |
</li>
|
|
|
47 |
<li>
|
2992 |
rexy |
48 |
<a href="mail_registration_front.php">Inscription</a>
|
2990 |
rexy |
49 |
</li>
|
|
|
50 |
<li>
|
|
|
51 |
<a href="password.php">Changement de mot de passe</a>
|
|
|
52 |
</li>
|
|
|
53 |
</ul>
|
|
|
54 |
<ul class="nav navbar-nav navbar-right">
|
|
|
55 |
<a href="contact.php" class="navbar-brand">Contact</a>
|
|
|
56 |
<a href="contact.php"><img src="images/organisme.png" width="40"></a>
|
|
|
57 |
</ul>
|
|
|
58 |
</div>
|
|
|
59 |
</div>
|
|
|
60 |
</nav>
|
|
|
61 |
<div class="col-xs-12 col-md-10 col-md-offset-1">
|
|
|
62 |
<!-- HeaderBox -->
|
|
|
63 |
<div class="row banner">
|
|
|
64 |
<!-- Logo box -->
|
|
|
65 |
<div class="hidden-xs col-sm-3 col-md-2 col-lg-2">
|
|
|
66 |
<img class="img-responsive img-A" src="images/organisme.png">
|
|
|
67 |
</div>
|
|
|
68 |
<!-- Title -->
|
|
|
69 |
<div id="cadre_titre" class="titre_banner col-xs-12 col-sm-8">
|
|
|
70 |
<div class="row">
|
|
|
71 |
<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
|
|
|
72 |
</div>
|
|
|
73 |
<!-- <div class="row">
|
|
|
74 |
<?php if (isset($changePasswordMessage)): ?>
|
|
|
75 |
<?= $changePasswordMessage ?>
|
|
|
76 |
<?php endif; ?>
|
|
|
77 |
</div>-->
|
|
|
78 |
</div>
|
|
|
79 |
<!-- Logo box -->
|
|
|
80 |
<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
|
|
|
81 |
<img class="img-responsive img-organisme" src="images/logo-alcasar_70.png">
|
|
|
82 |
</div>
|
|
|
83 |
</div>
|
|
|
84 |
|
|
|
85 |
<section id="inscription" class="row">
|
|
|
86 |
<form name="master" id="contenu_acces" onsubmit="return false;" class="col-xs-12 col-sm-12 col-md-offset-1 col-md-10">
|
|
|
87 |
<div class="row input_row">
|
|
|
88 |
<div class="label_name col-xs-3 col-sm-3 col-md-4">courrier électronique: *</div>
|
|
|
89 |
<div class="col-xs-6 col-sm-6 col-md-4">
|
|
|
90 |
<input type="email" placeholder="User@exemple.com" id="email" name="email" required class="form-control"/>
|
|
|
91 |
</div>
|
|
|
92 |
<small id="output_email" class="row"></small>
|
|
|
93 |
</div>
|
|
|
94 |
<div id="status">
|
|
|
95 |
* Remplir tous les champs obligatoires
|
|
|
96 |
</div>
|
|
|
97 |
<div class="row input_row">
|
|
|
98 |
<div class="col-xs-5 col-xs-offset-1 col-sm-4 col-sm-offset-2">
|
|
|
99 |
<input id="buttons" class="btn btn-default" value="Annuler" onclick="window.location.href = 'index.php';">
|
|
|
100 |
</div>
|
|
|
101 |
<div class="col-xs-5 col-sm-4">
|
|
|
102 |
<button type="submit" class="btn btn-primary btn-lg" id="buttons" >Inscription</button>
|
|
|
103 |
</div>
|
|
|
104 |
</div>
|
|
|
105 |
</form>
|
|
|
106 |
</section>
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
<script type="text/javascript" src="js/jquery.min.js"></script>
|
|
|
110 |
<script>
|
|
|
111 |
$(document).ready(function(){
|
|
|
112 |
$("#contenu_acces input").focus(function(){
|
|
|
113 |
$("#status").fadeOut(800);
|
|
|
114 |
});
|
|
|
115 |
|
|
|
116 |
//Traitement du formulaire d'inscription
|
|
|
117 |
$("#contenu_acces").submit(function(){
|
|
|
118 |
var status = $("#status");
|
|
|
119 |
var Fmail = $("#email").val();
|
|
|
120 |
|
|
|
121 |
$.ajax({
|
|
|
122 |
type: "post",
|
2992 |
rexy |
123 |
url: "mail_registration_back.php",
|
2990 |
rexy |
124 |
data: {
|
|
|
125 |
'Fmail' : Fmail,
|
|
|
126 |
},
|
|
|
127 |
beforeSend: function(){
|
|
|
128 |
$("#status").attr("value", "Traitement en cours...");
|
|
|
129 |
},
|
|
|
130 |
success: function(data){
|
|
|
131 |
if (data.match("success")) {
|
|
|
132 |
status.html(data).fadeIn(400);
|
|
|
133 |
alert("Encore une dernière étape!\n\nUn mot de passe temporaire vient de vous être envoyé à votre adresse électronique.\n Veuillez changer votre mot de passe.\n\n(Pensez à vérifier vos spams ou courriers indésirables, si vous ne voyez pas ce mail dans votre boîte de réception).\n\nSi vous ne recevez pas le mail dans les 24 heures, utilisez le formulaire de réinitialisation, ou contactez votre administrateur.")
|
|
|
134 |
document.location.href="index.php";
|
|
|
135 |
} else {
|
|
|
136 |
console.log(data);
|
|
|
137 |
alert("Une erreur s'est produite.\n\nVeuillez renouveler votre inscription, utilisez le formulaire de réinitialisation, ou contactez votre administrateur.");
|
|
|
138 |
status.css("color", "red").html(data).fadeIn(400);
|
|
|
139 |
}
|
|
|
140 |
}
|
|
|
141 |
});
|
|
|
142 |
});
|
|
|
143 |
});
|
|
|
144 |
</script>
|
|
|
145 |
</div>
|
|
|
146 |
</body>
|
|
|
147 |
</html>
|