first upload
This commit is contained in:
47
header.php
Normal file
47
header.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Header Template
|
||||
* Territory Manager
|
||||
*/
|
||||
|
||||
$current_page = basename($_SERVER['PHP_SELF'], '.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="it">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?php echo isset($page_title) ? $page_title . ' - ' : ''; ?><?php echo APP_NAME; ?></title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar">
|
||||
<div class="container">
|
||||
<div class="navbar-brand">
|
||||
<a href="index.php"><?php echo APP_NAME; ?></a>
|
||||
</div>
|
||||
<ul class="navbar-menu">
|
||||
<li><a href="index.php" class="<?php echo $current_page === 'index' ? 'active' : ''; ?>">Dashboard</a></li>
|
||||
<li><a href="territories.php" class="<?php echo $current_page === 'territories' ? 'active' : ''; ?>">Territori</a></li>
|
||||
<li><a href="assignments.php" class="<?php echo $current_page === 'assignments' ? 'active' : ''; ?>">Assegnazioni</a></li>
|
||||
<li><a href="statistics.php" class="<?php echo $current_page === 'statistics' ? 'active' : ''; ?>">Statistiche</a></li>
|
||||
<?php if (isAdmin()): ?>
|
||||
<li><a href="settings.php" class="<?php echo $current_page === 'settings' ? 'active' : ''; ?>">Impostazioni</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<div class="navbar-user">
|
||||
<span>Ciao, <strong><?php echo htmlspecialchars($_SESSION['username']); ?></strong></span>
|
||||
<a href="logout.php" class="btn btn-sm btn-secondary">Esci</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="container">
|
||||
<?php
|
||||
$flash = getFlashMessage();
|
||||
if ($flash):
|
||||
?>
|
||||
<div class="alert alert-<?php echo $flash['type']; ?>">
|
||||
<?php echo htmlspecialchars($flash['text']); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user