-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
139 lines (135 loc) · 3.72 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
<?php
session_start();
if(isset($_GET['deconnexion']))
{
if($_GET['deconnexion']==true)
{
session_unset();
header("location:index.php");
}
}
include('fonction.php');
$dprod=sql("SELECT * FROM `produits` ORDER BY id DESC LIMIT 5");
$dtel=sql("SELECT * FROM `produits` WHERE categorie = 'Téléphone' ORDER BY id DESC LIMIT 5 ");
$dacc=sql("SELECT * FROM `produits` WHERE categorie ='Accessoire' ORDER BY id DESC LIMIT 5 ");
// var_dump($dprod);
?>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Accueil</title>
</head>
<body id="body-ind" class="">
<header class="">
<?php
include("bar-nav.php");
?>
</header>
<main id="main-ind" >
<?php
if (isset($_SESSION['login'])==false)
{
echo "<h3>Connectez vous et commandez maintenant</h3>";
}
elseif(isset($_SESSION['login'])==true)
{
if($_SESSION['login'] =="admin")
{
$user = $_SESSION['login'];
echo "<h3><b>Bonjour $user, vous êtes connecté.</b></h3>";
}
else
{
$user = $_SESSION['login'];
echo "<h3><b>Bonjour $user, vous êtes connecté vous pouvez commandez maintenant.</b></h3>";
}
}
?>
<section id="first-sec">
<h>Bienvenue sur Mobileshop</h>
<p>En gammel manns mani
Jeg ble vant til det
For å pynte på ensomheten min med aksentene til denne sangen
Når jeg tenker på Fernande
Jeg bånd, jeg bånd
Når jeg tenker på Félicie så bandasje jeg også
Når jeg tenker på Leonore
Herregud, jeg band fremdeles
Men når jeg tenker på Lulu
Jeg er ikke i bandasje lenger
Pappasbandasjen, den kan ikke bestilles
Det er denne mannlige avståelsen
Denne virile antifonen
Det høres ut i porthuset
Valiant vakthold
Når jeg tenker på Fernande
Jeg bånd, jeg bånd
Når jeg tenker på Félicie så bandasje jeg også
Når jeg tenker på Leonore
Herregud, jeg band fremdeles
Men når jeg tenker på Lulu
Jeg er ikke i bandasje lenger
Pappasbandasjen, den kan ikke bestilles
</p>
</section>
<article class="art-ind">
<h1>Dernier produits :</h1>
<section class="sec-ind">
<?php
foreach ($dprod as $p)
{
?>
<div class="div-ind">
<b><?=$p[1]?></b>
<img src="<?=$p[7]?>">
<p>Prix : <?=$p[3]?>€</p>
<a href="produit.php?id=<?=$p[0]?>">Voir plus</a>
</div>
<?php
}
?>
</section>
</article>
<article class="art-ind">
<h1>Dernier telephone :</h1>
<section class="sec-ind">
<?php
foreach ($dtel as $t)
{
?>
<div class="div-ind">
<b><?=$t[1]?></b>
<img src="<?=$t[7]?>">
<p>Prix : <?=$t[3]?>€</p>
<a href="produit.php?id=<?=$t[0]?>">Voir plus</a>
</div>
<?php
}
?>
</section>
</article>
<article class="art-ind">
<h1>Dernier accessoire :</h1>
<section class="sec-ind">
<?php
foreach ($dacc as $a)
{
?>
<div class="div-ind">
<b><?=$a[1]?></b>
<img src="<?=$a[7]?>">
<p>Prix : <?=$a[3]?>€</p>
<a href="produit.php?id=<?=$a[0]?>">Voir plus</a>
</div>
<?php
}
?>
</section>
</article>
</main>
<footer class="footer">
<aside id="Copyright"><p> Copyright 2020 Coding School | All Rights Reserved | Project by Mohamed & Etienne.</p></aside>
</footer>
</body>
</html>