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 = ' '; $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 {