diff --git a/.gitignore b/.gitignore index 512c50f..3b9ae08 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -public/storage \ No newline at end of file +public/storage +node_modules +public/test diff --git a/public/contact/index.php b/public/contact/index.php index 1422481..a741806 100644 --- a/public/contact/index.php +++ b/public/contact/index.php @@ -17,24 +17,25 @@ include("$root/analytics/matomo.php");
+

Contact

- +
- +
- +

- +
- +
diff --git a/public/contact/sendmail.php b/public/contact/sendmail.php index ee88fbe..58ad9c0 100644 --- a/public/contact/sendmail.php +++ b/public/contact/sendmail.php @@ -50,14 +50,14 @@ try { //Server settings // $mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output $mail->isSMTP(); //Send using SMTP - $mail->Timeout = 60; + $mail->Timeout = 60; $mail->SMTPKeepAlive = true; - $mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through - $mail->SMTPAuth = true; //Enable SMTP authentication - $mail->Username = 'samulus.ortion@gmail.com'; //SMTP username - $mail->Password = 'CEkvk6vjP28vhCy'; //SMTP password + $mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through + $mail->SMTPAuth = true; //Enable SMTP authentication + $mail->Username = 'samulus.ortion@gmail.com'; //SMTP username + $mail->Password = 'CEkvk6vjP28vhCy'; //SMTP password $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged - $mail->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above + $mail->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above $mail->CharSet = "UTF-8"; $mail->Encoding = 'base64'; //Recipients @@ -75,7 +75,8 @@ try { //Content //$mail->isHTML(true); //Set email format to HTML $mail->Subject = $subject; - $mail->Body = $message; + $mail->Body = $message; + $mail->Body .= "\nSended by $fname $lname <$email>\n"; // $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; $mail->send(); diff --git a/public/explore/guano/index.php b/public/explore/guano/index.php new file mode 100644 index 0000000..d356f1d --- /dev/null +++ b/public/explore/guano/index.php @@ -0,0 +1,73 @@ + PDO::ERRMODE_EXCEPTION + )); +} catch (Exception $e) { + die("Error : ".$e->getMessage()); +} +if (isset($_GET['record'])) { + $req = $db->prepare('SELECT * FROM records WHERE id=:id'); + $req->execute(array( + "id"=>$_GET['record'] + )); +} else { + $req = $db->prepare('SELECT * FROM records ORDER BY date DESC LIMIT 1'); + $req->execute(); +} +if ($data = $req->fetch()) { + +} else { + $_SESSION['error_msg'] = "Can't fetch data."; +} +?> + + + + + + + GUANO | Chiro-Canto + + + + + + +
+

GUANO v1.0

+ '.$_SESSION['error_msg'].'' : "";?> + about GUANO +
+GUANO|Version: 1.0

+ +Original Filename:
+Timestamp:
+Species Auto ID: None
+Species Manual ID:
+Tags: None
+Note:
+TE:
+Samplerate:
+Length:
+
+ +
+ + + + + diff --git a/public/explore/list/index.php b/public/explore/list/index.php index 652ae3f..f3c9787 100644 --- a/public/explore/list/index.php +++ b/public/explore/list/index.php @@ -4,7 +4,6 @@ ini_set('display_startup_errors', 1); error_reporting(E_ALL); session_start(); $root = realpath($_SERVER["DOCUMENT_ROOT"]); -$version = "1.0"; require "$root/database/credentials.php"; // Connect the database try { @@ -66,7 +65,8 @@ $result = $req->fetchAll(); - spectro analysis + spectro analysis + database search diff --git a/public/gallery/gallery.php b/public/gallery/gallery.php new file mode 100644 index 0000000..b28160b --- /dev/null +++ b/public/gallery/gallery.php @@ -0,0 +1,34 @@ + PDO::ERRMODE_EXCEPTION + )); +} catch (Exception $e) { + die("Error : ".$e->getMessage()); +} +$req = $db->prepare('SELECT * FROM images'); +$req->execute(); +$result = $req->fetchAll(); + +?> +
    + +
  • +
    <?=$row['species']?>
    +
  • + +
+Upload Image + + + + + + + + + Gallery | Chiro - Canto + + + + + + +
+

Gallery

+ + '.$_SESSION['error_msg'].'' : ""?> + +
+ + + + \ No newline at end of file diff --git a/public/gallery/scripts/gallery.js b/public/gallery/scripts/gallery.js new file mode 100644 index 0000000..1d5d2fa --- /dev/null +++ b/public/gallery/scripts/gallery.js @@ -0,0 +1,10 @@ +images = document.getElementsByTagName('img'); +for (img of images) { + img.addEventListener('click', function() { + if (img.classList.contains("fullscreen")) { + img.classList.remove('fullscreen'); + } else { + img.classList.add('fullscreen'); + } + }); +} \ No newline at end of file diff --git a/public/gallery/upload.php b/public/gallery/upload.php new file mode 100644 index 0000000..5cc965b --- /dev/null +++ b/public/gallery/upload.php @@ -0,0 +1,74 @@ + + +
+
+ + + +
+ PDO::ERRMODE_EXCEPTION + )); + } catch (Exception $e) { + die("Error : ".$e->getMessage()); + } + if (isset($_SESSION['username'])) { + $req = $db->prepare('SELECT id FROM authors WHERE username=:username'); + $req->execute(array( + "username"=>$_SESSION['username'] + )); + if ($data = $req->fetch()) { + $author_id = $data['id']; + } + } else { + $_SESSION['error_msg'] .= "You need to be logged in to upload images."; + header("Location: /auth/login"); + } + $req = $db->prepare('INSERT INTO images (species, file_name, author_id, entry_date) VALUES (:species, :file_name, :author_id, now())'); + $req->execute(array( + "species"=>$species, + "file_name"=>$filename, + "author_id"=>$author_id + )); +} + + +$_SESSION['error_msg'] = ""; +if(isset($_POST['submit'])){ + $location = $root."/storage/images/"; + $name = $_FILES['file']['name']; + $temp_name = $_FILES['file']['tmp_name']; + if(isset($name) and !empty($name)){ + $location = "$root/storage/images/"; + if(move_uploaded_file($temp_name, $location.$name)){ + echo 'File uploaded successfully'; + db_entry(isset($_POST['species']) ? $_POST['species'] : "", $name); + header('Location: /gallery'); + } else { + echo "Can't move your file."; + } + } else { + $_SESSION['error_msg'] .= 'You should select a file to upload !!'; + } +} else { + form(); +} +?> diff --git a/public/larynx/index.php b/public/larynx/index.php index a969589..cfff89b 100644 --- a/public/larynx/index.php +++ b/public/larynx/index.php @@ -46,6 +46,9 @@ include("$root/analytics/matomo.php");

