This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.php
395 lines (340 loc) · 16.8 KB
/
signup.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<?php
ob_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> H_Z Store · Hajar Zarguan</title>
<meta name="description" content="Zarguan Hajar dev node js project - E-Commerce Bootstrap - express js">
<meta name="keywords" content="H_Z Store, hajar zarguan, Glsid, e-commerce bootstrap project, dev bootstrap , node js template, e-commerce, Zarguan Hajar">
<meta name="author" content="Hajar Zarguan">
<meta NAME="Revisit-After" CONTENT="5 days">
<link rel="shortcut icon" type="image/x-icon" href="favicon.png">
<!-- UI -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" integrity="sha512-aOG0c6nPNzGk+5zjwyJaoRUgCdOrfSDhmMID2u4+OIslr0GjpLKo7Xm0Ao3xmpM4T8AmIouRkqwj1nrdVsLKEQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" integrity="sha512-aOG0c6nPNzGk+5zjwyJaoRUgCdOrfSDhmMID2u4+OIslr0GjpLKo7Xm0Ao3xmpM4T8AmIouRkqwj1nrdVsLKEQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Bootstrap -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/custom.css" rel="stylesheet">
<link href="assets/css/carousel.css" rel="stylesheet">
<link href="assets/css/carousel-recommendation.css" rel="stylesheet">
<link href="assets/ionicons-2.0.1/css/ionicons.css" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Catamaran:400,100,300' rel='stylesheet' type='text/css'>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"> <img src="favicon.png" ></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.php">Accueil</a></li>
<li><a href="catalog.php">Nos produits</a></li>
<li><a href="contacts.php">Contact</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="login.php"> <i class="ion-android-person"></i>Authentification</a></li>
<li class="active"><a href="signup.php">Inscription</a></li>
</ul>
</div>
</div>
</nav>
<hr class="offset-lg hidden-xs">
<hr class="offset-md">
<div class="container">
<div class="row">
<div class="col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4 md-padding">
<h1 class="align-center">Nouveau client </h1>
<br>
<form class="join" aaction="inscription_action.php" method="post" enctype="multipart/form-data">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<input type="text" name="username" value="" placeholder="nom d'utilisateur" required="" class="form-control" /><br>
</div>
<div class="col-sm-12">
<input type="text" name="full_name" value="" placeholder="nom complet" required="" class="form-control" /><br>
</div>
<div class="col-sm-12">
<input type="text" name="telephone" value="" placeholder="telephone" required="" class="form-control" /><br>
</div>
<div class="col-sm-12">
<input type="email" name="email" value="" placeholder="E-mail" required="" class="form-control" /><br>
</div>
<div class="col-sm-12">
<input type="date" name="date_naissance" value="" placeholder="date de naissance" required="" class="form-control" /><br>
</div>
<div class="col-sm-12">
<input type="password" name="password" value="" placeholder="Password" required="" class="form-control" /><br>
</div>
<div class="col-sm-12">
<input type="password" name="password_confirmation" value="" placeholder="Confirm Password" required="" class="form-control" /><br>
</div>
</div>
</div>
<br>
<button type="submit" class="btn btn-primary" name="enregistrer"> rejogner nous gratuitement </button>
<a href="#" class="xs-margin">vous avez déja un compte ? se connecter ici></a>
<br><br>
<p>
En créant un compte, vous pourrez faire vos achats plus rapidement, être au courant de l'état d'une commande et suivre les commandes que vous avez déjà passées. </p>
</form>
<br class="hidden-sm hidden-md hidden-lg">
</div>
</div>
</div>
<?php
if (isset($_POST["enregistrer"])) {
$username = trim($_POST["username"]);
$email = trim($_POST["email"]);
$password = trim($_POST["password"]);
$passwordconfirmation = trim($_POST["password_confirmation"]);
if ($password == $passwordconfirmation) {
if (!$connect = mysqli_connect("localhost", "root", "")) {
exit("Desolé, Connexion a localhost impossible");
}
if (!mysqli_select_db($connect, "newbdd")) {
exit("Desolé, l'acces a la base site_bd impossible");
}
$reg = mysqli_query($connect, "SELECT * From utilisateur WHERE EMAIL='$email'");
$rows = mysqli_num_rows($reg);
if ($rows == 0) {
$query = "INSERT INTO utilisateur (USERNAME, EMAIL, PASSWD) VALUES ('$username', '$email', '$password')";
$result = mysqli_query($connect, $query);
echo "<script> window.location.replace(\"login.php\"); </script>";
exit;
} else {
echo "<br><span style=\" font-weight:bold; color:red;\">Ce email deja inscrit</span>";
}
} else {
echo "<br><span style=\" font-weight:bold; color:red;\">les mots de passe ne sont pas identique</span>";
}
}
?>
<br><br>
<hr class="hidden-xs">
<br class="hidden-xs">
<br class="hidden-xs">
<footer>
<div class="about">
<div class="container">
<div class="row">
<hr class="offset-md">
<div class="col-xs-6 col-sm-4" style="padding-left: 220px;">
<div class="item">
<i class="ion-ios-telephone-outline"></i>
<h1>24/7 support<br> <span>gratuit</span></h1>
</div>
</div>
<div class="col-xs-6 col-sm-4 " style="padding-left :100px;" >
<div class="item">
<i class="ion-ios-star-outline"></i>
<h1>Des prix <br><span> raisonnables</span></h1>
</div>
</div>
<div class="col-xs-6 col-sm-4" >
<div class="item">
<i class="ion-ios-loop"></i>
<h1> Remboursement intégral <br> <span>garantie</span> </h1>
</div>
</div>
<hr class="offset-md">
</div>
</div>
</div>
<div class="subscribe">
<div class="container align-center">
<hr class="offset-md">
<h1 class="h3 upp">Rejoignez notre newsletter</h1>
<p>Obtenez plus d'informations et recevez des remises spéciales sur nos produits.</p>
<hr class="offset-sm">
<form action="index.php" method="post">
<div class="input-group">
<input type="email" name="email" value="" placeholder="E-mail" required="" class="form-control">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary"> S'abonner <i class="ion-android-send"></i> </button>
</span>
</div><!-- /input-group -->
</form>
<hr class="offset-lg">
<hr class="offset-md">
<div class="social">
<a href="#"><i class="ion-social-facebook"></i></a>
<a href="#"><i class="ion-social-twitter"></i></a>
<a href="#"><i class="ion-social-googleplus-outline"></i></a>
<a href="#"><i class="ion-social-instagram-outline"></i></a>
<a href="#"><i class="ion-social-linkedin-outline"></i></a>
<a href="#"><i class="ion-social-youtube-outline"></i></a>
</div>
<hr class="offset-md">
<hr class="offset-md">
</div>
</div>
<div class="container">
<hr class="offset-md">
<div class="row menu">
<div class="col-sm-3 col-md-2">
<h1 class="h4">Information <i class="ion-plus-round hidden-sm hidden-md hidden-lg"></i> </h1>
<div class="list-group">
<a href="#" class="list-group-item">apropos</a>
<a href="#" class="list-group-item">Terms</a>
<a href="#" class="list-group-item">livraison</a>
</div>
</div>
<div class="col-sm-3 col-md-2">
<h1 class="h4">Products <i class="ion-plus-round hidden-sm hidden-md hidden-lg"></i> </h1>
<div class="list-group">
<a href="#" class="list-group-item">Ordinateurs portables</a>
<a href="#" class="list-group-item">Tablettes</a>
<a href="#" class="list-group-item">Serveurs</a>
</div>
</div>
<div class="col-sm-3 col-md-2">
<h1 class="h4">Support <i class="ion-plus-round hidden-sm hidden-md hidden-lg"></i> </h1>
<div class="list-group">
<a href="#" class="list-group-item">Returns</a>
<a href="#" class="list-group-item">FAQ</a>
<a href="contacts.html" class="list-group-item">Contacts</a>
</div>
</div>
<div class="col-sm-3 col-md-3 col-md-offset-1 align-right hidden-sm hidden-xs">
<h1 class="h4">HZ STORE, </h1>
<address>
Casablanca Suite 800<br>
<abbr title="Phone">P:</abbr> +212 615 88 50 41
</address>
<address>
<strong>Support</strong><br>
<a href="mailto:#">h.zarguan_etu@enset-media.ac.ma</a>
</address>
</div>
</div>
</div>
<hr>
<div class="container">
<div class="row">
<div class="col-sm-8 col-md-9 payments">
<p>Payez votre commande de la manière la plus pratique</p>
<div class="payment-icons">
<img src="assets/img/payments/paypal.svg" alt="paypal">
<img src="assets/img/payments/visa.svg" alt="visa">
<img src="assets/img/payments/master-card.svg" alt="mc">
<img src="assets/img/payments/discover.svg" alt="discover">
<img src="assets/img/payments/american-express.svg" alt="ae">
</div>
<br>
</div>
</div>
</div>
</footer>
<!-- Modal -->
<div class="modal fade" id="Modal-SignIn" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><i class="ion-android-close"></i></span></button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<h4 class="modal-title">Rejoignez nous gratuitement</h4>
<br>
<form class="join" action="index.php" method="post">
<input type="email" name="email" value="" placeholder="E-mail" required="" class="form-control" />
<br>
<input type="password" name="password" value="" placeholder="Password" required="" class="form-control" />
<br>
<button type="submit" class="btn btn-primary btn-sm">Join</button>
<a href="#">Terms ></a>
<br><br>
<p>
En créant un compte, vous pourrez faire vos achats plus rapidement, être au courant de l'état d'une commande et suivre les commandes que vous avez déjà passées. </p>
</form>
</div>
<div class="col-sm-6">
<h4 class="modal-title">s'inscrire</h4>
<br>
<form class="signin" action="index.php" method="post">
<input type="email" name="email" value="" placeholder="E-mail" required="" class="form-control" />
<br>
<input type="password" name="password" value="" placeholder="Password" required="" class="form-control" />
<br>
<button type="submit" class="btn btn-primary btn-sm">s'inscrire</button>
<a href="#forgin-password" data-action="Forgot-Password">mot de passe oublier ?? ></a>
</form>
</div>
</div>
</div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<div class="modal fade" id="Modal-ForgotPassword" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><i class="ion-android-close"></i></span></button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<h4 class="modal-title">mot de passe oublier?</h4>
<br>
<form class="join" action="index.php" method="post">
<input type="email" name="email" value="" placeholder="E-mail" required="" class="form-control" />
<br>
<button type="submit" class="btn btn-primary btn-sm">Continue</button>
<a href="#Sign-In" data-action="Sign-In">Back ></a>
</form>
</div>
<div class="col-sm-6">
<br><br>
<p>
Saisissez l'adresse e-mail associée à votre compte. Cliquez sur Soumettre pour que votre mot de passe vous soit envoyé par e-mail. </p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<div class="modal fade" id="Modal-Gallery" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><i class="ion-android-close"></i></span></button>
<h4 class="modal-title">titre</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="assets/js/jquery-latest.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/core.js"></script>
<script src="assets/js/catalog.js"></script>
<script type="text/javascript" src="assets/js/jquery-ui-1.11.4.js"></script>
<script type="text/javascript" src="assets/js/jquery.ui.touch-punch.js"></script>
</body>
</html>