mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2024-12-28 18:36:22 +00:00
Filesize + account section fix
This commit is contained in:
parent
41d98a7d47
commit
eeb79ec53c
16
account.php
16
account.php
|
@ -28,13 +28,11 @@
|
||||||
?>
|
?>
|
||||||
<div class="admin-root">
|
<div class="admin-root">
|
||||||
<h2>Admin controlls</h2>
|
<h2>Admin controlls</h2>
|
||||||
<br>
|
|
||||||
<h3>Invite Codes</h3>
|
<h3>Invite Codes</h3>
|
||||||
<?php
|
<?php
|
||||||
$token_request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0");
|
$token_request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0");
|
||||||
while ($token = mysqli_fetch_array($token_request)) {
|
while ($token = mysqli_fetch_array($token_request)) {
|
||||||
?>
|
?>
|
||||||
<br>
|
|
||||||
<button onclick='copyCode()' class='btn btn-neutral'><?php echo $token['code']; ?></button>
|
<button onclick='copyCode()' class='btn btn-neutral'><?php echo $token['code']; ?></button>
|
||||||
<script>
|
<script>
|
||||||
function copyCode() {
|
function copyCode() {
|
||||||
|
@ -44,20 +42,8 @@
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
echo "</div>";
|
||||||
<br>
|
|
||||||
<h3>Database info</h3>
|
|
||||||
<?php
|
|
||||||
echo "<p>Address: ".$database['ip'].":".$database['port']."</p>";
|
|
||||||
echo "<p>Username: ".$database['username']."</p>";
|
|
||||||
echo "<p>Password: Not displayed</p>";
|
|
||||||
echo "<p>Database: ".$database['database']."</p>";
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<div class="login-root">
|
<div class="login-root">
|
||||||
|
|
|
@ -195,6 +195,13 @@
|
||||||
// Image resolution
|
// Image resolution
|
||||||
list($width, $height) = getimagesize($image_path);
|
list($width, $height) = getimagesize($image_path);
|
||||||
echo "<p>Image resolution: ".$width."x".$height."</p>";
|
echo "<p>Image resolution: ".$width."x".$height."</p>";
|
||||||
|
|
||||||
|
function human_filesize($bytes, $decimals = 2) {
|
||||||
|
$sz = 'BKMGTP';
|
||||||
|
$factor = floor((strlen($bytes) - 1) / 3);
|
||||||
|
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
|
||||||
|
}
|
||||||
|
echo "<p>File size: ".human_filesize(filesize($image_path), 2)."</p>";
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue