finished major pages
This commit is contained in:
parent
ac5b791678
commit
06aa3b1e30
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
|
|
@ -146,7 +146,7 @@ $getitstarted->header();
|
|||
?>
|
||||
<div class="position-relative col">
|
||||
<div class="card shadow-sm h-100 d-inline-block">
|
||||
<a href="item.php?id=<?php echo (int)htmlspecialchars($item["id"]); ?>">
|
||||
<a href="item?id=<?php echo (int)htmlspecialchars($item["id"]); ?>">
|
||||
<div class="d-inline-block card-img-top border border-1">
|
||||
<img src="<?php if (!empty($item["thumbnail"])) {echo htmlspecialchars($item["thumbnail"]);} else {echo "assets/placeholder.png";} ?>" height=150 width=150></a>
|
||||
<p class="me-1 mt-1 position-absolute top-0 end-0"><?php if($item['limited'] == 1) { echo '<span class="badge bg-success">Limited</span>'; }; ?></p>
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
||||
|
||||
|
|
|
|||
12
item.php
12
item.php
|
|
@ -69,11 +69,14 @@ $getitstarted->header();
|
|||
<h3 class="card-header text-start"> <?php echo htmlspecialchars($item["name"]); ?> <?php if($item['limited'] == 1) { echo '
|
||||
<span class="float-end badge bg-success">Limited</span>'; }; ?> </h3>
|
||||
<div class="card-body mx-md-auto mx-xl-0">
|
||||
<img class="img-thumbnail" src="
|
||||
<div class="row g-2">
|
||||
<div class="col-md-6">
|
||||
<img height=300 width=300 class="img-thumbnail border-0" src="
|
||||
<?php if (!empty($item["thumbnail"])) {echo htmlspecialchars($item["thumbnail"]);} else {echo "assets/placeholder.png";} ?>">
|
||||
<div class="float-lg-end p-4 mt-md-2 ms-md-0 ms-lg-4 mt-lg-0 border rounded-2">
|
||||
</div>
|
||||
<div class="col p-4 mt-md-2 ms-md-0 ms-lg-4 mt-lg-0 border-0 rounded-2">
|
||||
<a href="user?id=<?php echo $item['creator']; ?>" class="text-decoration-none">
|
||||
<img class="float-start border border-1 rounded-1 p-2 me-2" width=64 height=64 alt="<?php echo htmlspecialchars($item["name"]); ?>" src="<?php if (!empty($itemUser->getAvatar())) {echo htmlspecialchars($itemUser->getAvatar()); } ?>">
|
||||
<img class="float-start border border-1 rounded-1 me-2" width=64 height=64 alt="<?php echo htmlspecialchars($item["name"]); ?>" src="<?php if (!empty($itemUser->getAvatar())) {echo htmlspecialchars($itemUser->getAvatar()); } ?>">
|
||||
<p class="text-white"> <?php echo $itemUser->getUsername(); ?> </p>
|
||||
</a>
|
||||
<br>
|
||||
|
|
@ -91,6 +94,9 @@ $getitstarted->header();
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix my-4"></div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
|
|
|||
127
place.php
127
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html data-bs-theme="dark">
|
||||
|
|
@ -31,11 +62,83 @@ $getitstarted = new PartyStarter;
|
|||
$getitstarted->header();
|
||||
?>
|
||||
</head>
|
||||
<title><?php echo htmlspecialchars($game["name"]); ?> | <?php echo $sitename; ?></title>
|
||||
<title><?php echo htmlspecialchars($item["name"]); ?> | <?php echo $sitename; ?></title>
|
||||
<body>
|
||||
<h1>yes i am FUCKING AGAIN still not hired to make html</h1>
|
||||
<h1>this game is called <?php echo htmlspecialchars($game["name"]); ?></h1>
|
||||
<h1>with id <?php echo (int)htmlspecialchars($game["id"]); ?></h1>
|
||||
<p>thats all i have to say</p>
|
||||
<main class="container">
|
||||
<div class="mx-auto w-75">
|
||||
<br><br>
|
||||
|
||||
<div class="card shadow-sm w-100">
|
||||
<h3 class="card-header text-start"> <?php echo htmlspecialchars($item["name"]); ?> </h3>
|
||||
<div class="card-body mx-md-auto mx-xl-0">
|
||||
<div class="row g-2">
|
||||
<div class="col-md-6 h-100">
|
||||
<img class="img-thumbnail border-0" height=300 width=500 src="
|
||||
<?php if (!empty($item["thumbnail"])) {echo htmlspecialchars($item["thumbnail"]);} else {echo "assets/placeholder2.png";} ?>">
|
||||
</div>
|
||||
|
||||
<div class="col p-4 mt-md-2 ms-md-0 ms-lg-4 mt-lg-0 border-0 rounded-2 h-100">
|
||||
<a href="user?id=<?php echo $item['creator']; ?>" class="text-decoration-none">
|
||||
<img class="float-start border border-1 rounded-1 me-2" width=64 height=64 alt="<?php echo htmlspecialchars($item["name"]); ?>" src="<?php if (!empty($itemUser->getAvatar())) {echo htmlspecialchars($itemUser->getAvatar()); } else { echo "/assets/placeholder.png"; } ?>">
|
||||
<p class="text-white"> <?php echo $itemUser->getUsername(); ?> </p>
|
||||
</a>
|
||||
<br>
|
||||
<p>Description: <span class="text-white"> <?php echo htmlspecialchars($item["description"]); ?> </span>
|
||||
</p>
|
||||
<p>Created: <span class="text-white"> <?php echo $item["date"]; ?> </span>
|
||||
</p>
|
||||
<p>Updated: <span class="text-white"> <?php echo $item["updateddate"]; ?> </span>
|
||||
</p>
|
||||
<p>Players: <span class="text-white"> <?php echo 0; ?> </span>
|
||||
</p>
|
||||
<button class="btn btn-success fs-4 w-100 <?php if($loggedIn == false) { echo "disabled"; } ?>" onclick="window.location = '<?php echo $uri; ?>';" data-bs-toggle="modal" data-bs-target="#loadBootstrapper"><i class="bi bi-play-fill fs-2"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix my-4"></div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs card-header-tabs nav-fill">
|
||||
<li class="nav-item"> <button class="nav-link active" id="comments-tab" data-bs-toggle="pill" data-bs-target="#comments" type="button" role="tab" aria-controls="comments" aria-selected="true">Comments</button> </li>
|
||||
<li class="nav-item"> <button class="nav-link" id="trades-tab" data-bs-toggle="pill" data-bs-target="#trades" type="button" role="tab" aria-controls="trades" aria-selected="false">Gamepasses</button> </li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<div class="tab-content" id="v-pills-tabContent">
|
||||
<div class="tab-pane fade show active" id="comments" role="tabpanel" aria-labelledby="comments-tab" tabindex="0">soon commentz</div>
|
||||
<div class="tab-pane fade" id="trades" role="tabpanel" aria-labelledby="trades-tab" tabindex="0">gampeas</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<?php if($loggedIn == true) {
|
||||
echo '
|
||||
<div class="modal fade" id="loadBootstrapper" tabindex="1" aria-labelledby="loadBootstrapperLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" style="transform: translateY(20vh);">
|
||||
<button type="button" class="btn-close p-2" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<div class="modal-body text-center mb-5">
|
||||
<div class="p-4">
|
||||
<h1 class="grufont loading-bootstrapper" style="font-size: 8rem;">G</h1>
|
||||
</div>
|
||||
Getting ready to launch <span class="gotham">'.strtoupper($sitename).'</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in New Issue