-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplace.php
27 lines (26 loc) · 824 Bytes
/
place.php
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
require_once 'initializer.php';
if(isUserLoggedIn()) {
switch($_SESSION["tipoUtente"]){
case "Admin":
$templateParams["bottone"] = 'template/admin/place.php';
break;
case "Organizzatore":
$templateParams["bottone"] = 'template/organizzatore/place.php';
break;
case "Cliente":
$templateParams["bottone"] = 'template/cliente/place.php';
break;
}
}
//Base Template
$templateParams["titolo"] = "TicketTwo";
$templateParams["infoLuogo"] = $dbh->getPlaceById($_GET["id"]);
if(count($templateParams["infoLuogo"])==0){
header("location: error404.php");
} else {
$templateParams["nome"] = "template/place.php";
$templateParams["eventi"] = $dbh->getEventByIdPlace($_GET["id"]);
}
require 'template/base.php';
?>