-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
64 lines (53 loc) · 1.58 KB
/
header.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
session_start();
include_once './includes/config.php';
include_once './includes/functions.php';
if (isset($_SESSION['logKorisnik'])) {
$logKorisnik = $_SESSION['logKorisnik'];
$logKorisnikID = $_SESSION['logKorisnikID'];
if (isset($_SESSION['logAdmin']))
$logAdmin = TRUE;
else
$logAdmin = FALSE;
if (isset($_SESSION['logRazrednik']))
$logRazrednik = $_SESSION['logRazrednik'];
else
$logRazrednik = FALSE;
if (isset($_SESSION['logStaratelj']))
$logStaratelj = $_SESSION['logStaratelj'];
else
$logStaratelj = FALSE;
$loggedin = TRUE;
}
else {
//$loggedin = FALSE;
destroySession();
header("Location: http://localhost/WebImenik/index.php");
die();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Web imenik</title>
<link href="./css/normalize.css" rel="stylesheet" type="text/css">
<link href="./css/reset.css.css" rel="stylesheet" type="text/css">
<link href="./css/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<nav>
<?php
if ($logAdmin) {
?>
<a href="korisnici.php" id="korisnici">Korisnici</a>
<a href="predmeti.php" id="predmeti">Predmeti</a>
<a href="profesori.php" id="profesori">Profesori</a>
<a href="ucenici.php" id="ucenici">Ucenici</a>
<a href="razredi.php" id="razredi">Razredi</a>
<?php
}
?>
<a href="logout.php">Odlogiraj se</a>
</nav>
<div id="container">