buildHeader.php 2.16 KB
Newer Older
jlopez's avatar
jlopez committed
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

<?php 
echo '
<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" crossorigin="anonymous">

    <!-- local fallbacks -->
    <!--link rel="stylesheet" href="./inc/css/bootstrap.min.css">
    <link rel="stylesheet" href="./inc/css/jquery.dataTables.min.css"-->

    <link rel="stylesheet" href="./inc/css/style.css">
    <script src="./inc/js/jscolor.js"></script>
    <title>wicopa</title>

</head>
<body>


<nav class="navbar navbar-expand-md navbar-dark navbar-custom p-1">
    <a class="navbar-brand" href="#">WICOPA</a>
    <div class="collapse navbar-collapse justify-content-between" id="navbar">
        <div class="navbar-nav">
        ';


            echo ' <a class="nav-item nav-link" href="./index.php"> Home </a>';


            echo ' <a class="nav-item nav-link" href="./container.php"> Containers </a>';

            if(isset($_SESSION['username']) && !empty($_SESSION['username']))
            {

                if(isset($_SESSION['manage']) && !empty($_SESSION['manage']))
                {
                    echo ' <a class="nav-item nav-link" href="./manage.php"> Manage </a>';
jlopez's avatar
Fix #7    
jlopez committed
45
                    echo ' <a class="nav-item nav-link" href="./configuration.php"> Configs </a>';
jlopez's avatar
jlopez committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
                }
            }


        echo '
        </div>
        <div class="navbar-nav">
            ';
            if(isset($_SESSION['username']) && !empty($_SESSION['username']))
            {
                echo '<a class="nav-item btn btn-primary " href="./action/action_logout.php"> Logout ('.$_SESSION['username'].') </a>';
            }
            else
            {
                echo '<a class="nav-item btn btn-primary" href="./login.php"> Login </a>';
            }
           
        echo '</div>

</nav>

';