mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-10 12:23:12 +00:00
Rewriting classes for de-oopsie-ing
This commit is contained in:
parent
7f1782d7c6
commit
646b41e90a
7 changed files with 42 additions and 20 deletions
23
index.php
23
index.php
|
@ -26,12 +26,21 @@
|
|||
unset($_SESSION['del']);
|
||||
}
|
||||
if (isset($_SESSION['welc'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('O hi <?php echo $_SESSION["username"]; ?>', 'You are now logged in, enjoy your stay!', 'var(--success)', 'assets/icons/hand-waving.svg');
|
||||
</script>
|
||||
<?php
|
||||
unset($_SESSION['welc']);
|
||||
$user = $user_info->get_user_info($conn, $_SESSION['id']);
|
||||
|
||||
if (isset($user['pfp_path'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('O hi <?php echo $_SESSION["username"]; ?>', 'You are now logged in, enjoy your stay!', 'var(--success)', 'images/pfp/<?php echo $user["pfp_path"]; ?>');
|
||||
</script>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('O hi <?php echo $_SESSION["username"]; ?>', 'You are now logged in, enjoy your stay!', 'var(--success)', 'assets/icons/hand-waving.svg');
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($user_info->is_admin($conn, $_SESSION['id'])) {
|
||||
$check_sanity = $sanity->get_results();
|
||||
|
@ -43,6 +52,8 @@
|
|||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
unset($_SESSION['welc']);
|
||||
}
|
||||
if (isset($_SESSION['err'])) {
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue