Projekt

Obecné

Profil

Stáhnout (1.87 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
    <div class="row app-content">
29
        <?php include "./view/menu.php" ?>
30
31
        <div class="col-xs-12 col-sm-10 p-4 content d-flex">
32
            <?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 d845d95d Ondrej Drtina
<?php include "./view/modals/settingsModal.html" ?>
39 b748cb5f Tomáš Pašek
<!--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 9a7b1f4c Ondřej Anděl
</body>
45
</html>
46 b748cb5f Tomáš Pašek
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
            console.log(search);
55
        };
56
        xhr.send(data);
57
        return false;
58
    }
59
60
</script>