-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
204 lines (199 loc) · 9.49 KB
/
header.php
File metadata and controls
204 lines (199 loc) · 9.49 KB
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
<?php
setlocale (LC_TIME, 'fr_FR.utf8','fra');
error_reporting(0);
$page = array( "Accueil" => 0, "Catalogue" => 1, "Bibliotheque" => 2, "Support" => 3, "Inscription" => 4, "Connexion" => 5, "Profil" => 6, "PageJeu" => 7 ,"Boutique" => 8,"VerifMail" => 9,"Amis" => 10,"NotFound" => 11,"Message" => 12,"MotDePasseOublier"=> 13);
$URI=explode(".",explode("?",explode("/",$_SERVER['REQUEST_URI'])[2])[0])[0];
if(isset($page[$URI])){
$header=$page[$URI];
}
?>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="Public/Images/icon/logo.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="Public/Images/icon/logo.ico" type="image/x-icon"/>
<title>
Skygame
<?php
if((isset($header) && $header!=7 && $header!=6) || !isset($header)){
echo ' - '.$URI;
}else{
if($header==7 && isset($game)){
echo ' - '.$game[0]->name;
}
if($header==6 && $profil!=false){
echo ' - '.$profil['pseudo'];
}
}
?></title>
<link rel="stylesheet" type="text/css" href="Public/css/General.css">
<?php
if(isset($page[$URI])){
echo '<link rel="stylesheet" type="text/css" href="Public/css/'.$URI.'.css">';
}
?>
</head>
<body>
<?php
if(isset($user['idUtilisateur']) && $user['verifMail'] == 1){
echo '<div class="skycoin">
<span class="coin">'.$user['skyCoin'].'<img src="Public/Images/icon/skyCoin.png" alt="Skycoin"></span>
</div>';
}
?>
<nav class="sidebar close">
<header>
<div class="image-text" style ="margin-bottom:20px;">
<span class="image">
<img src="Public/Images/icon/logo.png" alt="Logo Skygame">
</span>
<button><img src="Public/Images/icon/hamburger.png"></button>
<div class="text logo-text">
<span class="name" style="font-family:RaceSportFree;font-size:21px;">Skygame</span>
</div>
</div>
<?php
if(isset($user['idUtilisateur']) && $user['verifMail'] == 1){
echo '<div id="profil-box" class="image-text">
<span class="image">
<img src="Public/Images/profil/';
imgProfil($user);
echo '.jpg" alt="Photo de Profil">
</span>';
echo '<div class="text logo-text">
<span class="name">'.$user['pseudo'].'</span>
<span class="coin"><img src="Public/Images/icon/skyCoin.png" alt="Bouton Skycoin"> '.$user['skyCoin'].' Skycoin</span>
</div>
</div>';
}
?>
<i class='bx toggle'><img src="Public/Images/icon/arrow.png" alt="Bouton Fléche"></i>
</header>
<div class="menu-bar">
<div class="menu">
<ul class="menu-links">
<li class="nav-link" <?php
if(isset($header) && $header==0){
echo 'id="active"';
}
?>>
<a href="index.php">
<i class='bx icon' ><img width="35px" src="Public/Images/icon/home.png" alt="Bouton Accueil"></i>
<span class="text nav-text">Accueil</span>
</a>
</li>
<li class="nav-link" <?php
if(isset($header) && $header==1){
echo 'id="active"';
}
?>>
<a href="Catalogue.php">
<i class='bx icon' ><img width="35px" src="Public/Images/icon/catalogue.png" alt="Bouton Catalogue")></i>
<span class="text nav-text">Catalogue</span>
</a>
</li>
<?php
if(isset($_SESSION['idUtilisateur']) && $user['verifMail']==1){
echo '<li class="nav-link"';
if(isset($header) && $header==2){
echo 'id="active"';
}
echo '>
<a href="Bibliotheque.php"><i class="bx icon" ><img width="35px" src="Public/Images/icon/bibliotheque.png" alt="Bouton Bibliothèque"></i>
<span class="text nav-text">Bibliotheque</span>
</a>
</li>';
echo '<li class="nav-link"';
if(isset($header) && $header==10){
echo 'id="active"';
}
echo '>
<a href="Amis.php"><i class="bx icon" ><img width="35px" src="Public/Images/icon/amis.png" alt="Bouton Amis"></i>
<span class="text nav-text">Amis</span>
</a>
</li>';
echo '<li class="nav-link"';
if(isset($header) && $header==12){
echo 'id="active"';
}
echo '>
<a href="Message.php"><i class="bx icon" ><img width="35px" src="Public/Images/icon/messages.png" alt="Bouton Messages"></i>
<span class="text nav-text">Messages</span>
</a>
</li>';
echo '<li class="nav-link"';
if(isset($header) && $header==8){
echo 'id="active"';
}
echo '>
<a href="Boutique.php"><i class="bx icon" ><img width="35px" src="Public/Images/icon/skyCoin.png" alt="Bouton Boutique"></i>
<span class="text nav-text">Skycoin</span>
</a>
</li>';
}
?>
<li class="nav-link" <?php
if(isset($header) && $header==3){
echo 'id="active"';
}
?>>
<a href="Support.php">
<i class='bx icon' ><img width="35px" src="Public/Images/icon/support.png" alt="Bouton Support"></i>
<span class="text nav-text">Support</span>
</a>
</li>
</ul>
</div>
<?php
if(isset($user['idUtilisateur']) && $user['verifMail']==1){
if(!isset($_SESSION['chargement'])){
$_SESSION['chargement']='deconnexion';
}
echo '<div style="margin-bottom:20px;" class="bottom-content">
<li ';
if(isset($header) && $header==6 && $_SESSION['idUtilisateur']==$_GET['idUtilisateur']){
echo 'id="active"';
}
echo '>
<a href="Profil.php?idUtilisateur='.$user['idUtilisateur'].'">
<i class="bx icon"><img style="border-radius:10px;" width="35px" src="Public/Images/profil/';
imgProfil($user);
echo '.jpg" alt="Bouton profil"></i>
<span class="text logo-text">Mon Profil</span>
</a>
</li>
<li>
<a href="Chargement.php">
<i class="bx icon"><img width="35px"src="Public/Images/icon/deconnection.png" alt="Buuton Deconnexion"></i>
<span class="text logo-text">Deconnexion</span>
</a>
</li>
</div>';
}else{
echo '<div class="bottom-content">
<li ';
if(isset($header) && $header==4){
echo 'id="active"';
}
echo '>
<a href="Inscription.php">
<i class="bx icon"><img style="border-radius:10px;" width="35px" src="Public/Images/icon/inscription.png" alt="Bouton Inscription"></i>
<span class="text nav-text">Inscription</span>
</a>
</li>
<li ';
if(isset($header) && $header==5){
echo 'id="active"';
}
echo '>
<a href="Connexion.php">
<i class="bx icon"><img width="35px"src="Public/Images/icon/connexion.png" alt="Bouton Connexion"></i>
<span class="text nav-text">Connexion</span>
</a>
</li>
</div>';
}
?>
</div>
</nav>