This commit is contained in:
parent
b077d4a514
commit
53ac4f62c5
|
|
@ -47,7 +47,7 @@ Signing off, qzip.
|
||||||
$x = 8;
|
$x = 8;
|
||||||
for ($i = 1; $i <= $x; $i++) { ?>
|
for ($i = 1; $i <= $x; $i++) { ?>
|
||||||
<div class="card bg-dark border-start rounded shadow-sm" style="max-width: 170px; margin-right: 9px;">
|
<div class="card bg-dark border-start rounded shadow-sm" style="max-width: 170px; margin-right: 9px;">
|
||||||
<a href="game?id=<?php echo (int)htmlspecialchars($game["id"]); ?>" style="text-decoration: none; text-align: left; margin-bottom: 9px;">
|
<a href="place?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"]); ?>">
|
<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">
|
<div class="card-body">
|
||||||
<small class="card-title text-white" style="font-size: 1rem;"><?php echo htmlspecialchars($game["name"]); ?></small>
|
<small class="card-title text-white" style="font-size: 1rem;"><?php echo htmlspecialchars($game["name"]); ?></small>
|
||||||
|
|
@ -101,7 +101,7 @@ Signing off, qzip.
|
||||||
$x = 8;
|
$x = 8;
|
||||||
for ($i = 1; $i <= $x; $i++) { ?>
|
for ($i = 1; $i <= $x; $i++) { ?>
|
||||||
<div class="card bg-dark border-start rounded shadow-sm" style="max-width: 170px; margin-right: 9px;">
|
<div class="card bg-dark border-start rounded shadow-sm" style="max-width: 170px; margin-right: 9px;">
|
||||||
<a href="game?id=<?php echo (int)htmlspecialchars($game["id"]); ?>" style="text-decoration: none; text-align: left; margin-bottom: 9px;">
|
<a href="place?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 "https://media.discordapp.net/attachments/1051588176805892156/1071555366887891064/placeholder.png";} ?>" class="card-img-top rounded-top<?php if(empty($game["thumbnail"])){echo " placeholder";} ?>" alt="<?php echo htmlspecialchars($game["name"]); ?>">
|
<img src="<?php if (!empty($game["thumbnail"])) {echo htmlspecialchars($game["thumbnail"]);} else {echo "https://media.discordapp.net/attachments/1051588176805892156/1071555366887891064/placeholder.png";} ?>" class="card-img-top rounded-top<?php if(empty($game["thumbnail"])){echo " placeholder";} ?>" alt="<?php echo htmlspecialchars($game["name"]); ?>">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<small class="card-title text-white" style="font-size: 1rem;"><?php echo htmlspecialchars($game["name"]); ?></small>
|
<small class="card-title text-white" style="font-size: 1rem;"><?php echo htmlspecialchars($game["name"]); ?></small>
|
||||||
|
|
|
||||||
3
item.php
3
item.php
|
|
@ -19,7 +19,8 @@ $q->bindParam(':id',$id,PDO::PARAM_INT);
|
||||||
$q->execute();
|
$q->execute();
|
||||||
$item = $q->fetch();
|
$item = $q->fetch();
|
||||||
if(!$item) {
|
if(!$item) {
|
||||||
die("go fuck yourself (can't find item)"); // todo: redirect to 404
|
header('location: /error?err=404');
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
require_once 'core/classes.php';
|
||||||
|
require_once 'core/classes/user.php';
|
||||||
|
$user = new User($con, $_SESSION['user']);
|
||||||
|
if(!$user->isLoggedIn()) {
|
||||||
|
header('location: /login');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($_GET["id"])) {
|
||||||
|
header("Location: ?id=".$_SESSION['user']);
|
||||||
|
} else {
|
||||||
|
$id = (int)$_GET["id"];
|
||||||
|
}
|
||||||
|
$q = $con->prepare("SELECT * FROM games WHERE id = :id");
|
||||||
|
$q->bindParam(':id',$id,PDO::PARAM_INT);
|
||||||
|
$q->execute();
|
||||||
|
$game = $q->fetch();
|
||||||
|
if(!$game) {
|
||||||
|
header('location: /error?err=404');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html data-bs-theme="dark">
|
||||||
|
<head>
|
||||||
|
<?php
|
||||||
|
$getitstarted = new PartyStarter;
|
||||||
|
$getitstarted->header();
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<title><?php echo htmlspecialchars($game["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>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
3
user.php
3
user.php
|
|
@ -19,7 +19,8 @@ $q->bindParam(':id',$id,PDO::PARAM_INT);
|
||||||
$q->execute();
|
$q->execute();
|
||||||
$requestUser = $q->fetch();
|
$requestUser = $q->fetch();
|
||||||
if(!$requestUser) {
|
if(!$requestUser) {
|
||||||
die("go fuck yourself (can't find user)"); // todo: redirect to 404
|
header('location: /error?err=404');
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue