-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.php
More file actions
95 lines (83 loc) · 3.04 KB
/
Copy pathindex.php
File metadata and controls
95 lines (83 loc) · 3.04 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
<?php
/**
Copyright (C) 2015 Ali BELLAMINE
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
**/
/*
16/02/15 - index.php - Ali Bellamine
Page d'accueil du site
*/
require 'core/main.php';
require 'core/header.php';
if (DEVMODE == 1) {
if (isset($_POST) && isset($_POST['devModeId'])) {
login($_POST['devModeId']);
header('Location: index.php');
}
}
?>
<div id = "presentation">
<div class = "divBox">
<div class = "presentationLeft">
<img src = "<?php echo ROOT.'theme/img/demoEvaluation.png'; ?>" />
</div>
<div class = "presentationRight">
<span id = "titre"><?php echo TITRE; ?></span>
<ul>
<li><?php echo LANG_ACCUEIL_DESCRIPTION_1; ?></li>
<li><?php echo LANG_ACCUEIL_DESCRIPTION_2; ?></li>
<li><?php echo LANG_ACCUEIL_DESCRIPTION_3; ?></li>
</ul>
<?php
// Bouton de connexion
if ($_SESSION['rang'] == 0)
{
?>
<a class = "connexionBouton" href = "<?php echo getPageUrl('login'); ?>"><?php echo LANG_ACCUEIL_CONNEXION; ?></a>
<?php
if (DEVMODE == 1) {
$sql = 'SELECT * FROM user';
$res = $db -> query($sql);
?>
<form class = 'form-inline' method = "POST" action = "">
<select name = "devModeId" class = "form-control" id = "devModeLogin">
<?php
while ($user = $res -> fetch()) {
?>
<option value = "<?php echo $user['id']; ?>"><?php echo $user['nom'].' '.$user['prenom'].' ('.$user['rang'].')'; ?></option>
<?php
}
?>
</select>
<button type = "submit"><?php echo LANG_ACCUEIL_CONNEXION; ?></button>
</form>
<?php
}
}
?>
</div>
</div>
<div id = "aboutPAS"><a href = "<?php echo getPageUrl('about'); ?>"><?php echo LANG_ACCUEIL_ABOUT; ?></a></div>
</div>
<?php
require 'core/footer.php';
?>
<script>
<?php
if (DEVMODE == 1) {
?>
$('#devModeLogin').chosen();
<?php
}
?>
</script>