made working browsing side bar
This commit is contained in:
parent
443ef86fd2
commit
4755e666c7
33
catalog.php
33
catalog.php
|
|
@ -11,6 +11,13 @@ require_once 'core/classes/user.php';
|
|||
if (isset($_SESSION['user'])) {
|
||||
$user = new User($con, $_SESSION['user']);
|
||||
}
|
||||
|
||||
if(isset($_GET["p"])) {
|
||||
$page = (int) $_GET["p"];
|
||||
} else {
|
||||
$page = 0;
|
||||
}
|
||||
|
||||
$getitstarted = new PartyStarter;
|
||||
$getitstarted->header();
|
||||
?> </head>
|
||||
|
|
@ -33,31 +40,31 @@ $getitstarted->header();
|
|||
<br>
|
||||
<h4>Category</h4>
|
||||
</li>
|
||||
<a href="/catalog" class="list-group-item active" aria-current="true">All categories</a>
|
||||
<a href="?p=1" class="list-group-item">Hats</a>
|
||||
<a href="?p=2" class="list-group-item">Shirts</a>
|
||||
<a href="?p=3" class="list-group-item">Pants</a>
|
||||
<a href="?p=4" class="list-group-item">Gears</a>
|
||||
<a href="?p=5" class="list-group-item">Packages</a>
|
||||
<button class="list-group-item text-start" type="button" data-bs-toggle="dropdown" aria-expanded="false">Body parts</button>
|
||||
<a href="/catalog" class="list-group-item<?php if($page == 0) { ?> active<?php } ?>" aria-current="true">All categories</a>
|
||||
<a href="?p=1" class="list-group-item<?php if($page == 1) { ?> active<?php } ?>">Hats</a>
|
||||
<a href="?p=2" class="list-group-item<?php if($page == 2) { ?> active<?php } ?>">Shirts</a>
|
||||
<a href="?p=3" class="list-group-item<?php if($page == 3) { ?> active<?php } ?>">Pants</a>
|
||||
<a href="?p=4" class="list-group-item<?php if($page == 4) { ?> active<?php } ?>">Gears</a>
|
||||
<a href="?p=5" class="list-group-item<?php if($page == 5) { ?> active<?php } ?>">Packages</a>
|
||||
<button class="list-group-item text-start<?php if($page == 6 || $page == 7 || $page == 8 || $page == 9 || $page == 10 || $page == 11) { ?> active<?php } ?>" type="button" data-bs-toggle="dropdown" aria-expanded="false">Body parts</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="dropdown-item" href="?bp=1">Heads</a>
|
||||
<a class="dropdown-item<?php if($page == 6) { ?> active<?php } ?>" href="?p=6">Heads</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="?bp=2">Torso</a>
|
||||
<a class="dropdown-item<?php if($page == 7) { ?> active<?php } ?>" href="?p=7">Torso</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="?bp=3">Left arm</a>
|
||||
<a class="dropdown-item<?php if($page == 8) { ?> active<?php } ?>" href="?p=8">Left arm</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="?bp=4">Right arm</a>
|
||||
<a class="dropdown-item<?php if($page == 9) { ?> active<?php } ?>" href="?p=9">Right arm</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="?bp=5">Left leg</a>
|
||||
<a class="dropdown-item<?php if($page == 10) { ?> active<?php } ?>" href="?p=10">Left leg</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="?bp=6">Right leg</a>
|
||||
<a class="dropdown-item<?php if($page == 11) { ?> active<?php } ?>" href="?p=11">Right leg</a>
|
||||
</li>
|
||||
</ul>
|
||||
<li class="list-group-item">
|
||||
|
|
|
|||
Loading…
Reference in New Issue