diff --git a/assets/font/NewRodin.otf b/assets/font/NewRodin.otf new file mode 100644 index 0000000..6861f73 Binary files /dev/null and b/assets/font/NewRodin.otf differ diff --git a/assets/placeholder2.png~ b/assets/placeholder2.png~ new file mode 100644 index 0000000..e75688f Binary files /dev/null and b/assets/placeholder2.png~ differ diff --git a/catalog.php b/catalog.php index 4dab442..d4078f9 100644 --- a/catalog.php +++ b/catalog.php @@ -38,20 +38,30 @@ $possibleFilters = [ ]; if(isset($_GET["filter"])) { - $page = $_GET["filter"]; - if(!in_array($page,$possibleFilters)) { + $filter = $_GET["filter"]; + if(!in_array($filter,$possibleFilters)) { header('location: /error?err=404'); exit; } } else { - $page = null; + $filter = null; } +if(isset($_GET['p'])) { +$page = $_GET['p']; +} else { +$page = 1; +} +$limit = 18; +$page -= 1; +$offset = $page * $limit; $sql = "SELECT allStar FROM catalog ORDER BY RAND() LIMIT 1"; $q = $con->prepare(str_replace('allStar', 'name', $sql)); $q->execute(); $random_search_array = $q->fetch(); +if($random_search_array || is_array($random_search_array)) { $random_search = array_rand($random_search_array, 1); +} $getitstarted = new PartyStarter; $getitstarted->header(); @@ -63,8 +73,8 @@ $getitstarted->header();

Catalog

@@ -75,32 +85,32 @@ $getitstarted->header();

Category

- All categories - active">Hats - active">Shirts - active">T-shirts - active">Pants - active">Gears - active">Packages - + All categories + active">Hats + active">Shirts + active">T-shirts + active">Pants + active">Gears + active">Packages +
  • @@ -126,7 +136,8 @@ $getitstarted->header(); $q = $con->prepare(str_replace('allStar', '*', $sql)); $q->execute(); if ($numberOfItems >= 1) { - foreach ($q->fetchAll() as $item) { + $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(); @@ -166,6 +177,29 @@ $getitstarted->header(); echo "


    Looks like there are no items in the catalog yet...

    ";} ?>
    + +
    + +
    + diff --git a/core/classes.php b/core/classes.php index 68fd29d..7ea6322 100644 --- a/core/classes.php +++ b/core/classes.php @@ -90,7 +90,7 @@ class PartyStarter { -