Exemplo n.º 1
0
include_once 'basket.php';
$user = new User();
$basket = new Basket();
$items = new Items();
$uid = $_SESSION['uid'];
if (!$user->get_session()) {
    header("location:login.php");
}
if (isset($_GET['q']) && $_GET['q'] == 'logout') {
    $user->user_logout();
    header("location:login.php");
}
if (isset($_GET['q']) && $_GET['q'] == 'deleteItem' && isset($_GET['iid'])) {
    $items->removeFromBasket($_GET['iid']);
}
$allItems = $basket->showBasket();
?>

<?php 
include "header.php";
?>
 	<div class="section-back">
 	<a href="index.php"> < Home </a>
 	</div>
 	<div class="section-header">
 		<h1> Koszyk </h1>
 	</div>
  	<?php 
if ($allItems) {
    foreach ($allItems as $k) {
        ?>