32 lines
1.2 KiB
PHP
Executable file
32 lines
1.2 KiB
PHP
Executable file
<?php
|
|
require("../libs/auth.php");
|
|
global $username;
|
|
function page_header() {
|
|
global $username; ?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>NewBiglyChat</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="/css/main.css">
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<a href="/"><img class="header-img header-link" src="/img/newlogo.svg"></a>
|
|
<a href="/" class='header-link'>Home</a>
|
|
<?php
|
|
if (isset($username)) { ?>
|
|
<a class="header-link" href="/user.php?id=<?php echo $username ?>"><?php echo $username ?></a>
|
|
<a class="header-link" href="/notif.php">Pings</a>
|
|
<a class="header-link" href="/logout.php">Logout</a>
|
|
<?php } else { ?>
|
|
<a class="header-link" href="/login.php">Login</a>
|
|
<?php }
|
|
?>
|
|
</div>
|
|
<?php }
|
|
function page_footer() { ?>
|
|
</body>
|
|
</html>
|
|
<?php }
|
|
?>
|