2021-03-31 15:27:03 +02:00
< ? php
ini_set ( 'display_errors' , 1 );
ini_set ( 'display_startup_errors' , 1 );
error_reporting ( E_ALL );
session_start ();
$root = realpath ( $_SERVER [ " DOCUMENT_ROOT " ]);
2021-04-07 12:35:25 +02:00
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 ());
}
if ( isset ( $_GET [ 'record' ])) {
$req = $db -> prepare ( 'SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` WHERE id=:id' );
$req -> execute ( array (
" id " => $_GET [ 'record' ]
));
} else {
$req = $db -> prepare ( 'SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` ORDER BY date DESC, time DESC LIMIT 1' );
$req -> execute ();
}
$data = $req -> fetch ();
2021-03-31 15:27:03 +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 > About | Chiro - Canto </ title >
< link rel = " stylesheet " type = " text/css " href = " /styles/style.css " >
</ head >
2021-04-01 08:57:34 +02:00
< ? php
include ( " $root /analytics/matomo.php " );
2021-04-16 19:14:52 +02:00
include ( " $root /analytics/owa.php " );
2021-04-01 08:57:34 +02:00
?>
2021-03-31 15:27:03 +02:00
< body >
< ? php include ( " $root /menu.php " ); ?>
< ? php include ( " $root /header.php " ); ?>
< section >
< h2 > About </ h2 >
< p > Chiro - Canto is an online bat sound sharing set of tools , inspired by < a href = " https://xeno-canto.org " > Xeno - Canto </ a >.</ p >
< h3 > Author </ h3 >
< p > This website is developped with & #9829; by Samuel ORTION, a juvenile <em>Geekus biologicus</em>.</p>
2021-03-31 16:24:01 +02:00
< h3 > Source code </ h3 >
2021-04-02 10:13:23 +02:00
< p > This project is available under the GNU Affero GPL v3 license at < a href = " https://forge.ortion.xyz/Chiro-Canto/chiro-canto " > https :// forge . ortion . xyz / Chiro - Canto / chiro - canto </ a >.</ p >
2021-03-31 15:27:03 +02:00
</ section >
< ? php include ( " $root /footer.php " ); ?>
</ body >
< script src = " /scripts/script.js " ></ script >
</ html >