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
| $data = [
'afq' => [
'division' => 'Afrique',
'txtprez' => 'lorem ipsum....',
'mymap' => 'Ici un code Google MyMaps'
],
'arc' => [
'division' => 'Marseille',
'txtprez' => 'lorem ipsum....',
'mymap' => 'Ici un code Google MyMaps'
],
'brs' => [
'division' => 'Taxi-brousse',
'txtprez' => 'lorem ipsum....',
'mymap' => 'Ici un code Google MyMaps'
],
'dra' => [
'division' => 'Dessertes régionales',
'txtprez' => 'lorem ipsum....'
],
'jaf' => [
'division' => 'Jets affaire',
'txtprez' => 'lorem ipsum....'
]
];
// fonction d'échappement des caractères dangereux
$hsc = function($p) { return htmlspecialchars($p, ENT_QUOTES, 'utf-8'); };
$action = $_GET['action'] ?? 0;
$hub = $data[$action] ?? '';
if (empty($hub)) {
echo <<<html
<div class="titreBord">
<h1><i class="fa fa-plane" aria-hidden="true"></i>Hub inconnu<br></h1>
</div>
html;
} else {
echo <<<html
<div class="titreBord">
<h1><i class="fa fa-plane" aria-hidden="true"></i>Division {$hsc($hub['division'])}</h1>
</div>
<p>{$hsc($hub['txtprez'])}</p><br>
<center>{$hsc($hub['mymap'] ?? '')}</center><br>
html;
} |
Partager