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

uwuzu version 1.2.21

This commit is contained in:
daichimarukana
2023-09-11 22:55:05 +09:00
parent 27e53bf0fd
commit 86e172e90c
28 changed files with 2116 additions and 663 deletions
+21 -1
View File
@@ -29,7 +29,7 @@ try {
$uwuzuid = htmlentities(isset($_GET['id'])) ? htmlentities($_GET['id']) : '';
$userid = htmlentities($_GET['userid']);
$itemsPerPage = 30; // 1ページあたりのユーズ数
$itemsPerPage = 15; // 1ページあたりのユーズ数
$pageNumber = htmlentities(isset($_GET['page'])) ? htmlentities(intval($_GET['page'])) : 1;
$offset = ($pageNumber - 1) * $itemsPerPage;
@@ -81,6 +81,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) {
@@ -94,6 +111,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>';
}