minor fixes
This commit is contained in:
parent
daace699a6
commit
2ce4424db7
20 changed files with 674 additions and 621 deletions
|
@ -1,43 +1,45 @@
|
|||
<?php
|
||||
require(__DIR__ . "/auth.php");
|
||||
require(__DIR__ . "/auth.php");
|
||||
global $username;
|
||||
function page_header()
|
||||
{
|
||||
global $db;
|
||||
global $username;
|
||||
function page_header() {
|
||||
global $db;
|
||||
global $username;
|
||||
$stmt = $db->prepare("SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date DESC");
|
||||
$stmt->execute([
|
||||
"notification",
|
||||
$username,
|
||||
]);
|
||||
|
||||
$posts2 = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||
$stmt = $db->prepare("SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date DESC");
|
||||
$stmt->execute([
|
||||
"notification",
|
||||
$username,
|
||||
]);
|
||||
|
||||
$edge = count($posts2);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>BiglyChat</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1">
|
||||
<link rel="icon" href="/img/bgc.svg">
|
||||
$posts2 = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||
$edge = count($posts2);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>BiglyChat</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1">
|
||||
<link rel="icon" href="/img/bgc.svg">
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a href="/"><img class="header-img header-link" src="/img/bgc.svg">BiglyChat</a>
|
||||
<?php
|
||||
if (isset($username)) { ?>
|
||||
<a href="/user.php?id=<?php echo $username ?>"><img class="header-img header-link" src="/img/home.svg">Home</a>
|
||||
<a href="/notif.php"> <img class="header-img header-link" src="/img/mail.svg"><span>Mail<sub> <?php echo $edge?></sub></span></a>
|
||||
<a href="/logout.php"><img class="header-img header-link" src="/img/logout.svg">Leave</a>
|
||||
<?php } else { ?>
|
||||
<a href="/login.php"><img class="header-img header-link" src="/img/home.svg">Join</a>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
<?php }
|
||||
function page_footer() { ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php }
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a href="/"><img class="header-img header-link" src="/img/bgc.svg">BiglyChat</a>
|
||||
<?php if (isset($username)) { ?>
|
||||
<a href="/user.php?id=<?php echo $username ?>"><img class="header-img header-link" src="/pfp/<?php echo $username ?>.png">Wall</a>
|
||||
<a href="/notif.php"> <img class="header-img header-link" src="/img/mail.svg"><span>Mail<sub> <?php echo $edge?></sub></span></a>
|
||||
<a href="/stats.php?username=<?php echo $username ?>"><img class="header-img header-link" src="/img/home.svg">Users</a>
|
||||
<a href="/logout.php"><img class="header-img header-link" src="/img/logout.svg">Leave</a>
|
||||
<?php } else { ?>
|
||||
<a href="/login.php"><img class="header-img header-link" src="/img/home.svg">Join</a>
|
||||
<a href="/stats.php"><img class="header-img header-link" src="/img/home.svg">Users</a>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
<?php }
|
||||
function page_footer()
|
||||
{ ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php }
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue