keyload/admin.php

33 lines
679 B
PHP
Raw Normal View History

2023-09-29 21:29:29 +02:00
<?php
/* curload
* Simple file uploading using POST requests and temporary keys
* Licensed under the GNU Affero General Public License version 3.0
*/
2023-09-30 20:31:01 +02:00
include "core.php";
2023-09-30 01:28:36 +02:00
include "config.php";
2023-09-29 21:29:29 +02:00
include "create-table.php";
2023-09-30 23:13:22 +02:00
if (!isset($_COOKIE[$cookieName]) || !isset($_COOKIE[$cookieTypeName])) {
header('Location: login.php?redir=admin');
die();
} else if ($_COOKIE[$cookieTypeName] != 2) { // not allowed
header('Location: /');
2023-09-30 01:28:36 +02:00
die();
}
2023-09-30 20:31:01 +02:00
$html = "";
2023-09-30 22:24:02 +02:00
$html = printHeader($html);
2023-09-29 21:29:29 +02:00
2023-09-30 23:13:22 +02:00
// in case admin keys are disabled
if (!$enableAdminKeys || $enableAdminKeys == "false") {
header('Location: /');
die();
2023-09-29 21:29:29 +02:00
}
2023-09-30 01:28:36 +02:00
2023-09-30 20:31:01 +02:00
$html = printFooter($html);
2023-09-30 01:28:36 +02:00
print "$html";
2023-09-29 21:29:29 +02:00
?>