Projekt

Obecné

Profil

Stáhnout (1.92 KB) Statistiky
| Větev: | Revize:
1 b748cb5f Tomáš Pašek
<?php
2
session_start();
3
?>
4
5 9a7b1f4c Ondřej Anděl
<!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 da7c3f1e Anděl Ondřej
    <link rel="stylesheet" href="view/style.css?<?php echo date('l jS \of F Y h:i:s A'); ?>">
15 9a7b1f4c Ondřej Anděl
    <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 6ddecabb Anděl Ondřej
    <?php include "./view/menu.php" ?>
29 9a7b1f4c Ondřej Anděl
30 6ddecabb Anděl Ondřej
    <div class="row app-content">
31
        <div class="col-xs-12 col-sm-12 p-4 content d-flex">
32 9a7b1f4c Ondřej Anděl
            <?php include "./view/indexContent.html" ?>
33
        </div>
34
    </div>
35
    <?php include "./view/footer.html" ?>
36
</div>
37 a908ef13 Anděl Ondřej
<?php include "./view/modals/loginModal.html" ?>
38 a9bb4272 Ondrej Drtina
<?php include "./view/modals/invalidLoginModal.html" ?>
39 d845d95d Ondrej Drtina
<?php include "./view/modals/settingsModal.html" ?>
40 b748cb5f Tomáš Pašek
<!--TODO logování upravit, zde pouze příklad -->
41
<?php if(isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] == true) {?>
42
    <h1>LOGGEDIN!!!!!!!!!</h1>
43
    <button type="button" class="btn btn-default" data-dismiss="modal" onclick="logout()">Odhlásit se</button>
44
<?php }?>
45 9a7b1f4c Ondřej Anděl
</body>
46
</html>
47 b748cb5f Tomáš Pašek
48
<script>
49
    function logout () {
50
        var data = new FormData();
51
        var xhr = new XMLHttpRequest();
52
        xhr.open("POST", "controller/LogoutController.php");
53
        xhr.onload = function(){
54
            let search = JSON.parse(this.response);
55
            console.log(search);
56
        };
57
        xhr.send(data);
58
        return false;
59
    }
60
61
</script>