From d0d3e8fde528eb6bea7ed82ce408416d43be777f Mon Sep 17 00:00:00 2001
From: Mario <100047175+Mariopizza1@users.noreply.github.com>
Date: Wed, 25 Jan 2023 22:06:56 +0200
Subject: [PATCH] Update classes.php
---
core/classes.php | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/core/classes.php b/core/classes.php
index 522fc65..8551032 100644
--- a/core/classes.php
+++ b/core/classes.php
@@ -6,32 +6,33 @@ session_start();
require('core/config.php');
class PartyStarter {
- // creates header
- function header()
- {
- echo "test";
- }
function bootstrap() {
echo '';
}
- function buildloggedoutheader() {
+ function header() {
+ // to not confuse you i renamed it from loggedoutheader to header since qzip made it both lol
require('core/config.php');
+ $showhome = '';
if(isset($_SESSION['user'])) {
+ $showhome = '
+ Home
+ (current)
+
+ ';
$query = $con->prepare('SELECT money FROM users WHERE id=:id');
$query->bindParam(':id', $id);
- $query->execute();
- $money = $query->fetch(PDO::FETCH_ASSOC)["money"];
- $currencyIcon = "$";
+ $query->execute();
+ $money = $query->fetch(PDO::FETCH_ASSOC)["money"] ?? "-0";
if ($money < 1000000) {
// Anything less than a million
- $money = $currencyIcon.number_format($money);
+ $money = number_format($money);
} else if ($money < 1000000000) {
// Anything less than a billion
- $money = $currencyIcon.number_format($money / 1000000, 1) . 'M';
+ $money = number_format($money / 1000000, 1) . 'M';
} else {
// At least a billion
- $money = $currencyIcon.number_format($money / 1000000000, 1) . 'B';
+ $money = number_format($money / 1000000000, 1) . 'B';
}
// messy shit sorry mario1 fix it urself :trol:
@@ -58,11 +59,7 @@ class PartyStarter {
- -
- Home
- (current)
-
-
+ ' . $showhome . '
-
Games
@@ -85,4 +82,4 @@ class PartyStarter {
}
-?>
\ No newline at end of file
+?>