mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-27 11:56:17 +00:00
Updating Login to new AJAX system
This commit is contained in:
parent
10fbfc2067
commit
a5212b1d11
6 changed files with 142 additions and 84 deletions
|
@ -43,7 +43,17 @@
|
|||
echo "<h3>Invite Codes</h3>";
|
||||
$token_request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0");
|
||||
while ($token = mysqli_fetch_array($token_request)) {
|
||||
echo "<p>".$token['code']."</p>";
|
||||
?>
|
||||
<!-- Button that's displayed with the invite code -->
|
||||
<button onclick='copyCode()' class='btn btn-neutral'><?php echo $token['code']; ?></button>
|
||||
<!-- Copy code on click -->
|
||||
<script>
|
||||
function copyCode() {
|
||||
navigator.clipboard.writeText("<?php echo $token['code']; ?>");
|
||||
sniffleAdd("Info", "Invite code has been copied!", "var(--green)", "<?php echo $root_dir; ?>assets/icons/clipboard-text.svg");
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue