asdas
This commit is contained in:
parent
5f02ba2687
commit
a02080c455
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 7.0 KiB |
|
|
@ -105,7 +105,7 @@ $getitstarted->header();
|
||||||
<span class="badge bg-success" >Limited</span>
|
<span class="badge bg-success" >Limited</span>
|
||||||
<br>
|
<br>
|
||||||
<p class="text-white">Limited Items </p>
|
<p class="text-white">Limited Items </p>
|
||||||
<p>Owners of these discontinued items can re-sell them to other users at any price.</p>
|
<p>Items sold by people that are available for a limited time.</p>
|
||||||
<div class="pt-2"></div>
|
<div class="pt-2"></div>
|
||||||
<span class="badge bg-success">Limited <span class="badge bg-warning text-dark">U</span>
|
<span class="badge bg-success">Limited <span class="badge bg-warning text-dark">U</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -146,12 +146,12 @@ $getitstarted->header();
|
||||||
<div class="d-inline-block card-img-top border border-1">
|
<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>
|
<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>
|
<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>
|
||||||
<span class="fs-6 mb-2 ms-2 opacity-75 bg-success badge"><span class="grufont fs-5">@ </span><?php echo getMoney((int)htmlspecialchars($item["price"])); ?></span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title"><?php echo htmlspecialchars($item["name"]); ?></h5>
|
<h5 class="card-title"><?php echo htmlspecialchars($item["name"]); ?></h5>
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
By <a href="user.php?id=<?php echo (int)htmlspecialchars($creator["id"]); ?>" class="btn-link"><?php echo htmlspecialchars($creator["username"]); ?></a>
|
By <a href="user.php?id=<?php echo (int)htmlspecialchars($creator["id"]); ?>" class="btn-link"><?php echo htmlspecialchars($creator["username"]); ?></a><br>
|
||||||
|
<span class="text-success"><span class="grufont fs-5">@ </span><?php echo getMoney((int)htmlspecialchars($item["price"])); ?></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
42
item.php
42
item.php
|
|
@ -10,6 +10,20 @@ if(!isset($_GET["id"])) {
|
||||||
} else {
|
} else {
|
||||||
$id = (int)$_GET["id"];
|
$id = (int)$_GET["id"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 catalog WHERE id = :id");
|
$q = $con->prepare("SELECT * FROM catalog WHERE id = :id");
|
||||||
$q->bindParam(':id',$id,PDO::PARAM_INT);
|
$q->bindParam(':id',$id,PDO::PARAM_INT);
|
||||||
$q->execute();
|
$q->execute();
|
||||||
|
|
@ -29,12 +43,30 @@ $getitstarted->header();
|
||||||
</head>
|
</head>
|
||||||
<title><?php echo htmlspecialchars($item["name"]); ?> | <?php echo $sitename; ?></title>
|
<title><?php echo htmlspecialchars($item["name"]); ?> | <?php echo $sitename; ?></title>
|
||||||
<body>
|
<body>
|
||||||
<main class="container mx-auto" style="width: 100%;">
|
<main class="container d-flex justify-content-center">
|
||||||
<h1 class="mt-3"><?php echo htmlspecialchars($item["name"]); ?></h1>
|
<h1 class="mt-3"><?php echo htmlspecialchars($item["name"]); ?></h1>
|
||||||
<h1>this item is called <?php echo htmlspecialchars($item["name"]); ?></h1>
|
|
||||||
<h1>with id <?php echo (int)htmlspecialchars($item["id"]); ?></h1>
|
<div class="d-flex flex-row mb-3">
|
||||||
<h1>and he costs $<?php echo (int)htmlspecialchars($item["price"]); ?></h1>
|
|
||||||
<p>thats all i have to say</p>
|
<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="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>
|
||||||
|
<p>(0 sold)</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue