Projekt

Obecné

Profil

Stáhnout (1.92 KB) Statistiky
| Větev: | Revize:
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/invalidLoginModal.html" ?>
39
<?php include "./view/modals/settingsModal.html" ?>
40
<!--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
</body>
46
</html>
47

    
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>
(1-1/4)