lotsa shit, user page design, fix currency being a shithead, added icon for it.

This commit is contained in:
ui0ppk 2023-02-05 01:40:28 +02:00
parent 2b8317fb86
commit 938b0143e3
3 changed files with 23 additions and 16 deletions

View File

@ -21,9 +21,9 @@ class PartyStarter {
</li>'; </li>';
$grubloxlogotohome = '<a class="navbar-brand text-dark" href="/home"><div class="headerLogo d-inline-block align-top" alt=""></div></a>'; $grubloxlogotohome = '<a class="navbar-brand text-dark" href="/home"><div class="headerLogo d-inline-block align-top" alt=""></div></a>';
$query = $con->prepare('SELECT money FROM users WHERE id=:id'); $query = $con->prepare('SELECT money FROM users WHERE id=:id');
$query->bindParam(':id', $id); $query->bindParam(':id', $_SESSION['user'], PDO::PARAM_INT);
$query->execute(); $query->execute();
$money = $query->fetch(PDO::FETCH_ASSOC) ["money"] ?? "-0"; $money = $query->fetch(PDO::FETCH_ASSOC)["money"] ?? "0";
if ($money < 1000000) { if ($money < 1000000) {
// Anything less than a million // Anything less than a million
@ -39,7 +39,7 @@ class PartyStarter {
} }
// messy shit sorry mario1 fix it urself :trol: // messy shit sorry mario1 fix it urself :trol:
$rightside = '<li class="nav-item"><a class="nav-link text-dark">' . $money . '</a></li> <li class="nav-item"> $rightside = '<li class="nav-item"><a class="nav-link text-dark"><img class="me-1 my-auto" src="/assets/icons/currency.png" width=24 height=24>'.$money.'</a></li> <li class="nav-item">
<a class="nav-link text-dark" href="/logout"><i class="bi bi-box-arrow-right"></i> Logout</a> <a class="nav-link text-dark" href="/logout"><i class="bi bi-box-arrow-right"></i> Logout</a>
</li>'; </li>';
} }

View File

@ -14,6 +14,9 @@ $conType = $_POST['err'];
} else { } else {
$conType = $_GET['err']; $conType = $_GET['err'];
} }
if(isset($conType)) {
header("Location: /");
}
if($conType == 404) { if($conType == 404) {
$errorImage = ""; $errorImage = "";
$errorTextMain = "404 Not found"; $errorTextMain = "404 Not found";

View File

@ -36,20 +36,24 @@ $getitstarted->header();
</main> </main>
<main class="container text-white" style="width: 100%;"> <main class="container text-white" style="width: 100%;">
<div class="card shadow-sm" style="height: 11.75rem;"> <br>
<div class="card-group" style=" margin-left: 10px; margin-top: 10px;"> <br>
<!-- start card --> <div class="card shadow-sm">
<div class="card text-white border border-0" style="max-width: 130px;">
<a style="text-decoration: none; text-align: center; margin-bottom: 9px;">
<div class="card-body"> <div class="card-body">
<img src="assets/renders/user/headshot?userId=<?php echo (int)htmlspecialchars($requestUser["id"]); ?>" class="rounded-circle" width=100 height=100></img> <img src="assets/renders/user/headshot?userId=<?php echo (int)htmlspecialchars($requestUser["id"]); ?>" class="border border-1 float-start me-3" width=125 height=125></img>
</div> <span class="fs-2"><?php echo htmlspecialchars($requestUser["username"]); ?><br>
</a> <span class="text-muted fs-5 float-start">"i love sex grublox"</span></span><br>
</div><!-- end card --> <div class="text-center float-start" style="width: 8rem;">
<h1><?php echo htmlspecialchars($requestUser["username"]); ?></h1> <h5>Friends</h5>
<h3 class="text-muted">"i love sex grublox"</h3> <h5 class="text-muted">0</h5>
<!-- yes i tried making it --> </div>
</div></div> <div class="text-center float-start" style="width: 8rem;">
<h5>Tokens</h5>
<h5 class="text-muted"><?php echo (int)htmlspecialchars($requestUser["money"]); ?></h5>
</div>
<a class="btn btn-primary float-end mt-4">Add friend</a>
</div>
</div>
</main> </main>
</body> </body>
</html> </html>