improve pings menu
This commit is contained in:
parent
a8921d484c
commit
9685751976
4 changed files with 17 additions and 6 deletions
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
$postieP = "https://nbg.dervland.net/comment.php?id=" . $poid;
|
$postieP = "https://nbg.dervland.net/comment.php?id=" . $poid;
|
||||||
|
|
||||||
$user10 = '%system';
|
$user10 = ':system';
|
||||||
if ($postType == 'user') {
|
if ($postType == 'user') {
|
||||||
$postie = "A user commented on your wall: " . $postieP;
|
$postie = "A user commented on your wall: " . $postieP;
|
||||||
$stmt = $db->prepare("INSERT INTO main.comment (username, targetType, targetId, date, content, id) VALUES (?,?,?,?,?,?)");
|
$stmt = $db->prepare("INSERT INTO main.comment (username, targetType, targetId, date, content, id) VALUES (?,?,?,?,?,?)");
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="banner"><img class="banner-background" src="/img/newlogo.svg">
|
<div class="banner"><img class="banner-background" src="/img/newlogo.svg">
|
||||||
<div class="banner-content">
|
<div class="banner-content">
|
||||||
<h1>BiglyChat</h1>
|
<h1>BiglyChat</h1>
|
||||||
<pre>BiglyChat is a niche community for weird Dervland experiments and games.</pre>
|
<pre>BiglyChat is a niche forum for Dervland experiments and games.</pre>
|
||||||
<h2>Community</h2>
|
<h2>Community</h2>
|
||||||
|
|
||||||
<a class="form-button" href="/register.php">Join the Community</a>
|
<a class="form-button" href="/register.php">Join the Community</a>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
><?php echo (($kv['type'] == 'textarea') ? htmlspecialchars($kv['default']) . '</textarea>' : '') ?>
|
><?php echo (($kv['type'] == 'textarea') ? htmlspecialchars($kv['default']) . '</textarea>' : '') ?>
|
||||||
<?php }
|
<?php }
|
||||||
?>
|
?>
|
||||||
<input class='form-button' type="Submit" name="Submit">
|
<input class='form-button' type="Submit" name="Submit" value="Submit">
|
||||||
</form>
|
</form>
|
||||||
<?php }
|
<?php }
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2,8 +2,19 @@
|
||||||
require(__DIR__ . "/auth.php");
|
require(__DIR__ . "/auth.php");
|
||||||
global $username;
|
global $username;
|
||||||
function page_header() {
|
function page_header() {
|
||||||
global $username; ?>
|
global $db;
|
||||||
<!DOCTYPE html>
|
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);
|
||||||
|
|
||||||
|
$edge = count($posts2);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>NewBiglyChat</title>
|
<title>NewBiglyChat</title>
|
||||||
|
@ -17,7 +28,7 @@
|
||||||
<?php
|
<?php
|
||||||
if (isset($username)) { ?>
|
if (isset($username)) { ?>
|
||||||
<a class="header-link" href="/user.php?id=<?php echo $username ?>"><?php echo $username ?></a>
|
<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="/notif.php">Pings [<?php echo $edge ?>]</a>
|
||||||
<a class="header-link" href="/logout.php">Logout</a>
|
<a class="header-link" href="/logout.php">Logout</a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<a class="header-link" href="/login.php">Login</a>
|
<a class="header-link" href="/login.php">Login</a>
|
||||||
|
|
Loading…
Reference in a new issue