password - no echo, media - redirect
This commit is contained in:
parent
7755aa53f7
commit
88d7cb4f69
5 changed files with 16 additions and 11 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
/favicon.ico
|
|
||||||
/local/net
|
/local/net
|
||||||
/local/urls
|
/favicon.ico
|
||||||
/local/videos
|
/local/media/urls
|
||||||
|
/local/media/videos
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,9 @@ require "$root/templates/header.php";
|
||||||
|
|
||||||
$str = strtr(base64_encode(random_bytes(15)), '+/', '-_');
|
$str = strtr(base64_encode(random_bytes(15)), '+/', '-_');
|
||||||
$str[random_int(0, 19)] = random_int(0, 1) ? '-' : '_';
|
$str[random_int(0, 19)] = random_int(0, 1) ? '-' : '_';
|
||||||
echo "<div>$str</div>\n";
|
echo "<button onclick='navigator.clipboard.writeText(\"$str\").then(
|
||||||
|
() => { result.innerHTML = \"Copied\"; } );'>Copy</button><br>\n";
|
||||||
|
echo "<span id='result'></span>\n";
|
||||||
|
|
||||||
require "$root/templates/footer.php";
|
require "$root/templates/footer.php";
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@ require "$root/templates/header.php";
|
||||||
<a href="app/pswd.php">Password generator</a><br>
|
<a href="app/pswd.php">Password generator</a><br>
|
||||||
<h4>Private</h4>
|
<h4>Private</h4>
|
||||||
<a href="vw">Vaultwarden</a><br>
|
<a href="vw">Vaultwarden</a><br>
|
||||||
<a href="local/apps/get.php">Media manager</a><br>
|
<a href="grafana">Grafana</a><br>
|
||||||
<a href="local/apps/load.php">Media downloader</a><br>
|
<a href="local/media/get.php">Media viewer</a><br>
|
||||||
|
<a href="local/media/load.php">Media downloader</a><br>
|
||||||
<?php
|
<?php
|
||||||
require "$root/templates/footer.php";
|
require "$root/templates/footer.php";
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
$title = "Media manager";
|
$title = "Media viewer";
|
||||||
$root = $_SERVER["DOCUMENT_ROOT"];
|
$root = $_SERVER["DOCUMENT_ROOT"];
|
||||||
require "$root/templates/header.php";
|
require "$root/templates/header.php";
|
||||||
|
|
||||||
$urls_base = __DIR__ . "/../urls";
|
$urls_base = __DIR__ . "/urls";
|
||||||
if (isset($_GET["list"])) {
|
if (isset($_GET["list"])) {
|
||||||
$file = "$urls_base/" . $_GET["list"];
|
$file = "$urls_base/" . $_GET["list"];
|
||||||
$urls = json_decode(file_get_contents($file));
|
$urls = json_decode(file_get_contents($file));
|
||||||
$url = $urls[array_rand($urls)];
|
header("Location: " . $urls[array_rand($urls)]);
|
||||||
echo "<a href='$url'>Watch</a><br>";
|
|
||||||
} else {
|
} else {
|
||||||
foreach (scandir($urls_base) as $list) {
|
foreach (scandir($urls_base) as $list) {
|
||||||
if ($list === '.' || $list === '..')
|
if ($list === '.' || $list === '..')
|
||||||
continue;
|
continue;
|
||||||
echo "<a href='" . $_SERVER['PHP_SELF'] . "?list=$list'>List $list</a><br>";
|
echo "<a href='" . $_SERVER['PHP_SELF'] . "?list=$list'>Try $list</a><br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
3
todo
Normal file
3
todo
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
- copy button
|
||||||
|
- notes manager
|
||||||
|
- video downloader
|
||||||
Loading…
Add table
Add a link
Reference in a new issue