-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitems.php
More file actions
28 lines (20 loc) · 756 Bytes
/
items.php
File metadata and controls
28 lines (20 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
session_start();
require_once 'bootstrap.php';
use OWG\Weggeefwinkel\Business\ItemService;
use OWG\Weggeefwinkel\Business\UserService;
use OWG\Weggeefwinkel\Business\CityService;
if (!isset($_SESSION["username"])) {
header("location: login.php");
exit(0);
} else {
$itemSvc = new ItemService();
$itemList = $itemSvc->getByUser($_SESSION["username"]);
$userSvc = new UserService();
//$citySvc = new CityService();
//$cityList = $citySvc->getAll();
$user = $userSvc->getByUsername($_SESSION["username"]);
//print_r($user);
$view = $twig->render("items.twig", array("itemList" => $itemList, "username" =>$_SESSION["username"], "user" => $user, "itemsActive" => "active"));
print($view);
}