chiro-canto/public/upload/index.php

61 lines
1.8 KiB
PHP
Raw Normal View History

2021-03-29 19:35:47 +02:00
2021-03-28 20:40:17 +02:00
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
2021-03-29 19:35:47 +02:00
2021-03-29 12:05:53 +02:00
if (! isset($_SESSION['error_msg'])) {
$_SESSION['error_msg'] = "";
}
2021-03-28 20:40:17 +02:00
if (!isset($_SESSION['username']) or $_SESSION['username'] == "") {
$_SESSION['error_msg'] .= "You need to be logged in to upload recordings.";
header('Location: /auth/login');
}
2021-03-28 20:40:17 +02:00
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
?>
<!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>Upload | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
2021-04-16 19:14:52 +02:00
include("$root/analytics/owa.php");
include("$root/analytics/matomo.php");
?>
2021-03-28 20:40:17 +02:00
<body>
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Upload Your Recording</h2>
2021-03-30 07:31:22 +02:00
<?php echo (isset($_SESSION['error_msg']) and ! $_SESSION['error_msg'] == "" ) ? '<div class="error">'.$_SESSION['error_msg'].'</div>' : "";
2021-03-28 20:40:17 +02:00
if (isset($_GET['step']))
{
if ($_GET['step'] == 'location') {
include("location.php");
} else if ($_GET['step'] == 'metadata') {
include("metadata.php");
} else if ($_GET['step'] == 'verify') {
include("verify.php");
}
2021-04-19 20:34:09 +02:00
else if ($_GET['step'] == 'upload') {
include("upload.php");
}
2021-03-28 20:40:17 +02:00
else {
include("location.php");
}
} else {
2021-04-19 20:34:09 +02:00
include("upload.php");
2021-03-28 20:40:17 +02:00
}
?>
</section>
<?php include("$root/footer.php");?>
</body>
<script type='text/javascript' src='/scripts/script.js'></script>
</html>