-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
121 lines (102 loc) · 3.15 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
<?php include('files.php');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" />
<title><?php if (file_exists('title.dat')) {echo unserialize(file_get_contents('title.dat'));}?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="geo.position" content="<?php
if (file_exists('gps.dat')) {
$dat= unserialize(file_get_contents('gps.dat'));
echo htmlspecialchars($dat['lat']).';'.htmlspecialchars($dat['lon']);
}
?>" />
<style type="text/css">
/*<![CDATA[*/
body {
margin-left:3%;
}
h1{
text-align:center;
font-style:italic;
color:rgb(182,00,00);
}
h2{
text-align:center;
font-style:italic;
color:rgb(00,00,00);
}
h3{
margin-left:22%;
font-style:italic;
color:rgb(182,00,00);
}
h4{
display:inline;
font-family:cursive;
color:rgb(182,00,00);
}
div{
color:black;
}
span{
font-family:cursive;
}
.prix{
font-style:bold;
color:red;
}
/*]]>*/
</style>
<style type="text/css">
/*<![CDATA[*/
body.c1 {background-color:rgb(255,255,255);}
/*]]>*/
</style>
</head>
<body class="c1">
<a href="welcome.php">admin</a><div>
<h1><?php if (file_exists('titre.dat')) {echo unserialize(file_get_contents ('titre.dat'));}?></h1>
<h2>
<?php if (file_exists('description.dat')){
$dat=unserialize(file_get_contents ('description.dat'));
echo $dat['horaires'].'<br/>'.$dat['localisation'];
}?>
<?php if (file_exists('livraison.dat')){
echo '<br/>'.unserialize(file_get_contents ('livraison.dat'));
}?>
</h2>
<center><?php if (file_exists('image.dat')) {echo '<img style="width:38%;" src="./'.unserialize(file_get_contents('image.dat')).'"/>';}?></center>
<div>
<?php $produits=unserialize(file_get_contents ('produits.dat'));
$categories=unserialize(file_get_contents ('categories.dat'));
foreach ($categories as $cat){
echo '<h3>'.$cat['nom'].'</h3>';
if (isset($cat['description'])&&$cat['description']!=='') {echo '<em>'.$cat['description'].'</em><br/>';}
if (file_exists('imagecat.dat')){
$imgcat=unserialize(file_get_contents ('imagecat.dat'));
foreach ($imgcat as $myimgcat){
if ($cat['nom']===$myimgcat['categorie']){
$ran=true;
echo '<table><tr><td><img style="width:80%;align:float-left" src="images/'.$myimgcat['categorie']['url'].'"/></td><td>';
}
}
}
foreach ($produits as $prod){
if ($cat['nom']===$prod['categorie']){
echo '<h4>'.$prod['nom'].'</h4> <span>'.$prod['description'].'</span> <span class="prix">'.$prod['prix'].'</span><br/>';
}
}//foreach produit
if ($ran){
echo '</td></tr></table>';
$ran=false;
}
}//foreach categorie
?>
</div>
<div>
<h2><?php if (file_exists('contact.dat')){echo unserialize(file_get_contents('contact.dat')) ;}?></h2>
</div>
Site réalisé avec <a href="https://github.com/shangril/cdccms">CdC CMS</a>
</body>
</html>