Catalog
-
Browse by
Category
All categories
active">Hats
active">Shirts
active">T-shirts
active">Pants
active">Gears
active">Packages
-
Legend
Limited
Limited Items
Items sold by people that are available for a limited time.
prepare(str_replace('allStar', 'COUNT(*)', $sql));
$q->execute();
$numberOfItems = $q->fetchColumn();
$q = $con->prepare(str_replace('allStar', '*', $sql));
$q->execute();
} else {
$sql = "SELECT allStar FROM catalog WHERE type=:filter";
$q = $con->prepare(str_replace('allStar', 'COUNT(*)', $sql));
$q->bindParam(':filter', $filter);
$q->execute();
$numberOfItems = $q->fetchColumn();
$q = $con->prepare(str_replace('allStar', '*', $sql));
$q->bindParam(':filter', $filter);
$q->execute();
}
if ($numberOfItems >= 1) {
$rows = array_slice($q->fetchAll(), $offset, $limit);
foreach ($rows as $item) {
$query = $con->prepare('SELECT COUNT(id) FROM users WHERE id=:id');
$query->bindParam(':id', $_SESSION['user'], PDO::PARAM_INT);
$query->execute();
$userExists = $query->fetchColumn();
if($userExists <= 1) {
$user = new User($con, $item["creator"]);
$creator = [
"id" => (int)htmlspecialchars($item["creator"]),
"username" => $user->getUsername($con, (int)htmlspecialchars($item["creator"]))
];
} else {
$creator = [
"id" => 0,
"username" => "[ unknown user ]"
];
}
?>
";} ?>
';
} else {
echo '
Looks like there are no items in the catalog yet...
";} ?>
';
}
?>
footer(); ?>