';
}
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"] ?? "-0";
if ($money < 1000000) {
// Anything less than a million
$money = number_format($money);
} else if ($money < 1000000000) {
// Anything less than a billion
$money = number_format($money / 1000000, 1) . 'M';
} else {
// At least a billion
$money = number_format($money / 1000000000, 1) . 'B';
}
// messy shit sorry mario1 fix it urself :trol:
$rightside = ''.$money.'
Logout
';
} else {
$rightside = '
Register
Login
';
}
echo '';
echo '
';
}
}
?>