Larynx

A web tool for bat sound analysis

+ +
+

Larynx v

@@ -60,7 +63,7 @@ include("$root/analytics/matomo.php");
T: - ms F: + s F: kHz
@@ -71,6 +74,10 @@ include("$root/analytics/matomo.php");

+
+ + +
diff --git a/public/larynx/scripts/spectro.js b/public/larynx/scripts/spectro.js index 4d8bf92..95ca77d 100644 --- a/public/larynx/scripts/spectro.js +++ b/public/larynx/scripts/spectro.js @@ -66,8 +66,12 @@ function measure(x, y) { y = -(-(-y + spectro_y) - spectro_height); let t = (x / spectro_width) * audio.duration; let f = (y / spectro_height) * 24; - document.getElementById('cursor-time').innerHTML = Math.round(t); - document.getElementById('cursor-frequency').innerHTML = Math.round(f); + let frequency_factor = 1; + if (document.getElementById('exp_x10').checked) { + frequency_factor = 10; + } + document.getElementById('cursor-time').innerHTML = Math.round(t / frequency_factor * 100) / 100; + document.getElementById('cursor-frequency').innerHTML = Math.round(f * frequency_factor * 100) / 100; } let spectro = document.getElementById("wave-spectrogram"); diff --git a/public/media/icons/bottom_arrow.svg b/public/media/icons/bottom_arrow.svg new file mode 100644 index 0000000..2f403ea --- /dev/null +++ b/public/media/icons/bottom_arrow.svg @@ -0,0 +1,61 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/public/media/icons/copy.png b/public/media/icons/copy.png new file mode 100644 index 0000000..558188d Binary files /dev/null and b/public/media/icons/copy.png differ diff --git a/public/media/icons/data.jpg b/public/media/icons/data.jpg new file mode 100644 index 0000000..aa0cacd Binary files /dev/null and b/public/media/icons/data.jpg differ diff --git a/public/media/icons/data.png b/public/media/icons/data.png new file mode 100644 index 0000000..afa15b2 Binary files /dev/null and b/public/media/icons/data.png differ diff --git a/public/media/icons/style.css b/public/media/icons/style.css new file mode 100644 index 0000000..6cd7d09 --- /dev/null +++ b/public/media/icons/style.css @@ -0,0 +1,464 @@ +* { + align-self: baseline; +} + +body { + margin: 0; + background-color: white; +} + +header { + text-align: right; + padding: 0; +} + +header a { + text-decoration: none; + color: black; +} + +nav, +nav .container { + padding: 0; + margin: 0; +} + +header .container, +nav .container { + display: flex; + justify-content: space-between; +} + +header h1 { + font-size: 4em; + padding: 0; + margin: 0; +} + +img.banner { + width: 100%; + height: auto; +} + +section { + padding: 1em; + min-height: 100vh; + width: 50vw; + text-align: left; + margin: auto; +} + +article { + width: 50vw; + text-align: left; + margin: auto; +} + +article h1 { + font-size: 5em; +} + +footer { + color: white; + text-align: center; + background-color: rgba(0, 0, 0, 0.9); + padding: 1em; +} + +footer a { + text-decoration: none; +} + + +footer img { + height: 1em; +} + +label { + width: 40em; + display: inline; +} + +label span.info { + display: none; +} + +label:hover span.info { + display: inline-block; + position: relative; + background: yellow; + padding: 0.5em; + border-radius: 5px; +} + +input { + margin: 0.1em; +} + +/* Style inputs with type="text", select elements and textareas */ +input[type=text], +input[type=email], +input[type=url], +input[type=password], +input[type=number], +input[type=date], +input[type=time], +select, +textarea { + width: 100%; + /* Full width */ + padding: 12px; + /* Some padding */ + border: 1px solid #ccc; + /* Gray border */ + border-radius: 4px; + /* Rounded borders */ + box-sizing: border-box; + /* Make sure that padding and width stays in place */ + margin-top: 6px; + /* Add a top margin */ + margin-bottom: 16px; + /* Bottom margin */ + resize: vertical + /* Allow the user to vertically resize the textarea (not horizontally) */ +} + +/* Style the submit button with a specific background color etc */ +input[type=submit] { + background-color: #4CAF50; + color: white; + padding: 12px 20px; + border: none; + border-radius: 4px; + cursor: pointer; +} + +input[type=reset] { + background-color: #af4c4c; + color: white; + padding: 12px 20px; + border: none; + border-radius: 4px; + cursor: pointer; +} + +/* When moving the mouse over the submit button, add a darker green color */ +input[type=submit]:hover { + background-color: #45a049; +} + +/* When moving the mouse over the reset button, add a darker red color */ +input[type=reset]:hover { + background-color: #923737; +} + + +/* Add a background color and some padding around the form */ +.container { + border-radius: 5px; + background-color: #f2f2f2; + padding: 1em; +} + +nav { + border-bottom: 1px solid black; + position: flex; + display: block; + width: 100%; + background-color: white; + z-index: 10; + overflow: hidden; + overflow-wrap: break-word; +} + +nav div { + padding: 1em; +} + +nav.dark-theme { + background: black; +} + +nav.dark-theme ul li { + color: white; +} + +nav ul { + display: flex; + flex-direction: row; +} + +nav ul a { + text-decoration: none; +} + +nav ul li { + list-style: none; + color: black; + margin: 0.5em; +} + +iframe::parent { + padding: 0; + margin: 0; +} + +iframe { + width: 100%; + height: 750px; +} + +#previewFrame { + width: 300px; + height: 200px; + resize: both; + zoom: 0.2; + -moz-transform: scale(0.5); + -moz-transform-origin: 0 0; + -o-transform: scale(0.5); + -o-transform-origin: 0 0; + -webkit-transform: scale(0.5); + -webkit-transform-origin: 0 0; +} + +iframe html body { + font-size: 0.1em; +} + +.container { + display: flex; + padding-top: 0; + padding-bottom: 0; +} + +.container.row { + flex-direction: row; +} + +.container.column { + flex-direction: column; +} + +h3, +p { + padding: 1em; + width: auto; +} + +p.large { + width: auto; +} + +table { + border-radius: 5px; + width: 100%; + border-collapse: collapse; +} + +td, +th { + border: 1px solid #dddddd; + text-align: left; + padding: 0.5em; +} + +tr:nth-child(even) { + background-color: #dddddd; +} + +table a { + text-decoration: none; + color: black; +} + +table a:hover { + font-style: italic; +} + +#searchbar { + display: flex; + flex-direction: row; + align-self: right; +} + +ul.breadcrumb { + display: flex; + flex-basis: row; +} + +ul.breadcrumb li { + list-style: url("/media/icons/arrow.svg"); + margin-left: 2em; +} + +ul.breadcrumb li.active { + font-weight: bold; +} + +div.coordinates { + display: flex; + flex-direction: row; +} + +div.coordinates input[type="text"] { + width: 25em; +} + +.sci-name { + font-style: italic; +} + +.error { + border: solid red; + border-radius: 5px; + padding: 0.5em; + background-color: rgba(255, 0, 0, 0.4) +} + +.sound { + background-color: rgba(0, 255, 0, 0.5); + padding: 1em; + border-radius: 5px; + overflow: auto; +} + +#spectrogram { + width: 100%; + max-width: 75vh; +} + +button img { + max-height: 1em; +} + +form#url-form { + display: none; + position: fixed; + top: 50%; + left: 35%; + width: 15em; + z-index: 1; + background-color: white; + padding: 1em; + border-radius: 5px; + border: 1px solid #ccc; +} + +table#replies td { + background-color: white; +} + + +#larynx { + background-color: rgba(0, 0, 0, 0.8); + width: auto; + min-height: 100vh; + margin: 0; + + color: white; + padding: 1em; +} + +#larynx h2 { + text-align: center; +} + +#larynx { + text-align: center; +} + +#larynx .license { + text-align: left; +} + +#larynx canvas { + width: 100vw; + position: relative; + left: 0; +} + +#larynx .container { + background: transparent; + display: flex; + justify-content: space-between; +} + +#larynx .settings { + display: flex; +} + +#larynx .settings input, #larynx .settings label { + width: auto; + padding: 0em 1em; +} +table { + max-width: 100vw; +} + +table#list { + position: absolute; + left: 0; +} + +table img { + height: 1em; +} + +.images img { + max-height: 10em; +} + +.images li { + list-style: none; +} + +.images .fullscreen { + display: block; + position: fixed; + /*top: 10%;*/ + bottom: 0; + left: 50%; + max-width: 100vw; + max-height: 100vh; + transform: translate(-50%); +} +.images .fullscreen::parent { + background: rgba(0, 0, 0, 0.5); + backdrop-filter: blur(9px); + position: fixed; + bottom: 0; + right: 0; + left: 0; + top: 0; +} + +.arrow { + position: relative; + bottom: 0; + left: 50%; + margin-left:-20px; + width: 40px; + height: 40px; + background-image: url(/media/icons/bottom_arrow.svg); + background-size: contain; +} + +.bounce { + animation: bounce 2s infinite; +} + +@keyframes bounce { + 0%, 20%, 50%, 100% { + transform: translateY(0); + } + 40% { + transform: translateY(-30px); + } + 60% { + transform: translateY(-15px); + } +} + +article.guano { + font-family: "Sudo"; +} \ No newline at end of file diff --git a/public/scripts/script.js b/public/scripts/script.js index 374f4b6..3ead129 100644 --- a/public/scripts/script.js +++ b/public/scripts/script.js @@ -49,4 +49,31 @@ win.onscroll = function() { // function hidePreview() { // iframe.style.display = "none"; -// } \ No newline at end of file +// } + +var coll = document.getElementsByClassName("collapsible"); +var i; + +for (i = 0; i < coll.length; i++) { + coll[i].addEventListener("click", function() { + this.classList.toggle("collapsed"); + var content = this.nextElementSibling; + if (content.style.display === "block") { + content.style.display = "none"; + } else { + content.style.display = "block"; + } + }); +} + + +function clipboard_copy() { + /* Get the text field */ + var copyText = document.getElementById("guano"); + var r = document.createRange(); + r.selectNode(copyText); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(r); + document.execCommand('copy'); + window.getSelection().removeAllRanges(); +} \ No newline at end of file diff --git a/public/styles/style.css b/public/styles/style.css index 478a538..6b16597 100644 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -167,6 +167,8 @@ nav { width: 100%; background-color: white; z-index: 10; + overflow: hidden; + overflow-wrap: break-word; } nav div { @@ -381,6 +383,14 @@ table#replies td { justify-content: space-between; } +#larynx .settings { + display: flex; +} + +#larynx .settings input, #larynx .settings label { + width: auto; + padding: 0em 1em; +} table { max-width: 100vw; } @@ -392,4 +402,140 @@ table#list { table img { height: 1em; +} + +.images img { + max-height: 10em; +} + +.images li { + list-style: none; +} + +.images .fullscreen { + display: block; + position: fixed; + /*top: 10%;*/ + bottom: 0; + left: 50%; + max-width: 100vw; + max-height: 100vh; + transform: translate(-50%); +} +.images .fullscreen::parent { + background: rgba(0, 0, 0, 0.5); + backdrop-filter: blur(9px); + position: fixed; + bottom: 0; + right: 0; + left: 0; + top: 0; +} + +.arrow { + position: relative; + bottom: 0; + left: 50%; + margin-left:-20px; + width: 40px; + height: 40px; + background-image: url(/media/icons/bottom_arrow.svg); + background-size: contain; +} + +.bounce { + animation: bounce 2s infinite; +} + +@keyframes bounce { + 0%, 20%, 50%, 100% { + transform: translateY(0); + } + 40% { + transform: translateY(-30px); + } + 60% { + transform: translateY(-15px); + } +} + +article#guano { + font-family: "Consolas"; + background-color: lightgray; + padding: 1em; + border-radius: 8px; +} + + +.collapsible { + background-color: lightgrey; + color: black; + cursor: pointer; + padding: 18px; + width: 100%; + border: none; + text-align: left; + outline: none; + font-size: 15px; +} + +.collapsed, .collapsible:hover { + background-color: grey; +} + +.content { + padding: 0 18px; + display: none; + overflow: hidden; + background-color: #f1f1f1; +} + +.collapsible:after { + content: '\02795'; /* Unicode character for "plus" sign (+) */ + font-size: 13px; + color: #777; + float: right; + margin-left: 5px; +} + +.collapsed:after { + content: "\2796"; /* Unicode character for "minus" sign (-) */ +} + +.tooltip { + position: relative; + display: inline-block; +} + +.tooltip .tooltiptext { + visibility: hidden; + width: 140px; + background-color: #555; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 5px; + position: absolute; + z-index: 1; + bottom: 150%; + left: 50%; + margin-left: -75px; + opacity: 0; + transition: opacity 0.3s; +} + +.tooltip .tooltiptext::after { + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; +} + +.tooltip:hover .tooltiptext { + visibility: visible; + opacity: 1; } \ No newline at end of file diff --git a/public/test/file.php b/public/test/file.php deleted file mode 100644 index cce4cbd..0000000 --- a/public/test/file.php +++ /dev/null @@ -1,13 +0,0 @@ - - - - - -
- Select image to upload: - - -
- - - diff --git a/public/test/upload.php b/public/test/upload.php deleted file mode 100644 index a263c35..0000000 --- a/public/test/upload.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/public/upload/metadata.php b/public/upload/metadata.php index fd42121..803a344 100644 --- a/public/upload/metadata.php +++ b/public/upload/metadata.php @@ -10,6 +10,7 @@

+ " id="species" placeholder="Enter a species..">
@@ -52,6 +53,21 @@
+ +
+ + + + + + + + + + +
+ + \ No newline at end of file diff --git a/public/upload/submitmetadata.php b/public/upload/submitmetadata.php index 3163c54..2e7c341 100644 --- a/public/upload/submitmetadata.php +++ b/public/upload/submitmetadata.php @@ -73,7 +73,7 @@ if (isset($_POST['submit'])) if (isset($_POST['name'])) { $_SESSION['observation']['recordist-name'] = $_POST['name']; - setcookie('name', $_SESSION['observation']['name'], time() + 86400 * 365.2, "/"); + setcookie('name', $_SESSION['observation']['recordist-name'], time() + 86400 * 365.2, "/"); } else { $_SESSION['error_msg'] .= "Incorrect Recordist Name.\n"; } @@ -116,6 +116,27 @@ if (isset($_POST['submit'])) { $_SESSION['observation']['remarks'] = $_POST['remarks']; } + /* Optional entries */ + if (isset($_POST['make'])) + { + $_SESSION['observation']['make'] = $_POST['make']; + } + if (isset($_POST['model'])) + { + $_SESSION['observation']['model'] = $_POST['model']; + } + if (isset($_POST['serial'])) + { + $_SESSION['observation']['serial'] = $_POST['serial']; + } + if (isset($_POST['sample_rate'])) + { + $_SESSION['observation']['sample_rate'] = $_POST['sample_rate']; + } + if (isset($_POST['time_expansion'])) + { + $_SESSION['observation']['time_expansion'] = $_POST['time_expansion']; + } } diff --git a/public/upload/submitobservation.php b/public/upload/submitobservation.php index cf10b1f..1f71959 100644 --- a/public/upload/submitobservation.php +++ b/public/upload/submitobservation.php @@ -30,8 +30,34 @@ if ($data = $req->fetch()) { $id = $data['id']; } + +/** Retrieve .wav duration*/ +$filepath = "$root/storage/records/".$_SESSION['observation']['file']; + +function wavDur($file) { + $fp = fopen($file, 'r'); + if (fread($fp,4) == "RIFF") { + fseek($fp, 20); + $rawheader = fread($fp, 16); + $header = unpack('vtype/vchannels/Vsamplerate/Vbytespersec/valignment/vbits',$rawheader); + $pos = ftell($fp); + while (fread($fp,4) != "data" && !feof($fp)) { + $pos++; + fseek($fp,$pos); + } + $rawheader = fread($fp, 4); + $data = unpack('Vdatasize',$rawheader); + $sec = $data['datasize']/$header['bytespersec']; + $minutes = intval(($sec / 60) % 60); + $seconds = intval($sec % 60); + return str_pad($minutes,2,"0", STR_PAD_LEFT).":".str_pad($seconds,2,"0", STR_PAD_LEFT); + } +} + +$t = wavDur($filepath); +print_r($t); try { - $req = $db->prepare('INSERT INTO `records` (author_id, recordist_name, file_name, license, species, subspecies, sound_type, country, lat, lng, date, time, remarks) VALUES ( :id, :recordist_name, :file_name, :license, :species, :subspecies, :sound_type, :country, :lat, :lng, :date, :time, :remarks)'); + $req = $db->prepare('INSERT INTO `records` (author_id, recordist_name, file_name, license, species, subspecies, sound_type, duration, make, model, serial, sample_rate, time_expansion, country, lat, lng, date, time, remarks) VALUES ( :id, :recordist_name, :file_name, :license, :species, :subspecies, :sound_type, :duration, :make, :model, :serial, :sample_rate, :time_expansion, :country, :lat, :lng, :date, :time, :remarks)'); $req->execute(array( "id"=>$id, "recordist_name"=>$_SESSION['observation']['recordist-name'], @@ -40,12 +66,18 @@ try { "species" => $_SESSION['observation']['species'], "subspecies"=>$_SESSION['observation']['subspecies'], "sound_type"=>implode(',', $_SESSION['observation']['type']), + "duration"=>$t, + "make"=>isset($_SESSION['observation']['make']) ? $_SESSION['observation']['make'] : "", + "model"=>isset($_SESSION['osbservation']['model']) ? $_SESSION['osbservation']['model'] : "", + "serial"=>isset($_SESSION['observation']['serial']) ? $_SESSION['observation']['serial'] : "", + "sample_rate"=>isset($_SESSION['observation']['sample_rate']) ? $_SESSION['observation']['sample_rate'] : 384, + "time_expansion"=>isset($_SESSION['observation']['time_expansion']) ? $_SESSION['observation']['time_expansion'] : 10, "country"=>$_SESSION['observation']['country'], "lat"=>$_SESSION['observation']['lat'], "lng"=>$_SESSION['observation']['lng'], "date"=>$_SESSION['observation']['date'], "time"=>$_SESSION['observation']['time'], - "remarks"=>$_SESSION['observation']['remarks'], + "remarks"=>$_SESSION['observation']['remarks'] )); } catch (Exception $e) { die("Error : ".$e->getMessage()); diff --git a/public/upload/verify.php b/public/upload/verify.php index e8049ae..8d2c305 100644 --- a/public/upload/verify.php +++ b/public/upload/verify.php @@ -66,7 +66,7 @@
- +