diff --git a/assets/placeholder.png b/assets/placeholder.png index ec3d926..7633e22 100644 Binary files a/assets/placeholder.png and b/assets/placeholder.png differ diff --git a/assets/placeholder.png~ b/assets/placeholder.png~ index 46d89a1..7633e22 100644 Binary files a/assets/placeholder.png~ and b/assets/placeholder.png~ differ diff --git a/assets/placeholder2.png b/assets/placeholder2.png new file mode 100644 index 0000000..e75688f Binary files /dev/null and b/assets/placeholder2.png differ diff --git a/catalog.php b/catalog.php index b2fd52a..4dab442 100644 --- a/catalog.php +++ b/catalog.php @@ -146,7 +146,7 @@ $getitstarted->header(); ?>
- "> + ">
" height=150 width=150>

Limited'; }; ?>

diff --git a/core/classes/user.php b/core/classes/user.php index d3e9472..ac84c81 100644 --- a/core/classes/user.php +++ b/core/classes/user.php @@ -56,11 +56,15 @@ class User { } public function getAvatar() { + if($this->getUsername() !== "Undefined") { return "/assets/renders/user/headshot?userId=".$this->sqlData["id"]; + } else { + return "/assets/placeholder.png"; + } } public function getAvatarFull() { - return "/assets/renders/user/fullbody?userId=".$this->sqlData["id"]; + return "/assets/renders/user/fullbody?userId=".$this->sqlData["id"] ?? "/assets/placeholder2.png"; } public function getLastPaid() { diff --git a/css/global.css b/css/global.css index 06b2cb3..831db47 100644 --- a/css/global.css +++ b/css/global.css @@ -58,6 +58,32 @@ animation: hover-nav-link 0.4s ease 0s 1 normal forwards; } } +.loading-bootstrapper { +animation: loading-bootstrapper 1.3s ease-out 0.2s infinite normal forwards; +} + +@keyframes loading-bootstrapper { + 0% { + transform: rotate(-360deg); + } + + 5% { + transform: rotate(-365deg); + } + + 25% { + transform: rotate(-375deg); + } + + 30% { + transform: rotate(-375deg); + } + + 100% { + transform: rotate(0deg); + } +} + /* hi do not skid css pls noob - quezip */ diff --git a/item.php b/item.php index 7c2b405..a0658bc 100644 --- a/item.php +++ b/item.php @@ -69,11 +69,14 @@ $getitstarted->header();

Limited'; }; ?>

+
+ +
diff --git a/place.php b/place.php index 725e0fb..0b619b7 100644 --- a/place.php +++ b/place.php @@ -3,25 +3,56 @@ session_start(); require_once 'core/classes.php'; require_once 'core/classes/user.php'; -$user = new User($con, $_SESSION['user'] ?? 0); -if(!$user->isLoggedIn()) { - header('location: /login'); - exit; -} + +$uri = "grublox-player://"; +$uri .= base64_encode("token"); if(!isset($_GET["id"])) { header("Location: ?id=".$_SESSION['user']); } else { $id = (int)$_GET["id"]; } + +if(isset($_SESSION['user'])) { +$user = new User($con, $_SESSION['user']); +$loggedIn = true; +} else { +$loggedIn = false; +} + +function getMoney($money) { + if ($money < 1000000) { + // Anything less than a million + return number_format($money); + } else if ($money < 1000000000) { + // Anything less than a billion + return number_format($money / 1000000, 1) . 'M'; + } else { + // At least a billion + return number_format($money / 1000000000, 1) . 'B'; + } +} + $q = $con->prepare("SELECT * FROM games WHERE id = :id"); $q->bindParam(':id',$id,PDO::PARAM_INT); $q->execute(); -$game = $q->fetch(); -if(!$game) { +$item = $q->fetch(); +$itemUser = new User($con, $item['creator']); +if(!$item) { header('location: /error?err=404'); exit; } + +if($loggedIn == true) { +if($_POST['submit'] ?? "No" == "Yes") { +if($user->getMoney('false') >= htmlspecialchars($item["price"])) { +$q = $con->prepare("UPDATE users SET money=money-:price WHERE id=:id"); +$q->bindParam(':id',$_SESSION['user'],PDO::PARAM_INT); +$q->bindParam(':price',$item['price'],PDO::PARAM_INT); +$q->execute(); +} +} +} ?> @@ -31,11 +62,83 @@ $getitstarted = new PartyStarter; $getitstarted->header(); ?> -<?php echo htmlspecialchars($game["name"]); ?> | <?php echo $sitename; ?> +<?php echo htmlspecialchars($item["name"]); ?> | <?php echo $sitename; ?> -

yes i am FUCKING AGAIN still not hired to make html

-

this game is called

-

with id

-

thats all i have to say

+
+
+

+ +
+

+
+
+
+ "> +
+ +
+ + <?php echo htmlspecialchars($item[" src="getAvatar())) {echo htmlspecialchars($itemUser->getAvatar()); } else { echo "/assets/placeholder.png"; } ?>"> +

getUsername(); ?>

+
+
+

Description: +

+

Created: +

+

Updated: +

+

Players: +

+ +
+
+
+
+ +
+ +
+
+ +
+
+
+
soon commentz
+
gampeas
+
+
+
+
+ + + +
+ + +
+'; +} +?> + + +