TKK_E32210823/header.php

74 lines
1.9 KiB
PHP

<?php
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
if (!isset($_SESSION['login_user'])) {
header('Location: index.html');
}
global $user, $user_id;
$user = $_SESSION['login_user'];
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];
}
?>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/header.css">
</head>
<header>
<div class="header">
<!-- <div class="logo">
<a href="#">Laporan Absensi</a>
<img src="images/logo.png" height="100px">
</div> -->
<div class="row">
<div class="col-sm-4 text-right">
</div>
<div class="col-sm-4 text-center" id="judul" style="
font-size: 40px;
color: #000000;
font-style: italic;">
ABSENSI KARYAWAN
</div>
</div>
</div>
<div class="topnav" id="myTopnav" <?php if ($_SESSION['login_user'] != "admin") { echo 'style="display:none"'; } ?>>
<a href="UsersLog.php">Users Log</a>
<a href="logout.php">Logout - user</a>
<a href="javascript:void(0);" class="icon" onclick="navFunction()">
<i class="fa fa-bars"></i></a>
</div>
<div class="topnav" id="myTopnav" <?php if ($_SESSION['login_user'] == "admin") { echo 'style="display:none"'; } ?>>
<a href="UsersLog.php">Dashboard</a>
<a href="logout.php">Logout - <?=$_SESSION['login_user']; ?></a>
<a href="javascript:void(0);" class="icon" onclick="navFunction()">
<i class="fa fa-bars"></i></a>
</div>
</header>
<script>
function navFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>