-
Notifications
You must be signed in to change notification settings - Fork 6
/
_footer.inc.php
234 lines (198 loc) · 9.64 KB
/
_footer.inc.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
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
</div>
<!-- fin conteneur -->
<footer id="pied-wrapper">
<!-- Début pied -->
<div id="pied">
<ul class="menu_pied">
<?php
foreach ($glo_menu_pratique as $nom => $lien)
{
if (strstr($_SERVER['PHP_SELF'], $lien))
{
$ici = " class=\"ici\"";
}
?>
<li><a href="<?php echo $lien; ?>" title="<?php echo $nom; ?>" <?php echo $ici; ?>><?php echo $nom; ?></a></li>
<?php } ?>
<li><a href="/articles/charte-editoriale.php">Charte éditoriale</a></li>
<li><a href="/articles/liens.php">Liens</a></li>
<li>
<form class="recherche" action="/evenement-search.php" method="get">
<input type="text" class="mots" name="mots" size="22" maxlength="50" value="" placeholder="Rechercher un événement" /><input type="submit" class="submit" name="formulaire" value="" /><input type="text" name="name_as" value="" class="name_as" id="name_as" />
</form>
</li>
</ul>
</div>
<!-- Fin Pied -->
</footer>
</div>
<!-- Fin Global -->
<?php
$pages_formulaires = ["evenement-edit", "evenement-copy", "lieu-edit", "user-register", "gererEvenements", "user-edit", "lieu-text-edit", "organisateur-edit", "lieu-salle-edit"];
$pages_tinymce = ["lieu-text-edit", "organisateur-edit"];
$pages_lieumap = ["lieu", "evenement"];
?>
<!-- used by ZebraDatepicker, MagnificPopup, checkboxes, custom in _footer.inc.php, browser.js, global.js -->
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script src="/vendor/dimsemenov/magnific-popup/dist/jquery.magnific-popup.js"></script>
<script>
'use strict';
// used everywhere : home, events, lieux, user...
$('.magnific-popup').magnificPopup({
type: 'image',
tClose: 'Fermer (Esc)', // Alt text on close button
tLoading: 'Chargement...', // Text that is displayed during loading. Can contain %curr% and %total
image: {
tError: '<a href="%url%">L'image</a> n'a pas pu être chargée.' // Error message when image could not be loaded
}
});
// used in lieu
$('.gallery-item').magnificPopup({
type: 'image',
tClose: 'Fermer (Esc)', // Alt text on close button
tLoading: 'Chargement...', // Text that is displayed during loading. Can contain %curr% and %total
gallery: {
enabled: true,
tPrev: 'Précédente (bouton gauche)', // title for left button
tNext: 'Suivante (bouton droit)', // title for right button
tCounter: '<span class="mfp-counter">%curr% de %total%</span>' // markup of counter
}
});
</script>
<?php
if (in_array($nom_page, $pages_lieumap))
{
?>
<script>
'use strict';
let lieuMap;
function initLieuMap()
{
if ($('#lieu-map').length === 0)
{
return;
}
var myLatLng = {lat: parseFloat($('#lieu-map').data('lat')), lng: parseFloat($('#lieu-map').data('lng'))};
lieuMap = new google.maps.Map(document.getElementById('lieu-map'), {
center: myLatLng,
zoom: 14
});
var marker = new google.maps.Marker({
position: myLatLng,
map: lieuMap
});
var infowindow = new google.maps.InfoWindow({
content: $('#lieu-map-infowindow').html()
});
marker.addListener('click', function ()
{
infowindow.open(lieuMap, marker);
});
}
</script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=<?php echo GOOGLE_API_KEY; ?>&callback=initLieuMap"></script>
<?php } ?>
<?php
if (in_array($nom_page, $pages_formulaires))
{
?>
<script src="/vendor/harvesthq/chosen/chosen.jquery.min.js"></script>
<script>
'use strict';
$('.chosen-select').chosen({
allow_single_deselect: true,
no_results_text: 'Aucun élément correspondant n’a été trouvé',
include_group_label_in_selected: true,
search_contains: true
});
</script>
<script src="/web/js/libs/Zebra_datepicker/zebra_datepicker.min.js"></script>
<script>
'use strict';
// users can add events for today, until 06h the day after, in line with the agenda
const nbHoursAfterMidnightForDay = 6;
let d = new Date();
d.setHours(d.getHours() - nbHoursAfterMidnightForDay);
const eventEditStartDate = d.getDate() + '.' + (d.getMonth() + 1) + '.' + d.getFullYear();
let ZebraDatepickerBasicConfig = {
format: 'd.m.Y',
zero_pad: true,
days: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
months: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
show_clear_date: true,
lang_clear_date: 'Effacer',
show_select_today: 'Aujourd’hui'
};
const inputDatepickerConfig = {direction: [eventEditStartDate, false]};
$('input.datepicker').Zebra_DatePicker({...ZebraDatepickerBasicConfig, ...inputDatepickerConfig});
const inputDatepickerFromConfig = {direction: [eventEditStartDate, false], pair: $('input.datepicker_to'), readonly_element: false};
$('input.datepicker_from').Zebra_DatePicker({...ZebraDatepickerBasicConfig, ...inputDatepickerFromConfig});
const inputDatepickerToConfig = {direction: 1, readonly_element: false};
$('input.datepicker_to').Zebra_DatePicker({...ZebraDatepickerBasicConfig, ...inputDatepickerToConfig});
</script>
<?php
if (in_array($nom_page, $pages_tinymce))
{
?>
<script
src="https://cdn.tiny.cloud/1/<?php echo TINYMCE_API_KEY; ?>/tinymce/6/tinymce.min.js"
referrerpolicy="origin"
></script>;
<script>
'use strict';
tinymce.init({
selector: 'textarea.tinymce',
height: 500,
menubar: false,
plugins: ['autolink', 'lists', 'link', 'charmap', 'searchreplace', 'visualblocks', 'code', 'help', 'wordcount'],
toolbar: 'bold italic link | h4 bullist numlist blockquote | undo redo | visualblocks removeformat code',
content_css: [
'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
'//www.tiny.cloud/css/codepen.min.css'
]
});
</script>
<?php } ?>
<?php
if ($nom_page == "gererEvenements")
{
?>
<script src="/web/js/libs/jquery.checkboxes-1.2.2.min.js"></script>
<script>
'use strict';
jQuery(function ($)
{
$('.jquery-checkboxes').checkboxes('range', true);
});
</script>
<?php } ?>
<?php
if ($nom_page == "evenement-edit" && !isset($_SESSION['Sgroupe']))
{
?>
<script src="https://www.google.com/recaptcha/api.js?render=<?php echo GOOGLE_RECAPTCHA_API_KEY_CLIENT; ?>"></script>
<script>
'use strict';
grecaptcha.ready(function ()
{
grecaptcha.execute('<?php echo GOOGLE_RECAPTCHA_API_KEY_CLIENT ?>', {action: 'propose_event'}).then(function (token)
{
var recaptchaResponse = document.getElementById('g-recaptcha-response');
recaptchaResponse.value = token;
});
});
</script>
<?php } ?>
<?php } ?>
<?php
if ($nom_page == "contacteznous")
{
?>
<script>
'use strict';
document.getElementById("email-info").innerHTML = atob("<?php echo base64_encode(EMAIL_ADMIN); ?>");
</script>
<?php } ?>
<script type="module" src="/web/js/main.js?<?php echo time() ?>"></script>
</body>
</html>