Test Test

This commit is contained in:
ui0ppk 2023-02-07 21:49:48 +02:00
parent a02080c455
commit 016c783b5f
3 changed files with 54 additions and 47 deletions

View File

@ -26,10 +26,13 @@ Signing off, qzip.
</head>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body>
<main class="container" style="width: 100%; float: left; margin-left: 20px">
<main class="container" style="width: 100%; margin-left: 20px">
<br>
<br>
<h4 class="text-white card-title">Popular</h4>
<div class="d-flex flex-row justify-content-between mb-3">
<h4 class="text-white card-title">Popular</h4>
<a href="/all_games?filter=popular" class="btn btn-link text-decoration-none align-self-end">See all <i class="bi bi-caret-right"></i></a>
</div>
<div id="games-popular" class="carousel carousel-dark slide">
<div class="carousel-inner">
<div class="carousel-item active">
@ -78,7 +81,10 @@ Signing off, qzip.
</div>
<br>
<h4 class="text-white card-title">Most played</h4>
<div class="d-flex flex-row justify-content-between mb-3">
<h4 class="text-white card-title">Most played</h4>
<a href="/all_games?filter=mostplayed" class="btn btn-link text-decoration-none align-self-end">See all <i class="bi bi-caret-right"></i></a>
</div>
<div id="games-most-played" class="carousel carousel-dark slide">
<div class="carousel-inner">
<div class="carousel-item active">

View File

