81 lines
2.3 KiB
PHP
Executable File
81 lines
2.3 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
ini_set('display_errors', 1);
|
|
ini_set('display_startup_errors', 1);
|
|
error_reporting(E_ALL);
|
|
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
|
|
require("$root/lang/gettext.php");
|
|
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());
|
|
}
|
|
|
|
$req = $db->prepare('SELECT * FROM `taxa`');
|
|
$req->execute();
|
|
$result = $req->fetchAll();
|
|
?>
|
|
<!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" type="text/css" href="/styles/style.css">
|
|
</head>
|
|
<?php
|
|
include("$root/analytics/owa.php");
|
|
include("$root/analytics/matomo.php");
|
|
?>
|
|
<body>
|
|
<?php include("$root/menu.php");?>
|
|
<?php include("$root/header.php");?>
|
|
<h3><?=_('Taxa')?></h3>
|
|
<p><?=_('These taxa come from INPN TAXREF v14.0.')?></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><?=_('Kingdom')?></th>
|
|
<th><?=_('Phylum')?></th>
|
|
<th><?=_('Class')?></th>
|
|
<th><?=_('Order')?></th>
|
|
<th><?=_('Family')?></th>
|
|
<th><?=_('Subfamily')?></th>
|
|
<th><?=_('Tribu')?></th>
|
|
<th><?=_('Genus')?></th>
|
|
<th><?=_('Species')?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
foreach ($result as $row)
|
|
{
|
|
?>
|
|
<tr>
|
|
<td><?=$row['taxon_kingdom']?></td>
|
|
<td><?=$row['taxon_phylum']?></td>
|
|
<td><?=$row['taxon_class']?></td>
|
|
<td><?=$row['taxon_order']?></td>
|
|
<td><?=$row['taxon_family']?></td>
|
|
<td><?=$row['taxon_subfamily']?></td>
|
|
<td><?=$row['taxon_tribu']?></td>
|
|
<td><?=$row['taxon_genus']?></td>
|
|
<td><?=$row['taxon_species']?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<?php include("$root/footer.php");?>
|
|
</body>
|
|
<script src="/scripts/script.js"></script>
|
|
</html>
|