1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-04 19:14:41 +00:00
This commit is contained in:
daichimarukana
2023-08-21 15:28:06 +09:00
commit 8d57168ca1
220 changed files with 23797 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
class MessageDisplay {
private $value;
public function __construct($value) {
$this->value = $value;
}
public function display() {
if($this->value['userchk'] === "none"){
echo '<div class="notification2">';
}else{
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>';
}
}
?>