21 lines
645 B
PHP
21 lines
645 B
PHP
<?php
|
|
|
|
require(__DIR__ . "/../libs/page.php");
|
|
require(__DIR__ . "/../libs/form.php");
|
|
require(__DIR__ . "/../libs/comment.php");
|
|
|
|
$ref = 1732684297;
|
|
|
|
$stmt = $db->prepare("DELETE FROM main.read WHERE username = ?");
|
|
$stmt->execute([$username]);
|
|
|
|
$stmt = $db->prepare("SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date");
|
|
$stmt->execute(["notification",$username]);
|
|
$counter = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
|
|
|
$stmt = $db->prepare("INSERT INTO main.read (username, msgs) VALUES (?, ?)");
|
|
$stmt->execute([$username, count($counter)]);
|
|
|
|
page_header();
|
|
comments("notification", $username, true);
|
|
page_footer();
|