-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
142 lines (95 loc) · 3.35 KB
/
index.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
<?php
session_start();
$login_connexion = $_POST['login'];
$password_connexion = $_POST['password'];
if((isset($login_connexion)) && (isset($password_connexion))) {
include('datas.php');
if ((in_array($login_connexion, $login)) && (in_array($password_connexion, $password))) {
$_SESSION['login'] = $login_connexion;
$_SESSION['password'] = $password_connexion;
} else {
}
}
if(isset($_SESSION['login'])) {
echo 'Hello ' .$_SESSION['login']. '';
} else {
echo 'Hello Invité';
}
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Chronoshirt - Online sale website</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="stylesheets/index.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/jquery.bxslider.css" />
</head>
<body class="home">
<div class="left">
<a href="index.php" class="logo"></a>
<nav id="navigation">
<ul class="menu">
<li><a class="active" href="index.php">Home</a></li>
<li><a href="products.php">Products</a></li>
<li><a href="about.php">About us</a></li>
</ul>
</nav>
<br />
<a class="button" href="register.php"><div class="button-register"></div>Register</a><br />
<a class="button" href="connexion.php"><div class="button-connexion"></div>Sign in</a><br />
<a class="button" href="connexion_admin.php"><div class="button-connexion"></div> Backoffice</a><br />
<a class="button" href="cart.php"><div class="button-cart"></div>Your cart</a>
</div>
<section class="wrapper">
<h1 class="h1 center">Welcome on Chronoshirt, the best online website to provide you amazing shirts</h1>
<div class="swaggy">HEY SWAGGY, HERE OUR top 3 SELL OF THE MONTH :</div>
<div class="slider-container">
<ul class="bxslider">
<?php
require('connect.php');
$reponse_best_shirt = $connect->query("SELECT * FROM article WHERE best = '1'");
$z = 1;
while ($donnees_best_shirt = $reponse_best_shirt->fetch()) {
?>
<li class="tshirts tshirt_cat<?php echo $donnees_best_shirt['id_categories']?> item">
<div class="number">#<?php echo $z; ?></div>
<img src="<?php echo $donnees_best_shirt['url'] ?>" width="200" height="215" alt="" />
<form class="add_cart" method="post" action="add_cart.php">
<input type="hidden" name="id" value="<?php echo $donnees_best_shirt['id']; ?>"/>
<input type="hidden" name="name" value="<?php echo $donnees_best_shirt['name']; ?>"/>
<input type="hidden" name="price" value="<?php echo $donnees_best_shirt['price']; ?>"/>
<input type="submit" value="Add to cart"/>
</form>
</li>
<!--$(this).find('').addClass(); pour changer la couleur a chaque fois. -->
<?php
}
$reponse_best_shirt->closeCursor(); // Termine le traitement de la requête
?>
</ul>
</div> <!-- slider container -->
<div class="chronos"></div>
</section>
<!--<footer id="footer">
Copyright
</footer>-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.bxslider.js"></script>
<script>
$(document).ready(function(){
$('.bxslider').bxSlider();
});
</script>
<script>
/*
$t1 = $('.tshirt1');
$t2 = $('.tshirt2');
$t3 = $('.tshirt3');
$t2.hide();
$t3.hide();
*/
</script>
</body>
</html>