1
|
<?php
|
2
|
session_start();
|
3
|
?>
|
4
|
|
5
|
<!doctype html>
|
6
|
|
7
|
<html >
|
8
|
<head>
|
9
|
<meta charset="utf-8">
|
10
|
<title>Dalimilova kronika</title>
|
11
|
|
12
|
<!-- css -->
|
13
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
|
14
|
<link rel="stylesheet" href="view/style.css?<?php echo date('l jS \of F Y h:i:s A'); ?>">
|
15
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
16
|
|
17
|
<!-- jQuery library -->
|
18
|
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
|
19
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
|
20
|
|
21
|
<!-- JavaScript -->
|
22
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
|
23
|
|
24
|
</head>
|
25
|
<body>
|
26
|
<div class="container-fluid">
|
27
|
<?php include "./view/header.html" ?>
|
28
|
<?php include "./view/menu.php" ?>
|
29
|
|
30
|
<div class="row app-content">
|
31
|
<div class="col-xs-12 col-sm-12 p-4 content d-flex">
|
32
|
<?php include "./view/indexContent.html" ?>
|
33
|
</div>
|
34
|
</div>
|
35
|
<?php include "./view/footer.html" ?>
|
36
|
</div>
|
37
|
<?php include "./view/modals/loginModal.html" ?>
|
38
|
<?php include "./view/modals/settingsModal.html" ?>
|
39
|
<!--TODO logování upravit, zde pouze příklad -->
|
40
|
<?php if(isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] == true) {?>
|
41
|
<h1>LOGGEDIN!!!!!!!!!</h1>
|
42
|
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="logout()">Odhlásit se</button>
|
43
|
<?php }?>
|
44
|
</body>
|
45
|
</html>
|
46
|
|
47
|
<script>
|
48
|
function logout () {
|
49
|
var data = new FormData();
|
50
|
var xhr = new XMLHttpRequest();
|
51
|
xhr.open("POST", "controller/LogoutController.php");
|
52
|
xhr.onload = function(){
|
53
|
let search = JSON.parse(this.response);
|
54
|
};
|
55
|
xhr.send(data);
|
56
|
return false;
|
57
|
}
|
58
|
|
59
|
</script>
|