Catalog

prepare("SELECT * FROM catalog WHERE type=:type AND status='Accepted' ORDER BY id DESC"); $stmt->bindValue(':type', $type, PDO::PARAM_STR); $stmt->execute(); $result = $stmt->fetchAll(); $resultCheck = count($result); $numberofpages = ceil($resultCheck / $resultsperpage); ?>
Featured
1){ ?> << Previous Page of : Next >>
prepare("SELECT * FROM catalog WHERE type=:type AND status='Accepted' ORDER BY id DESC LIMIT " . $thispagefirstresult . "," . $resultsperpage); $stmt->bindValue(':type', $type, PDO::PARAM_STR); $stmt->execute(); $result = $stmt->fetchAll(); $resultCheck = count($result); if ($resultCheck > 0) { foreach ($result as $row) { $creatorq = $db->prepare("SELECT * FROM users WHERE id=:creatorid"); $creatorq->bindValue(':creatorid', $row['creatorid'], PDO::PARAM_INT); $creatorq->execute(); $creator = $creatorq->fetch(PDO::FETCH_ASSOC); if($row['type'] == "hat"){ $typea = "hats"; } elseif($row['type'] == "pants"){ $typea = "pants"; } elseif($row['type'] == "shirt"){ $typea = "shirts"; } elseif($row['type'] == "pants"){ $typea = "pants"; } elseif($row['type'] == "head"){ $typea = "heads"; } ?>
Updated: = 31536000) { // More than a year $timeAgo = floor($timeDifference / 31536000); echo $timeAgo . ' year' . ($timeAgo > 1 ? 's' : '') . ' ago'; } elseif ($timeDifference >= 2419200) { // More than a month $timeAgo = floor($timeDifference / 2419200); echo $timeAgo . ' month' . ($timeAgo > 1 ? 's' : '') . ' ago'; } elseif ($timeDifference >= 604800) { // More than a week $timeAgo = floor($timeDifference / 604800); echo $timeAgo . ' week' . ($timeAgo > 1 ? 's' : '') . ' ago'; } elseif ($timeDifference >= 86400) { // More than a day $timeAgo = floor($timeDifference / 86400); echo $timeAgo . ' day' . ($timeAgo > 1 ? 's' : '') . ' ago'; } elseif ($timeDifference >= 3600) { // More than an hour $timeAgo = floor($timeDifference / 3600); echo $timeAgo . ' hour' . ($timeAgo > 1 ? 's' : '') . ' ago'; } elseif ($timeDifference >= 60) { // More than a minute $timeAgo = floor($timeDifference / 60); echo $timeAgo . ' minute' . ($timeAgo > 1 ? 's' : '') . ' ago'; } else { // Less than a minute echo $timeDifference . ' second' . ($timeDifference > 1 ? 's' : '') . ' ago'; } ?>
Creator:
Number Sold: prepare("SELECT * FROM owneditems WHERE itemid=:itemid"); $stmt2->bindValue(':itemid', $row['id'], PDO::PARAM_STR); $stmt2->execute(); $result2 = $stmt2->rowCount(); echo $result2; ?>
Favorited: 0 times
: