-
Notifications
You must be signed in to change notification settings - Fork 78
/
index.php
246 lines (195 loc) · 8.09 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
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
235
236
237
238
239
240
241
242
243
244
245
246
<?php
include_once 'config.php';
include_once 'functions.php';
include_once 'core/process/data.loader.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php include_once 'core/inc/meta.inc.php'; ?>
<!-- Bootstrap -->
<link href="core/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato:400,300,700" rel="stylesheet" type="text/css">
<link href="core/css/font-awesome.min.css" rel="stylesheet">
<link href="<?php auto_ver('core/css/style.css'); ?>" rel="stylesheet">
<?php if ('pokemon' == $page) {
?>
<link href="<?php auto_ver('core/css/jQRangeSlider-bootstrap.min.css'); ?>" rel="stylesheet">
<?php
} ?>
</head>
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
<?php
// Google Analytics
if (is_file('analyticstracking.php')) {
include_once 'analyticstracking.php';
}
?>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#menu" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?= HOST_URL; ?>"><img src="<?= $config->infos->logo_path; ?>" width="25" style="display:inline-block;" alt="<?= $config->infos->site_name; ?>" id="logo-img" /> <?= $config->infos->site_name; ?></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="menu">
<ul class="nav navbar-nav navbar-right">
<?php
if (!isset($config->menu)) {
echo 'Please update variables.json file with menu values';
exit();
}
foreach ($config->menu as $menu) {
printMenuitems($menu, 1, $locales);
}
?>
</ul>
</div> <!-- /.navbar-collapse -->
</div> <!-- /.container-fluid -->
</nav>
<div class="container">
<?php
// Include the pages
if (!empty($_GET['page'])) {
$file = SYS_PATH.'/pages/'.$page.'.page.php';
if (is_file($file)) {
echo '<!-- Page :: '.$page.' -->';
include $file;
} else {
include 'pages/home.page.php';
}
} else {
include 'pages/home.page.php';
}
?>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<img src="core/img/logo.png" width=50 class="big-icon" alt="Brusselopole icon">
<h2><?= $locales->FOOTER_TITLE; ?></h2>
<p><?= $locales->FOOTER_SUB; ?></p>
<?= $locales->FOOTER_VISUAL_CONTENT; ?>
<p><?= $locales->FOOTER_MADE_BY; ?></p>
<h3>Pokémon™</h3>
<?= $locales->FOOTER_POKEMON_CONTENT; ?>
</div>
</div>
</div>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="core/js/bootstrap.min.js"></script>
<?php // Load scripts only for page
if (empty($page)) {
?>
<script src="<?php auto_ver('core/js/home.script.js'); ?>"></script>
<script>
updateCounter(<?= $home->pokemon_now; ?>,'.total-pkm-js');
updateCounter(<?= $home->pokestop_lured; ?>,'.total-lure-js');
updateCounter(<?= $home->active_raids; ?>,'.total-raids-js');
updateCounter(<?= $home->gyms; ?>,'.total-gym-js');
updateCounter(<?= $home->teams->valor; ?>,'.total-valor-js');
updateCounter(<?= $home->teams->mystic; ?>,'.total-mystic-js');
updateCounter(<?= $home->teams->instinct; ?>,'.total-instinct-js');
updateCounter(<?= $home->teams->rocket; ?>,'.total-rocket-js');
</script>
<?php
} else {
switch ($page) {
case 'pokemon':
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<script src="core/js/pokemon.graph.js.php?id=<?= $pokemon_id; ?>"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="<?php auto_ver('core/js/jQAllRangeSliders-withRuler.min.js'); ?>"></script>
<script src="<?php auto_ver('core/js/pokemon.maps.js'); ?>"></script>
<script>
var pokemon_id = <?= $pokemon_id; ?>;
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?= $config->system->GMaps_Key; ?>&libraries=visualization&callback=initMap&v=3"></script>
<?php
break;
case 'pokestops':
?>
<script src="<?php auto_ver('core/js/pokestops.maps.js'); ?>"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?= $config->system->GMaps_Key; ?>&libraries=visualization&callback=initMap&v=3"></script>
<?php
break;
case 'gym':
?>
<script src="<?php auto_ver('core/js/gym.script.js'); ?>"></script>
<script>
updateCounter(<?= $teams->valor->gym_owned; ?>,'.gym-valor-js');
updateCounter(<?= $teams->valor->average; ?>,'.average-valor-js');
updateCounter(<?= $teams->instinct->gym_owned; ?>,'.gym-instinct-js');
updateCounter(<?= $teams->instinct->average; ?>,'.average-instinct-js');
updateCounter(<?= $teams->mystic->gym_owned; ?>,'.gym-mystic-js');
updateCounter(<?= $teams->mystic->average; ?>,'.average-mystic-js');
</script>
<script src="<?php auto_ver('core/js/gym.maps.js'); ?>"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?= $config->system->GMaps_Key; ?>&libraries=visualization&callback=initMap&v=3"></script>
<?php
break;
case 'pokedex':
?>
<script src="core/js/holmes.min.js"></script>
<script>
// holmes setup
var h = new holmes({
input: '.search input',
find: '.results .pokemon-single',
placeholder: '<h3>— No results, my dear Ash. —</h3>',
class: {
visible: 'visible',
hidden: 'hidden'
}
});
</script>
<?php
break;
case 'dashboard':
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<script src="core/js/dashboard.graph.js.php"></script>
<?php
break;
case 'trainer':
?>
<script src="<?php auto_ver('core/js/trainer.content.js'); ?>"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<script src="core/js/trainer.graph.js.php"></script>
<?php
break;
case 'nests':
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.2.0/jquery.countdown.min.js"></script>
<script src="core/js/nests.maps.js.php"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?= $config->system->GMaps_Key; ?>&libraries=visualization,geometry&callback=initMap&v=3"></script>
<?php
break;
case 'raids':
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.2.0/jquery.countdown.min.js"></script>
<script src="<?php auto_ver('core/js/raids.content.js'); ?>"></script>
<?php
break;
case 'gymhistory':
?>
<script src="<?php auto_ver('core/js/gymhistory.content.js'); ?>"></script>
<?php
break;
}
}
?>
</body>
</html>