1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-04 19:14:41 +00:00
Files
uwuzu-mirror/nextpage/notificationview.php
T
だいちまる 9ede52e05e Version 1.2.5
2023-08-19 17:49:56 +09:00

33 lines
1.1 KiB
PHP

<?php
class MessageDisplay {
private $value;
public function __construct($value) {
$this->value = $value;
}
public function display() {
echo '<div class="notification">';
echo ' <div class="flebox">';
echo ' <div class="time">';
$day = date("Ymd", strtotime(htmlentities($this->value['datetime'])));
if ($day == date("Ymd")) {
echo date("今日 H:i", strtotime(htmlentities($this->value['datetime'])));
} else {
echo date("Y年m月d日 H:i", strtotime(htmlentities($this->value['datetime'])));
}
echo ' </div>';
echo ' </div>';
// 投稿内のHTMLコードを表示する部分
echo ' <h3>' . htmlentities($this->value['title']) . '</h3>';
echo ' <p>' . htmlentities($this->value['msg']) . '</p>';
echo ' <a href="' . htmlentities($this->value['url']) . '">続きをみる</a>';
echo '</div>';
}
}
?>