Added OpenWebAnalytics
This commit is contained in:
parent
3f5b42d306
commit
692ba38598
@ -8,6 +8,7 @@ server {
|
|||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
server_name chiro-canto;
|
server_name chiro-canto;
|
||||||
root /var/www/chiro-canto/public;
|
root /var/www/chiro-canto/public;
|
||||||
|
client_max_body_size 20M;
|
||||||
location / {
|
location / {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ $data = $req->fetch();
|
|||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php include("$root/menu.php");?>
|
<?php include("$root/menu.php");?>
|
||||||
|
@ -12,6 +12,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
|
@ -12,6 +12,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php include("$root/menu.php");?>
|
<?php include("$root/menu.php");?>
|
||||||
|
@ -17,6 +17,7 @@ error_reporting(E_ALL);
|
|||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php include("$root/menu.php");?>
|
<?php include("$root/menu.php");?>
|
||||||
|
@ -18,6 +18,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php include("$root/menu.php");?>
|
<?php include("$root/menu.php");?>
|
||||||
|
@ -18,6 +18,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php include("$root/menu.php");?>
|
<?php include("$root/menu.php");?>
|
||||||
|
@ -11,6 +11,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
,ortion,fedora,04.04.2021 12:34,file:///home/ortion/.config/libreoffice/4;
|
|
@ -40,6 +40,7 @@ if ($data = $req->fetch()) {
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -15,6 +15,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -29,7 +29,10 @@ $result = $req->fetchAll();
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
</head>
|
</head>
|
||||||
<?php include("$root/analytics/matomo.php");?>
|
<?php
|
||||||
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php include("$root/menu.php");?>
|
<?php include("$root/menu.php");?>
|
||||||
<?php include("$root/header.php");?>
|
<?php include("$root/header.php");?>
|
||||||
|
74
public/explore/record/index.php
Normal file
74
public/explore/record/index.php
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_GET['id'])) {
|
||||||
|
$req = $db->prepare('SELECT * FROM `records` WHERE id=:id');
|
||||||
|
$req->execute(array(
|
||||||
|
"id"=>$_GET['id']
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
$req = $db->prepare('SELECT * FROM `records` ORDER BY date');
|
||||||
|
$req->execute();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!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/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
|
?>
|
||||||
|
<body>
|
||||||
|
<?php include("$root/menu.php");?>
|
||||||
|
<?php include("$root/header.php");?>
|
||||||
|
<section>
|
||||||
|
<h3>Record</h3>
|
||||||
|
<?php
|
||||||
|
if ($data = $req->fetch()) {
|
||||||
|
?>
|
||||||
|
<div class="sound">
|
||||||
|
<h3><?=$data['file_name']?></h3>
|
||||||
|
<h4><em><?=$data['species']?></em></h4>
|
||||||
|
<p>Recorded on <?=$data['date']?> at <?=$data['time']?></p>
|
||||||
|
<?php
|
||||||
|
if (file_exists($root."/storage/spectrograms/".$data['file_name'].'.png'))
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<img id="spectrogram" src="<?="/storage/spectrograms/".$data['file_name'].'.png'?>" alt="bat sound spectrogram">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
|
<audio src="<?="/storage/records/".$data['file_name']?>" controls></audio>
|
||||||
|
<p><?=$data['license']?> <?=$data['recordist_name']?></p>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
echo "Can't find the record associated with this id, please try again.";
|
||||||
|
}?>
|
||||||
|
</section>
|
||||||
|
<?php include("$root/footer.php");?>
|
||||||
|
</body>
|
||||||
|
<script src="/scripts/script.js"></script>
|
||||||
|
</html>
|
@ -32,6 +32,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php include("$root/menu.php");?>
|
<?php include("$root/menu.php");?>
|
||||||
|
@ -37,6 +37,7 @@ $data = $req->fetch();
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -30,6 +30,7 @@ $result = $req->fetchAll();
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -31,6 +31,7 @@ $result = $req->fetchAll();
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -17,6 +17,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -18,6 +18,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php include("$root/menu.php");?>
|
<?php include("$root/menu.php");?>
|
||||||
|
@ -15,6 +15,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -36,7 +36,10 @@ $data = $req->fetch();
|
|||||||
<title>Larynx | Chiro - Canto</title>
|
<title>Larynx | Chiro - Canto</title>
|
||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php include("$root/analytics/matomo.php");?>
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
|
include("$root/analytics/matomo.php");
|
||||||
|
?>
|
||||||
<?php
|
<?php
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
|
@ -69,6 +69,7 @@ if (empty($result))
|
|||||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -353,12 +353,13 @@ table#replies td {
|
|||||||
|
|
||||||
#larynx {
|
#larynx {
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
width: auto;
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
color: white;
|
color: white;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
width: 1840px;
|
||||||
|
height: 500px;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#larynx h2 {
|
#larynx h2 {
|
||||||
|
@ -29,6 +29,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
|||||||
crossorigin=""/>
|
crossorigin=""/>
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
include("$root/analytics/owa.php");
|
||||||
include("$root/analytics/matomo.php");
|
include("$root/analytics/matomo.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
@ -142,9 +142,9 @@ if (isset($_POST['submit']))
|
|||||||
|
|
||||||
if ($_SESSION['error_msg'] == "")
|
if ($_SESSION['error_msg'] == "")
|
||||||
{
|
{
|
||||||
header('Location: '.'index.php?step=verify');
|
// header('Location: '.'index.php?step=verify');
|
||||||
} else{
|
} else{
|
||||||
$_SESSION['error_msg'] .= "Please try again.\n";
|
$_SESSION['error_msg'] .= "Please try again.\n";
|
||||||
header('Location: '.'index.php?step=metadata');
|
// header('Location: '.'index.php?step=metadata');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +82,11 @@ try {
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
die("Error : ".$e->getMessage());
|
die("Error : ".$e->getMessage());
|
||||||
}
|
}
|
||||||
|
$req = $db->prepare('SELECT LAST_INSERT_ID() AS id;');
|
||||||
header('Location: '."/");
|
$req->execute();
|
||||||
|
if ($data = $req->fetch()) {
|
||||||
|
header('Location: '."/explore/record/?id=".$data['id']);
|
||||||
|
} else {
|
||||||
|
header('Location: '."/");
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user