@ -46,7 +46,10 @@ $getitstarted->header();
<img src="assets/renders/user/headshot?userId=<?php echo (int)htmlspecialchars($user->getID($con, $user->getUsername())); ?>" class="rounded-circle" width=190 height=190></img>
<span class="text-center" style="font-size: 2rem; margin-left: 6px;"><?php echo $himsg; ?>, <?php echo htmlspecialchars($user->getUsername()); ?>!</span>
<div style="margin-bottom: 50px;"></div>
<h4 class=" card-title" style="margin-bottom: 15px;">Friends (<?php $q=$con->prepare("SELECT count(*) FROM users");$q->execute();echo $q->fetchColumn(); ?>)</h4>
<div class="d-flex flex-row justify-content-between mb-3">
<h4 class=" card-title">Friends (<?php $q=$con->prepare("SELECT count(*) FROM users");$q->execute();echo $q->fetchColumn(); ?>)</h4>
<a href="/" class="btn btn-link text-decoration-none align-self-end">See all <i class="bi bi-caret-right"></i></a>
</div>
<div class="card shadow-sm" style="height: 11.75rem;">
<div class="card-group" style=" margin-left: 10px; margin-top: 10px;">
<?php
@ -73,41 +76,43 @@ $getitstarted->header();
</div>
<br>
<h4 class=" card-title">Recently played</h4>
<div class="card-group" style=" margin-top: 15px;">
<div class="card border-start rounded shadow-sm" style="max-width: 170px; margin-right: 9px;">
<a href="game?id=1" style="text-decoration: none; text-align: left; margin-bottom: 9px;">
<img src="https://tr.rbxcdn.com/4e0bd5c77756dce55561929587ff8772/150/150/Image/Png" class="card-img-top rounded-top" alt="...">
<div class="card-body">
<small class="card-title text-white" style="font-size: 1rem;">Build to survive ur mom</small><br>
<small class="card-text text-muted">69 playing</small>
<div class="progress rounded-4 border border-secondary" style="margin-left: 20px; margin-top: 10px; margin-bottom: -10px; height: 8px; background: none;">
<div class="progress-bar bg-secondary" role="progressbar" aria-label="Segment one" style="width: 21.5%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<i class="bi bi-hand-thumbs-up-fill text-secondary" style="font-size: 1rem; float: left; margin-top: -8px;"></i>
</div>
</a>
</div>
<div class="card border-start rounded shadow-sm" style="max-width: 170px; margin-right: 9px;">
<a href="game?id=1" style="text-decoration: none; text-align: left; margin-bottom: 9px;">
<img src="https://tr.rbxcdn.com/4e0bd5c77756dce55561929587ff8772/150/150/Image/Png" class="card-img-top rounded-top" alt="...">
<div class="card-body">
<small class="card-title text-white" style="font-size: 1rem;">Build to survive ur mom</small><br>
<small class="card-text text-muted">69 playing</small>
<div class="progress rounded-4 border border-secondary" style="margin-left: 20px; margin-top: 10px; margin-bottom: -10px; height: 8px; background: none;">
<div class="progress-bar bg-secondary" role="progressbar" aria-label="Segment one" style="width: 21.5%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<i class="bi bi-hand-thumbs-up-fill text-secondary" style="font-size: 1rem; float: left; margin-top: -8px;"></i>
</div>
</a>
</div>
<div class="d-flex flex-row justify-content-between mb-3">
<h4 class="card-title">Recently played</h4>
<a href="/" class="btn btn-link text-decoration-none align-self-end">See all <i class="bi bi-caret-right"></i></a>
</div>
<div class="row row-cols-sm-2 row-cols-sm-3 row-cols-lg-4 row-cols-xl-6 g-4">
<?php
$sql = "SELECT allStar FROM games LIMIT 6";
$q = $con->prepare(str_replace('allStar', 'count(*)', $sql));
$q->execute();
$numberOfGames = $q->fetchColumn();
$q = $con->prepare(str_replace('allStar', '*', $sql));
$q->execute();
if ($numberOfGames >= 1) {
while ($game = $q->fetch()) {
$playingCount = 69;
?>
<div class="col">
<div class="card bg-dark border-start rounded shadow-sm" style="width: 11.5rem;">
<a href="game?id=<?php echo (int)htmlspecialchars($game["id"]); ?>" style="text-decoration: none; text-align: left; margin-bottom: 9px;">
<img src="<?php if (!empty($game["thumbnail"])) {echo htmlspecialchars($game["thumbnail"]);} else {echo "assets/placeholder.png";} ?>" class="card-img-top rounded-top" alt="<?php echo htmlspecialchars($game["name"]); ?>">
<div class="card-body">
<small class="card-title text-white" style="font-size: 1rem;"><?php echo htmlspecialchars($game["name"]); ?></small>
<br>
<small class="card-text text-muted"><?php echo (int)$playingCount; ?> playing</small>
<div class="progress rounded-4 border border-secondary" style="margin-left: 20px; margin-top: 10px; margin-bottom: -10px; height: 8px; background: none;">
<div class="progress-bar bg-secondary" role="progressbar" aria-label="Segment one" style="width: 21.5%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<i class="bi bi-hand-thumbs-up-fill text-secondary" style="font-size: 1rem; float: left; margin-top: -8px;"></i>
</div>
</a>
</div>
</div>
<?php
}
echo "</div>";
} else {
echo "</div> <h4 class='text-muted text-center'><i class='bi bi-egg-fried' style='font-size: 6rem;'></i><br> Looks like there are no games, sad.</h4>";} ?>
</main>
</body>
</html>

View File

@ -43,18 +43,18 @@ $getitstarted->header();
</head>
<title><?php echo htmlspecialchars($item["name"]); ?> | <?php echo $sitename; ?></title>
<body>
<main class="container d-flex justify-content-center">
<main class="container mx-auto">
<div class="d-flex flex-row mb-3 justify-content-center">
<h1 class="mt-3"><?php echo htmlspecialchars($item["name"]); ?></h1>
<div class="d-flex flex-row mb-3">
<img src="<?php if (!empty($item["thumbnail"])) {echo htmlspecialchars($item["thumbnail"]);} else {echo "assets/placeholder.png";} ?>">
<div>
sdasdas
</div>
<div class="border border-2 bg-light-subtle" style="width: 13rem; height: 8.4rem;">
<div class="border border-2 bg-light-subtle h-25" style="width: 13rem;">
<div class="mx-auto text-center p-2">
<p>Price: <span class="text-success"><span class="grufont fs-5">@ </span><?php echo getMoney(htmlspecialchars($item["price"]))." (".htmlspecialchars($item["price"]).")"; ?></span></p>
<button class="btn btn-success" style="width: 10rem;">Buy with <span class="grufont fs-5">@</span></button>
@ -63,10 +63,6 @@ sdasdas
</div>
</div>
</div>
</main>
</body>
</html>