forked from mirkofranco/ProgettoTecWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contatti.php
executable file
·24 lines (23 loc) · 1.26 KB
/
contatti.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
<?php
require_once('./scripts/php/Utente.php');
require_once('./scripts/php/Sessione.php');
Sessione::startSession();
$gestioneLogin = "";
if(!isset($_SESSION['user'])){
$gestioneLogin = "<a href=\"login.php\" class=\"header-button\" >Login</a><a href=\"registrazione.php\" class=\"header-button\" >Registrati</a>";
}else{
if($_SESSION['user'] -> getPermessi() == '11'){
$gestioneLogin .= "<a href=\"menu_admin.php\" class=\"header-button\">Area riservata</a>";
}
$gestioneLogin .= "<a href=\"logout.php\" class=\"header-button\">Logout</a>";
}
$daSostituire = array(
"{{pageTitle}}" => "Contatti - Studio AR",
"{{pageDescription}}"=>"Informazioni utili per contattare lo studio AR - architetti riuniti",
"<li class=\"flex-element\"><a href=\"./contatti.php\"><span class=\"navbar-element\">Contatti</span></a></li>" => "<li class=\"flex-element current-page\"><span class=\"navbar-element\">Contatti</span></li>",
"{{gestioneLogin}}" => $gestioneLogin
);
echo str_replace(array_keys($daSostituire), array_values($daSostituire), file_get_contents('./static/_inizio.html'));
echo file_get_contents('./static/contatti.html');
echo file_get_contents('./static/_fine.html');
?>