1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-05 03:24:41 +00:00

uwuzu version 1.2.19

This commit is contained in:
daichimarukana
2023-09-10 18:19:44 +09:00
parent 66a93d34ec
commit c4a67e75ec
43 changed files with 4546 additions and 698 deletions
+21 -1
View File
@@ -27,7 +27,7 @@ try {
$userid = htmlentities($_GET['userid']);
$itemsPerPage = 30; // 1ページあたりのユーズ数
$itemsPerPage = 15; // 1ページあたりのユーズ数
$pageNumber = htmlentities(isset($_GET['page'])) ? htmlentities(intval($_GET['page'])) : 1;
$offset = ($pageNumber - 1) * $itemsPerPage;
@@ -89,6 +89,23 @@ if (!empty($pdo)) {
$message['reply_count'] = $rpData['reply_count'];
}
}
//adsystem------------------
$message['ads'] = "false";
$today = date("Y-m-d H:i:s");
$adsQuery = $pdo->prepare("SELECT * FROM ads WHERE start_date < :today AND limit_date > :today ORDER BY rand()");
$adsQuery->bindValue(':today', $today);
$adsQuery->execute();
$adsresult = $adsQuery->fetch();
if(!(empty($adsresult))){
$message['ads'] = "true";
$message['ads_url'] = $adsresult["url"];
$message['ads_img_url'] = $adsresult["image_url"];
$message['ads_memo'] = $adsresult["memo"];
}
//--------------------------
if(!empty($messages)){
foreach ($messages as $value) {
@@ -102,6 +119,9 @@ if (!empty($pdo)) {
$messageDisplay = new MessageDisplay($value, $userid); // $userid をコンストラクタに渡す
$messageDisplay->display();
}
if($message['ads'] === "true"){
echo '<div class="ads"><a href = "' . htmlentities($message['ads_url']) . '"><img src="' . htmlentities($message['ads_img_url']) . '" title="' . htmlentities($message['ads_memo']) . '"></a></div>';
}
}else{
echo '<div class="tokonone" id="noueuse"><p>ユーズがありません</p></div>';
}
+21 -1
View File
@@ -27,7 +27,7 @@ try {
$userid = htmlentities($_GET['userid']);
$itemsPerPage = 30; // 1ページあたりのユーズ数
$itemsPerPage = 15; // 1ページあたりのユーズ数
$pageNumber = htmlentities(isset($_GET['page'])) ? htmlentities(intval($_GET['page'])) : 1;
$offset = ($pageNumber - 1) * $itemsPerPage;
@@ -66,6 +66,23 @@ if (!empty($pdo)) {
$message['reply_count'] = $rpData['reply_count'];
}
}
//adsystem------------------
$message['ads'] = "false";
$today = date("Y-m-d H:i:s");
$adsQuery = $pdo->prepare("SELECT * FROM ads WHERE start_date < :today AND limit_date > :today ORDER BY rand()");
$adsQuery->bindValue(':today', $today);
$adsQuery->execute();
$adsresult = $adsQuery->fetch();
if(!(empty($adsresult))){
$message['ads'] = "true";
$message['ads_url'] = $adsresult["url"];
$message['ads_img_url'] = $adsresult["image_url"];
$message['ads_memo'] = $adsresult["memo"];
}
//--------------------------
if(!empty($messages)){
foreach ($messages as $value) {
@@ -79,6 +96,9 @@ if (!empty($pdo)) {
$messageDisplay = new MessageDisplay($value, $userid); // $userid をコンストラクタに渡す
$messageDisplay->display();
}
if($message['ads'] === "true"){
echo '<div class="ads"><a href = "' . htmlentities($message['ads_url']) . '"><img src="' . htmlentities($message['ads_img_url']) . '" title="' . htmlentities($message['ads_memo']) . '"></a></div>';
}
}else{
echo '<div class="tokonone" id="noueuse"><p>ユーズがありません</p></div>';
}
+1 -1
View File
@@ -27,7 +27,7 @@ class MessageDisplay {
// 投稿内のHTMLコードを表示する部分
echo ' <h3>' . htmlentities($this->value['title']) . '</h3>';
echo ' <p>' . htmlentities($this->value['msg']) . '</p>';
echo ' <p>' . nl2br(htmlentities($this->value['msg'])) . '</p>';
echo ' <a href="' . htmlentities($this->value['url']) . '">詳細をみる</a>';
echo '</div>';
+22 -1
View File
@@ -29,7 +29,7 @@ $userid = htmlentities($_GET['userid']);
$ueuseid = htmlentities(isset($_GET['id'])) ? htmlentities($_GET['id']) : '';
$itemsPerPage = 30; // 1ページあたりの投稿数
$itemsPerPage = 15; // 1ページあたりの投稿数
$pageNumber = htmlentities(isset($_GET['page'])) ? htmlentities(intval($_GET['page'])) : 1;
$offset = ($pageNumber - 1) * $itemsPerPage;
@@ -83,6 +83,24 @@ if (!empty($pdo)) {
}
}
//adsystem------------------
$message['ads'] = "false";
$today = date("Y-m-d H:i:s");
$adsQuery = $pdo->prepare("SELECT * FROM ads WHERE start_date < :today AND limit_date > :today ORDER BY rand()");
$adsQuery->bindValue(':today', $today);
$adsQuery->execute();
$adsresult = $adsQuery->fetch();
if(!(empty($adsresult))){
$message['ads'] = "true";
$message['ads_url'] = $adsresult["url"];
$message['ads_img_url'] = $adsresult["image_url"];
$message['ads_memo'] = $adsresult["memo"];
}
//--------------------------
if(!empty($messages)){
foreach ($messages as $value) {
$fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数
@@ -94,6 +112,9 @@ if (!empty($pdo)) {
$messageDisplay = new MessageDisplay($value, $userid);
$messageDisplay->display();
}
if($message['ads'] === "true"){
echo '<div class="ads"><a href = "' . htmlentities($message['ads_url']) . '"><img src="' . htmlentities($message['ads_img_url']) . '" title="' . htmlentities($message['ads_memo']) . '"></a></div>';
}
}else{
echo '<div class="tokonone" id="noueuse"><p>投稿がありません</p></div>';
}
+7 -2
View File
@@ -127,6 +127,8 @@ class MessageDisplay {
}
} elseif ($datetime >= $today) {
echo "今日 " . date("H:i", $datetime);
} elseif (date("Y", $datetime) == date("Y")) {
echo date("m月d日 H:i", $datetime);
} else {
echo date("Y年m月d日 H:i", $datetime);
}
@@ -171,13 +173,16 @@ class MessageDisplay {
}
echo '<a href="/!'.htmlentities($this->value['uniqid']). '~' . htmlentities($this->value['account']) . '" class="tuduki"><svg><use xlink:href="../img/sysimage/reply_1.svg#reply_1"></use></svg>'.htmlentities($this->value['reply_count']).'</a>';
if($this->value['account'] === $this->userid){
if($this->value['abi'] === "none"){
echo '<input type="submit" name="addabi" id="addabi" data-uniqid2="' . htmlentities($this->value['uniqid']) . '" class="addabi" value="追記する">';
if(!($this->value['role'] === "ice")){
if($this->value['abi'] === "none"){
echo '<button name="addabi" id="addabi" data-uniqid2="' . htmlentities($this->value['uniqid']) . '" class="addabi"><svg><use xlink:href="../img/sysimage/addabi_1.svg#addabi_1"></use></svg></button>';
}
}
echo '<input type="submit" name="delueuse" id="uniqid2" data-uniqid2="' . htmlentities($this->value['uniqid']) . '" class="delbtn" value="削除">';
}
echo '</div>';
echo '</div>';
}
}
}