Rewriting classes for de-oopsie-ing

This commit is contained in:
Michał Gdula 2022-10-06 12:06:14 +00:00
parent 7f1782d7c6
commit 646b41e90a
7 changed files with 42 additions and 20 deletions

View file

@ -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'])) {
?>