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:
+21
-1
@@ -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>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user