notes postgres backend
This commit is contained in:
parent
9d716fd449
commit
6519fa6827
9 changed files with 82 additions and 55 deletions
|
|
@ -1,13 +1,11 @@
|
|||
<?php
|
||||
$_shared = $_SERVER["DOCUMENT_ROOT"] . "/templates";
|
||||
$_title = "Password generator";
|
||||
$root = $_SERVER["DOCUMENT_ROOT"];
|
||||
require "$root/templates/header.php";
|
||||
|
||||
require "$_shared/header.php";
|
||||
$str = strtr(base64_encode(random_bytes(15)), '+/', '-_');
|
||||
$str[random_int(0, 19)] = random_int(0, 1) ? '-' : '_';
|
||||
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 "$_shared/footer.php";
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue