2021-04-01 08:57:34 +02:00
|
|
|
<?php
|
|
|
|
session_reset();
|
|
|
|
session_start();
|
|
|
|
ini_set('display_errors', 1);
|
|
|
|
ini_set('display_startup_errors', 1);
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|
|
|
require "$root/database/credentials.php";
|
|
|
|
// Connect the database
|
|
|
|
try {
|
|
|
|
$db = new PDO("mysql:host=$host;dbname=$database;charset=utf8",
|
|
|
|
$user,
|
|
|
|
$password,
|
|
|
|
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
|
|
|
|
));
|
|
|
|
} catch (Exception $e) {
|
|
|
|
die("Error : ".$e->getMessage());
|
|
|
|
}
|
2021-04-16 13:41:22 +02:00
|
|
|
$req = $db->prepare('SELECT * FROM `records`');
|
|
|
|
$req->execute();
|
|
|
|
$result = $req->fetchAll();
|
2021-04-01 08:57:34 +02:00
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Explore | Chiro - Canto</title>
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
|
|
|
|
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
|
|
|
|
crossorigin=""/>
|
2021-04-16 13:41:22 +02:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
|
|
|
<!-- Make sure you put this AFTER Leaflet's CSS -->
|
|
|
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
|
|
|
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
|
|
|
|
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
|
|
|
|
crossorigin=""></script>
|
2021-04-01 08:57:34 +02:00
|
|
|
</head>
|
|
|
|
<?php
|
|
|
|
include("$root/analytics/matomo.php");
|
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<?php include("$root/menu.php");?>
|
|
|
|
<?php include("$root/header.php");?>
|
|
|
|
<section>
|
|
|
|
<h3>Explore</h3>
|
|
|
|
<h4>Record Map</h4>
|
|
|
|
<div id="map"></div>
|
|
|
|
</section>
|
|
|
|
<?php include("$root/footer.php");?>
|
2021-04-16 13:41:22 +02:00
|
|
|
<script>
|
|
|
|
let obs = <?= json_encode($result);?>
|
|
|
|
</script>
|
2021-04-01 08:57:34 +02:00
|
|
|
<script src="/scripts/script.js"></script>
|
|
|
|
<script src='/scripts/jquery/script.js'></script>
|
|
|
|
<script src="scripts/map.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|