2990 |
rexy |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/********************************************************************
|
|
|
4 |
* *
|
|
|
5 |
* ALCASAR EMAIL INSCRIPTION *
|
|
|
6 |
* *
|
3011 |
rexy |
7 |
* By K@M3L & T3RRY @ La Plateforme_ *
|
2990 |
rexy |
8 |
* *
|
|
|
9 |
* Partie front de la page d'inscription des utilisateurs *
|
|
|
10 |
* elle envoi les infos à traiter à la page de traitement *
|
3009 |
rexy |
11 |
* via AJAX (email_registration_back) *
|
2990 |
rexy |
12 |
* *
|
|
|
13 |
/********************************************************************/
|
|
|
14 |
|
3003 |
rexy |
15 |
$Language = 'en';
|
|
|
16 |
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
|
|
17 |
$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
|
|
18 |
$Language = strtolower(substr(chop($Langue[0]), 0, 2));
|
|
|
19 |
}
|
3011 |
rexy |
20 |
if ($Language === 'fr') {
|
3009 |
rexy |
21 |
$l_home = " Accueil";
|
3003 |
rexy |
22 |
$l_title = "Inscription par Email";
|
|
|
23 |
$l_login = "Connexion";
|
3009 |
rexy |
24 |
$l_Email = "Adresse électronique: *";
|
|
|
25 |
$l_mandatory = "* Remplir tous les champs obligatoires";
|
3011 |
rexy |
26 |
} else {
|
3009 |
rexy |
27 |
$l_home = " Home";
|
|
|
28 |
$l_title = "Email inscription";
|
3003 |
rexy |
29 |
$l_login = "Login";
|
3009 |
rexy |
30 |
$l_Email = "Email address: *";
|
|
|
31 |
$l_mandatory = "* Fill in all mandatory fields";
|
3003 |
rexy |
32 |
}
|
2990 |
rexy |
33 |
?>
|
|
|
34 |
<!DOCTYPE html>
|
|
|
35 |
<html>
|
|
|
36 |
<head>
|
|
|
37 |
<meta charset="UTF-8">
|
|
|
38 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
39 |
<title>ALCASAR - <?=$l_title ?></title>
|
|
|
40 |
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
|
|
|
41 |
<link rel="stylesheet" type="text/css" href="css/pass.css">
|
|
|
42 |
<link rel="icon" href="images/favicon-48.ico" type="image/ico">
|
|
|
43 |
<script type="text/javascript" src="js/jquery.min.js"></script>
|
|
|
44 |
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
|
|
45 |
</head>
|
|
|
46 |
<body>
|
|
|
47 |
<nav class="navbar navbar navbar-inverse" style="margin-bottom:0px;">
|
|
|
48 |
<div class="container-fluid">
|
|
|
49 |
<div class="navbar-header">
|
3009 |
rexy |
50 |
<a href="index.php"><img src="images/logo-alcasar_70.png" width="50" ><font color=red><b><?=$l_home ?></b></font></a>
|
2990 |
rexy |
51 |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
|
|
52 |
<span class="sr-only">Toggle navigation</span>
|
|
|
53 |
<span class="icon-bar"></span>
|
|
|
54 |
<span class="icon-bar"></span>
|
|
|
55 |
<span class="icon-bar"></span>
|
|
|
56 |
</button>
|
|
|
57 |
</div>
|
|
|
58 |
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
|
|
59 |
<ul class="nav navbar-nav">
|
|
|
60 |
<li>
|
3003 |
rexy |
61 |
<a href="index.php?url=www.euronews.com"><?=$l_login ?></a>
|
2990 |
rexy |
62 |
</li>
|
|
|
63 |
<li>
|
3003 |
rexy |
64 |
<a href="email_registration_front.php"><?=$l_title ?></a>
|
2990 |
rexy |
65 |
</li>
|
|
|
66 |
</ul>
|
|
|
67 |
<ul class="nav navbar-nav navbar-right">
|
|
|
68 |
<a href="contact.php" class="navbar-brand">Contact</a>
|
|
|
69 |
<a href="contact.php"><img src="images/organisme.png" width="40"></a>
|
|
|
70 |
</ul>
|
|
|
71 |
</div>
|
|
|
72 |
</div>
|
|
|
73 |
</nav>
|
|
|
74 |
<div class="col-xs-12 col-md-10 col-md-offset-1">
|
|
|
75 |
<!-- HeaderBox -->
|
|
|
76 |
<div class="row banner">
|
|
|
77 |
<!-- Logo box -->
|
|
|
78 |
<div class="hidden-xs col-sm-3 col-md-2 col-lg-2">
|
|
|
79 |
<img class="img-responsive img-A" src="images/organisme.png">
|
|
|
80 |
</div>
|
|
|
81 |
<!-- Title -->
|
|
|
82 |
<div id="cadre_titre" class="titre_banner col-xs-12 col-sm-8">
|
|
|
83 |
<div class="row">
|
|
|
84 |
<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
|
|
|
85 |
</div>
|
|
|
86 |
<!-- <div class="row">
|
|
|
87 |
<?php if (isset($changePasswordMessage)): ?>
|
|
|
88 |
<?= $changePasswordMessage ?>
|
|
|
89 |
<?php endif; ?>
|
|
|
90 |
</div>-->
|
|
|
91 |
</div>
|
|
|
92 |
<!-- Logo box -->
|
|
|
93 |
<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
|
|
|
94 |
<img class="img-responsive img-organisme" src="images/logo-alcasar_70.png">
|
|
|
95 |
</div>
|
|
|
96 |
</div>
|
|
|
97 |
|
|
|
98 |
<section id="inscription" class="row">
|
|
|
99 |
<form name="master" id="contenu_acces" onsubmit="return false;" class="col-xs-12 col-sm-12 col-md-offset-1 col-md-10">
|
|
|
100 |
<div class="row input_row">
|
3009 |
rexy |
101 |
<div class="label_name col-xs-3 col-sm-3 col-md-4"><?=$l_Email?></div>
|
2990 |
rexy |
102 |
<div class="col-xs-6 col-sm-6 col-md-4">
|
|
|
103 |
<input type="email" placeholder="User@exemple.com" id="email" name="email" required class="form-control"/>
|
|
|
104 |
</div>
|
|
|
105 |
<small id="output_email" class="row"></small>
|
|
|
106 |
</div>
|
|
|
107 |
<div id="status">
|
3009 |
rexy |
108 |
<?=$l_mandatory?>
|
2990 |
rexy |
109 |
</div>
|
|
|
110 |
<div class="row input_row">
|
|
|
111 |
<div class="col-xs-5 col-xs-offset-1 col-sm-4 col-sm-offset-2">
|
|
|
112 |
<input id="buttons" class="btn btn-default" value="Annuler" onclick="window.location.href = 'index.php';">
|
|
|
113 |
</div>
|
|
|
114 |
<div class="col-xs-5 col-sm-4">
|
|
|
115 |
<button type="submit" class="btn btn-primary btn-lg" id="buttons" >Inscription</button>
|
|
|
116 |
</div>
|
|
|
117 |
</div>
|
|
|
118 |
</form>
|
|
|
119 |
</section>
|
|
|
120 |
|
|
|
121 |
<script type="text/javascript" src="js/jquery.min.js"></script>
|
|
|
122 |
<script>
|
|
|
123 |
$(document).ready(function(){
|
|
|
124 |
$("#contenu_acces input").focus(function(){
|
|
|
125 |
$("#status").fadeOut(800);
|
|
|
126 |
});
|
|
|
127 |
|
|
|
128 |
//Traitement du formulaire d'inscription
|
|
|
129 |
$("#contenu_acces").submit(function(){
|
|
|
130 |
var status = $("#status");
|
|
|
131 |
var Fmail = $("#email").val();
|
|
|
132 |
|
|
|
133 |
$.ajax({
|
|
|
134 |
type: "post",
|
3009 |
rexy |
135 |
url: "email_registration_back.php",
|
2990 |
rexy |
136 |
data: {
|
|
|
137 |
'Fmail' : Fmail,
|
|
|
138 |
},
|
|
|
139 |
beforeSend: function(){
|
|
|
140 |
$("#status").attr("value", "Traitement en cours...");
|
|
|
141 |
},
|
|
|
142 |
success: function(data){
|
|
|
143 |
if (data.match("success")) {
|
|
|
144 |
status.html(data).fadeIn(400);
|
3009 |
rexy |
145 |
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 contactez votre administrateur.")
|
2990 |
rexy |
146 |
document.location.href="index.php";
|
|
|
147 |
} else {
|
|
|
148 |
console.log(data);
|
3009 |
rexy |
149 |
alert("Une erreur s'est produite.\n\nVeuillez renouveler votre inscription ou contactez votre administrateur.");
|
2990 |
rexy |
150 |
status.css("color", "red").html(data).fadeIn(400);
|
|
|
151 |
}
|
|
|
152 |
}
|
|
|
153 |
});
|
|
|
154 |
});
|
|
|
155 |
});
|
|
|
156 |
</script>
|
|
|
157 |
</div>
|
|
|
158 |
</body>
|
|
|
159 |
</html>
|