mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-18 08:03:11 +00:00
Automated loading of more logs
Fixed other random bugs
This commit is contained in:
parent
517d0b7071
commit
2d7d359cde
11 changed files with 151 additions and 95 deletions
|
@ -698,7 +698,7 @@ if (isset($_POST['account_delete_submit'])) {
|
|||
if (isset($_POST['pfp_submit'])) {
|
||||
if (isset($_SESSION['id'])) {
|
||||
// Root paths
|
||||
$dir = "../../images/pfp/";
|
||||
$dir = "../../usr/images/pfp/";
|
||||
|
||||
// File name updating
|
||||
$file_type = pathinfo($dir.$_FILES['image']['name'],PATHINFO_EXTENSION);
|
||||
|
|
|
@ -59,3 +59,24 @@ if (isset($_POST['delete'])) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['refresh'])) {
|
||||
if ($user_info->is_admin($conn, $_SESSION['id'])) {
|
||||
$request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0");
|
||||
if (mysqli_num_rows($request) > 0) {
|
||||
while ($token = mysqli_fetch_array($request)) {
|
||||
?>
|
||||
<div style="display: flex; flex-direction: row; gap: 0.5rem;">
|
||||
<button onclick='copyCode(this)' class='btn btn-neutral btn-code'><?php echo $token['code']; ?></button>
|
||||
<button onclick='regenerateCode("<?php echo $token["code"]; ?>", this)' class='btn btn-good btn-icon'><img src="assets/icons/arrow-clockwise.svg"></button>
|
||||
<button onclick='deleteCode(<?php echo $token["id"]; ?>)' class='btn btn-bad btn-icon'><img src="assets/icons/cross.svg"></button>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo "<div class='info-text defaultFonts' style='text-align: center !important; margin-left: 0 !important;'>
|
||||
<p>No invite codes/tokens :c</p>
|
||||
</div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"license": "MIT",
|
||||
"version": "22.11.06",
|
||||
"version": "22.11.08",
|
||||
"branch": "main"
|
||||
}
|
|
@ -39,6 +39,11 @@ if (defined('ROOT') && $_SESSION['id'] == 1) {
|
|||
'link'=>'https://github.com/Fluffy-Bean/image-gallery',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
} else {
|
||||
$results[] = array(
|
||||
'type'=>'success',
|
||||
'message'=>'You are running the latest version of the app v'.$app_repo['version']
|
||||
);
|
||||
}
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
|
|
|
@ -54,8 +54,10 @@ if (isset($_POST['check'])) {
|
|||
foreach ($results as $result) {
|
||||
if ($result['type'] == 'critical') {
|
||||
echo "<p class='alert alert-bad'><span class='badge badge-critical'>Critical</span> ";
|
||||
} else {
|
||||
} elseif ($result['type'] == 'warning') {
|
||||
echo "<p class='alert alert-warning'><span class='badge badge-warning'>Warning</span> ";
|
||||
} elseif ($result['type'] == 'success') {
|
||||
echo "<p class='alert alert-good'><span class='badge badge-primary'>Success</span> ";
|
||||
}
|
||||
|
||||
if ($result['fix'] == 'auto') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue