new-bigly-chat/libs/page.php

32 lines
1.1 KiB
PHP
Raw Normal View History

2024-11-26 11:38:28 -05:00
<?php
require("../libs/auth.php");
2024-11-26 23:37:16 -05:00
global $username;
function page_header() {
global $username; ?>
2024-11-26 11:38:28 -05:00
<!DOCTYPE html>
<html>
<head>
<title>NewBiglyChat</title>
2024-11-27 00:13:33 -05:00
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2024-11-26 11:38:28 -05:00
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
2024-11-26 23:37:16 -05:00
<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>
2024-12-01 07:04:33 -05:00
<a class="header-link" href="/logout.php">Logout</a>
2024-11-26 23:37:16 -05:00
<?php } else { ?>
<a class="header-link" href="/login.php">Login</a>
<?php }
?>
</div>
2024-11-26 11:38:28 -05:00
<?php }
function page_footer() { ?>
</body>
</html>
<?php }
2024-12-07 09:10:36 -05:00
?>