This commit is contained in:
biglyderv 2025-01-02 21:50:07 -05:00
parent 383473e4bc
commit b27b98fe3f
2 changed files with 14 additions and 2 deletions

5
docs/auth.php Normal file
View file

@ -0,0 +1,5 @@
<?php
require("../libs/auth.php");
global $username;
echo $username;
?>

View file

@ -30,7 +30,14 @@
$stmt->execute([$user,$token]); $stmt->execute([$user,$token]);
setcookie("token", $token, time()+3600*24); setcookie("token", $token, time()+3600*24);
if (isset($_GET['next'])) {
$gett = htmlspecialchars($_GET['next'] . '?token=' . $token);
echo "<script>window.location.href = '$gett'</script>";
page_footer();
die();
}
header("Location: /"); header("Location: /");
die(); die();
} }
@ -45,4 +52,4 @@
)); ));
page_footer(); page_footer();
?> ?>