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>
|
|
|
48 |
<a href="inscription.php">Inscription</a>
|
|
|
49 |
</li>
|
|
|
50 |
<li>
|
|
|
51 |
<a href="password.php">Changement de mot de passe</a>
|
|
|
52 |
</li>
|
|
|
53 |
<li>
|
|
|
54 |
<a href="reset.php">Réinitialisation de mot de passe</a>
|
|
|
55 |
</li>
|
|
|
56 |
</ul>
|
|
|
57 |
<ul class="nav navbar-nav navbar-right">
|
|
|
58 |
<a href="contact.php" class="navbar-brand">Contact</a>
|
|
|
59 |
<a href="contact.php"><img src="images/organisme.png" width="40"></a>
|
|
|
60 |
</ul>
|
|
|
61 |
</div>
|
|
|
62 |
</div>
|
|
|
63 |
</nav>
|
|
|
64 |
<div class="col-xs-12 col-md-10 col-md-offset-1">
|
|
|
65 |
<!-- HeaderBox -->
|
|
|
66 |
<div class="row banner">
|
|
|
67 |
<!-- Logo box -->
|
|
|
68 |
<div class="hidden-xs col-sm-3 col-md-2 col-lg-2">
|
|
|
69 |
<img class="img-responsive img-A" src="images/organisme.png">
|
|
|
70 |
</div>
|
|
|
71 |
<!-- Title -->
|
|
|
72 |
<div id="cadre_titre" class="titre_banner col-xs-12 col-sm-8">
|
|
|
73 |
<div class="row">
|
|
|
74 |
<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
|
|
|
75 |
</div>
|
|
|
76 |
<!-- <div class="row">
|
|
|
77 |
<?php if (isset($changePasswordMessage)): ?>
|
|
|
78 |
<?= $changePasswordMessage ?>
|
|
|
79 |
<?php endif; ?>
|
|
|
80 |
</div>-->
|
|
|
81 |
</div>
|
|
|
82 |
<!-- Logo box -->
|
|
|
83 |
<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
|
|
|
84 |
<img class="img-responsive img-organisme" src="images/logo-alcasar_70.png">
|
|
|
85 |
</div>
|
|
|
86 |
</div>
|
|
|
87 |
|
|
|
88 |
<section id="inscription" class="row">
|
|
|
89 |
<form name="master" id="contenu_acces" onsubmit="return false;" class="col-xs-12 col-sm-12 col-md-offset-1 col-md-10">
|
|
|
90 |
<div class="row input_row">
|
|
|
91 |
<div class="label_name col-xs-3 col-sm-3 col-md-4">courrier électronique: *</div>
|
|
|
92 |
<div class="col-xs-6 col-sm-6 col-md-4">
|
|
|
93 |
<input type="email" placeholder="User@exemple.com" id="email" name="email" required class="form-control"/>
|
|
|
94 |
</div>
|
|
|
95 |
<small id="output_email" class="row"></small>
|
|
|
96 |
</div>
|
|
|
97 |
<div id="status">
|
|
|
98 |
* Remplir tous les champs obligatoires
|
|
|
99 |
</div>
|
|
|
100 |
<div class="row input_row">
|
|
|
101 |
<div class="col-xs-5 col-xs-offset-1 col-sm-4 col-sm-offset-2">
|
|
|
102 |
<input id="buttons" class="btn btn-default" value="Annuler" onclick="window.location.href = 'index.php';">
|
|
|
103 |
</div>
|
|
|
104 |
<div class="col-xs-5 col-sm-4">
|
|
|
105 |
<button type="submit" class="btn btn-primary btn-lg" id="buttons" >Inscription</button>
|
|
|
106 |
</div>
|
|
|
107 |
</div>
|
|
|
108 |
</form>
|
|
|
109 |
</section>
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
<script type="text/javascript" src="js/jquery.min.js"></script>
|
|
|
113 |
<script>
|
|
|
114 |
$(document).ready(function(){
|
|
|
115 |
$("#contenu_acces input").focus(function(){
|
|
|
116 |
$("#status").fadeOut(800);
|
|
|
117 |
});
|
|
|
118 |
|
|
|
119 |
//Traitement du formulaire d'inscription
|
|
|
120 |
$("#contenu_acces").submit(function(){
|
|
|
121 |
var status = $("#status");
|
|
|
122 |
var Fmail = $("#email").val();
|
|
|
123 |
|
|
|
124 |
$.ajax({
|
|
|
125 |
type: "post",
|
|
|
126 |
url: "inscription_traitement.php",
|
|
|
127 |
data: {
|
|
|
128 |
'Fmail' : Fmail,
|
|
|
129 |
},
|
|
|
130 |
beforeSend: function(){
|
|
|
131 |
$("#status").attr("value", "Traitement en cours...");
|
|
|
132 |
},
|
|
|
133 |
success: function(data){
|
|
|
134 |
if (data.match("success")) {
|
|
|
135 |
status.html(data).fadeIn(400);
|
|
|
136 |
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.")
|
|
|
137 |
document.location.href="index.php";
|
|
|
138 |
} else {
|
|
|
139 |
console.log(data);
|
|
|
140 |
alert("Une erreur s'est produite.\n\nVeuillez renouveler votre inscription, utilisez le formulaire de réinitialisation, ou contactez votre administrateur.");
|
|
|
141 |
status.css("color", "red").html(data).fadeIn(400);
|
|
|
142 |
}
|
|
|
143 |
}
|
|
|
144 |
});
|
|
|
145 |
});
|
|
|
146 |
});
|
|
|
147 |
</script>
|
|
|
148 |
</div>
|
|
|
149 |
</body>
|
|
|
150 |
</html>
|