diff --git a/.well-known/host-meta/index.php b/.well-known/host-meta/index.php index 3e952ab..13f99f0 100644 --- a/.well-known/host-meta/index.php +++ b/.well-known/host-meta/index.php @@ -9,5 +9,7 @@ if(file_get_contents($activitypub_file) === "true"){ echo ''; echo ''; echo ''; +}else{ + header("HTTP/1.1 410 Gone"); } ?> \ No newline at end of file diff --git a/.well-known/nodeinfo/index.php b/.well-known/nodeinfo/index.php index fb8d878..032f1d4 100644 --- a/.well-known/nodeinfo/index.php +++ b/.well-known/nodeinfo/index.php @@ -15,5 +15,7 @@ if(file_get_contents($activitypub_file) === "true"){ ); echo json_encode($item, JSON_UNESCAPED_UNICODE); +}else{ + header("HTTP/1.1 410 Gone"); } ?> \ No newline at end of file diff --git a/.well-known/webfinger/index.php b/.well-known/webfinger/index.php index 508d537..e01b930 100644 --- a/.well-known/webfinger/index.php +++ b/.well-known/webfinger/index.php @@ -21,7 +21,7 @@ if(file_get_contents($activitypub_file) === "true"){ $user = htmlentities($_GET['resource']); - $userid = str_replace('@','', str_replace('@'.$domain.'', '', $user)); + $userid = str_replace('acct:','', str_replace('@'.$domain.'', '', $user)); $item = array( "subject" => "acct:".$userid.'@'.$domain.'', @@ -35,5 +35,7 @@ if(file_get_contents($activitypub_file) === "true"){ ); echo json_encode($item, JSON_UNESCAPED_UNICODE); +}else{ + header("HTTP/1.1 410 Gone"); } ?> \ No newline at end of file diff --git a/actor/index.php b/actor/index.php index 0f2b0c2..b5ebac6 100644 --- a/actor/index.php +++ b/actor/index.php @@ -77,5 +77,7 @@ if(file_get_contents($activitypub_file) === "true"){ ); echo json_encode($item, JSON_UNESCAPED_UNICODE); } +}else{ + header("HTTP/1.1 410 Gone"); } ?> \ No newline at end of file diff --git a/css/home.css b/css/home.css index 86816b4..bc9be72 100644 --- a/css/home.css +++ b/css/home.css @@ -460,6 +460,7 @@ svg { main{ + position: relative; height: 95dvh; overflow: auto; border-radius: 17px; @@ -467,7 +468,7 @@ main{ margin-left: 12px; margin-right: 12px; width: 60%; - background-color: var(--tl-color-color); + background-color: var(--tl-color); box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); border: 1px solid var(--main-color); } @@ -644,6 +645,7 @@ main h1{ width: auto; height: 48px; display: flex; + align-items: stretch; padding-left: 12px; padding-right: 12px; } @@ -746,11 +748,11 @@ main h1{ padding-bottom: 6px; - background-color: var(--main-color); + background-color: var(--sub-color); border-radius: 50px; - color:var(--link-color); - border: none; + color:var(--main-color); + border: 1px solid var(--main-color); font-size: 16px; font-family: 'Zen Maru Gothic', sans-serif; font-weight: normal; @@ -762,7 +764,7 @@ main h1{ } .fzone .follow .fbtn_un:hover{ background-color: var(--sub-color); - color: var(--main-color); + color: var(--text-color); box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); width:125px; } @@ -847,21 +849,34 @@ main h1{ } .fzone .follow_yes{ - margin-top: auto; - margin-bottom: 0px; + border: none; + display: block; + width:auto; + height: auto; + margin-left: auto; - margin-right: auto; + margin-right: 12px; + margin-top: 12px; + margin-bottom: 0px; + + background-color: var(--sub-color); - border-radius: 10px; - padding: 12px; + + border-radius: 50px; + color:var(--main-color); } .fzone .follow_yes p{ - margin-top: 0px; - margin-bottom: 0px; - text-align: left; - font-size: 12px; - color:var(--text-color); - font-family: 'BIZ UDPGothic', sans-serif; + overflow-wrap: break-word; + margin: 0px; + margin-top: auto; + margin-bottom: auto; + margin-left: 6px; + margin-right: 6px; + font-size: 10px; + font-family: 'BIZUD Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; } .select_utl{ margin: 0px; @@ -1106,7 +1121,6 @@ main h1{ .ueuse a{ margin-top: auto; margin-bottom: auto; - margin-left: 6px; font-size: 16px; color:var(--link-color); text-decoration: none; @@ -1236,8 +1250,8 @@ main h1{ .ueuse .abi p{ line-height:20px; overflow-wrap: break-word; - margin-top: 12px; - margin-bottom: 12px; + margin-top: 0px; + margin-bottom: 0px; margin-left: auto; font-size: 14px; color:var(--text-color); @@ -1251,6 +1265,7 @@ main h1{ padding: 12px; border-radius: 7px; border: 1px solid var(--border-color); + margin-bottom: 12px; } .ueuse .abi .back h1{ @@ -1264,11 +1279,44 @@ main h1{ font-family: 'BIZ UDPGothic', sans-serif; font-weight: bold; } -.ueuse .abi h3{ - overflow-wrap: break-word; +.ueuse .abi h1{ + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: auto; + font-size: 42px; + color: var(--text-color); + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.ueuse .abi h2{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + font-size: 32px; + color: var(--text-color); + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.ueuse .abi h3{ + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + font-size: 24px; + color: var(--text-color); + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.ueuse .abi .h3s{ + overflow-wrap: break-word; + margin-top: 12px; + margin-bottom: auto; + margin-left: auto; font-size: 12px; color:var(--subtext-color); text-decoration: none; @@ -2244,12 +2292,14 @@ label>input { padding: 16px; border-radius: 10px; width: 20%; + max-height: 348px; position: absolute; top: 30%; left: 40%; right: 40%; transform: translate(-50%, -50%); box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + overflow: scroll; } .modal-content textarea{ @@ -2368,6 +2418,49 @@ label>input { width:115px; } +.modal-content .action_userlist{ + display: flex; + width: auto; + background-color: var(--ueuse-color); + border-radius: 10px; + border: 1px solid var(--border-color); + padding: 12px; + margin-top: 6px; + margin-bottom: 6px; +} + +.modal-content .action_userlist img{ + width: 48px; + height: 48px; + object-fit: cover; + border-radius: 50%; +} + +.modal-content .action_userlist .userabout{ + display: block; + margin-left: 12px; + margin-top: auto; + margin-bottom: auto; +} +.modal-content .action_userlist .userabout .username a{ + line-height: 20px; + overflow-wrap: break-word; + font-size: 16px; + color:var(--text-color); + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} +.modal-content .action_userlist .userabout .userid a{ + line-height: 20px; + overflow-wrap: break-word; + font-size: 14px; + color:var(--subtext-color); + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + .modal-content.slideUp { animation: SlideUp .3s ease-out forwards; } @@ -2483,9 +2576,11 @@ label>input { } .terms img{ - background-color: var(--background-color); - background: linear-gradient(45deg, var(--dark-subtext-color) 25%, transparent 25%, transparent 75%, var(--dark-subtext-color) 75%), - linear-gradient(45deg, var(--dark-subtext-color) 25%, transparent 25%, transparent 75%, var(--dark-subtext-color) 75%); + width:100%; + height:260px; + background: linear-gradient(45deg, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%), + linear-gradient(45deg, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%); + background-color: #FFF; background-size: 20px 20px; background-position: 0 0, 10px 10px; object-fit: cover; @@ -2535,6 +2630,28 @@ label>input { font-weight: bold; } +.terms .sp2c{ + margin-top: 0px; + margin-bottom: 10px; + text-align: center; + word-wrap: break-word; + line-height: 20px; + color: var(--subtext-color); + font-size: 12px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: normal; +} +.terms .sp3{ + margin-top: 24px; + text-align: center; + word-wrap: break-word; + line-height: 24px; + color: var(--text-color); + font-size: 22px; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} + .terms ul{ margin-top: 6px; margin-bottom: 6px; @@ -3774,6 +3891,7 @@ summary { margin-top: 12px; margin-left: 12px; margin-right:12px; + margin-bottom: 12px; background-color: var(--sub-color); padding: 12px; @@ -3881,6 +3999,71 @@ summary { font-weight: normal; text-align: center; } +.sp_time_area{ + display: none; +} + + +.offline{ + position: absolute; + animation: slideDownOffline 5.0s ease-in-out forwards; + margin-top: 32px; + margin-right: auto; + margin-left: auto; + right: 0; + left: 0; + width: fit-content; + height: 32px; + z-index: 9999; + background-color: #FF4848; + border-radius: 20px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); +} +.offline p{ + margin-top: 4px; + margin-bottom: 4px; + margin-left: 12px; + margin-right: 12px; + line-height: 24px; + font-family: 'BIZ UDPGothic', sans-serif; + font-size: 16px; + color:var(--tl-color); + color: transparent; + text-shadow: 0 0 0 var(--tl-color); + text-align: center; +} +@keyframes slideDownOffline { + 0%, 100% { transform: translateY(-40dvh); } + 20%, 90% { transform: translateY(0px); } +} +.online{ + position: absolute; + animation: slideDownOffline 5.0s ease-in-out forwards; + margin-top: 32px; + margin-right: auto; + margin-left: auto; + right: 0; + left: 0; + width: fit-content; + height: 32px; + z-index: 9999; + background-color: #1d9bf0; + border-radius: 20px; + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); +} +.online p{ + margin-top: 4px; + margin-bottom: 4px; + margin-left: 12px; + margin-right: 12px; + line-height: 24px; + font-family: 'BIZ UDPGothic', sans-serif; + font-size: 16px; + color:var(--tl-color); + color: transparent; + text-shadow: 0 0 0 var(--tl-color); + text-align: center; +} /*------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------スマホ向け--------------------------------------------------*/ @@ -3946,6 +4129,41 @@ summary { .fzone{ margin-left: 12px; margin-right: 12px; + justify-content: flex-end + } + + .fzone .time{ + display: none; + } + + .sp_time_area{ + display: block; + margin-left: 24px; + margin-right:24px; + } + + .sp_time_area .time{ + margin-top: auto; + margin-bottom: 24px; + margin-left: 0px; + margin-right: auto; + } + .sp_time_area .time p{ + margin-top: 0px; + margin-bottom: 0px; + margin-right: 32px; + text-align: left; + font-size: 12px; + color:var(--subtext-color); + font-family: 'BIZ UDPGothic', sans-serif; + } + .sp_time_area .time a{ + margin-top: 0px; + margin-bottom: 0px; + text-align: left; + font-size: 12px; + color:var(--subtext-color); + font-family: 'BIZ UDPGothic', sans-serif; } main{ @@ -3969,6 +4187,13 @@ summary { font-family: 'Zen Maru Gothic', sans-serif; } + .fzone .follow_yes p{ + margin-top: 10px; + margin-bottom: 10px; + margin-left: 6px; + margin-right: 6px; + } + .sendbox .fx img{ object-fit: cover; margin-left: -12px; @@ -4881,6 +5106,8 @@ summary { width: calc(100% - 48px); margin-bottom: 0px; height: 55dvh; + max-height: 55dvh; + overflow: scroll; padding: 24px; bottom: 0px; left: 0; @@ -5183,6 +5410,12 @@ summary { text-align: center; margin-bottom: 15%; } + .offline{ + margin-top: 12px; + } + .online{ + margin-top: 12px; + } } /*------------------------------------------------------------------------------------------------------------*/ @@ -5318,8 +5551,17 @@ summary { .ueuse .abi .back h1{ color:var(--text-color); + } + .ueuse .abi h1{ + color:var(--dark-text-color); + } + .ueuse .abi h2{ + color:var(--dark-text-color); } .ueuse .abi h3{ + color:var(--dark-text-color); + } + .ueuse .abi .h3s{ color:var(--dark-subtext-color); } .ueuse .favbox .favbtn{ @@ -5425,6 +5667,47 @@ summary { background-color: var(--dark-sub-color); color: var(--main-color); } + .fzone .follow .fbtn_un{ + cursor: pointer; + border: none; + display: block; + width:120px; + padding: 8px auto; + + margin-left: auto; + margin-right: 0px; + margin-top: 12px; + margin-bottom: 12px; + + padding-top: 6px; + padding-bottom: 6px; + + + background-color: var(--dark-sub-color); + + border-radius: 50px; + color:var(--main-color); + border: 1px solid var(--main-color); + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + .fzone .follow .fbtn_un:hover{ + background-color: var(--dark-sub-color); + color: var(--dark-text-color); + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + width:125px; + } + .fzone .follow .fbtn_un:active{ + box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + width:115px; + } + .fzone .time p{ color:var(--dark-subtext-color); } @@ -5567,6 +5850,17 @@ summary { background-color: var(--dark-sub-color); color: var(--main-color); } + + .modal-content .action_userlist{ + background-color: var(--dark-background-color); + border:none; + } + .modal-content .action_userlist .userabout .username a{ + color:var(--dark-text-color); + } + .modal-content .action_userlist .userabout .userid a{ + color:var(--dark-subtext-color); + } .inbox { background: var(--dark-background-color); @@ -5673,6 +5967,13 @@ summary { .terms .p3{ color: var(--background-color); } + .terms .sp2c{ + color: var(--dark-subtext-color); + } + + .terms .sp3{ + color: var(--background-color); + } .terms .err404 h1{ color: var(--dark-subtext-color); @@ -5877,4 +6178,8 @@ summary { .f_c_area .fcnt p{ color: var(--dark-text-color); } + + .userheader .profile p a{ + color:var(--main-color); + } } \ No newline at end of file diff --git a/db.php b/db.php index 62fe374..60f08e6 100644 --- a/db.php +++ b/db.php @@ -1,8 +1,8 @@

404 Not found

申し訳ございませんがお探しのページは見つかりませんでした!
ページの移動や削除が行われた可能性がございます。

+

ホームへ行く diff --git a/home/ftl.php b/home/ftl.php index bb78df9..f57faef 100644 --- a/home/ftl.php +++ b/home/ftl.php @@ -467,9 +467,19 @@ if ("serviceWorker" in navigator) { +
+ + +
+
+
LTL FTL @@ -801,13 +811,29 @@ $(document).on('click', '.addabi', function (event) { }); } }); -}); + }); -var osho_gats = document.getElementById('osho_gats'); -$(document).on('click', '.os_exit_btn', function (event) { - document.cookie = "event=done; max-age=86400"; - osho_gats.style.display = 'none'; -}); + window.addEventListener('online', function(){ + checkOnline(); + }); + window.addEventListener('offline', function(){ + checkOnline(); + }); + function checkOnline() { + if( navigator.onLine ) { + $("#online").show(); + $("#offline").hide(); + } else { + $("#online").hide(); + $("#offline").show(); + } + } + + var osho_gats = document.getElementById('osho_gats'); + $(document).on('click', '.os_exit_btn', function (event) { + document.cookie = "event=done; max-age=86400"; + osho_gats.style.display = 'none'; + }); }); diff --git a/home/index.php b/home/index.php index f207a2b..a57223c 100644 --- a/home/index.php +++ b/home/index.php @@ -467,6 +467,15 @@ if ("serviceWorker" in navigator) { +
+ + +
+
@@ -497,6 +506,7 @@ if ("serviceWorker" in navigator) {
+
LTL FTL @@ -828,6 +838,22 @@ $(document).ready(function() { }); }); + window.addEventListener('online', function(){ + checkOnline(); + }); + window.addEventListener('offline', function(){ + checkOnline(); + }); + function checkOnline() { + if( navigator.onLine ) { + $("#online").show(); + $("#offline").hide(); + } else { + $("#online").hide(); + $("#offline").show(); + } + } + var osho_gats = document.getElementById('osho_gats'); $(document).on('click', '.os_exit_btn', function (event) { diff --git a/img/sysimage/menuicon/privacypolicy.svg b/img/sysimage/menuicon/privacypolicy.svg new file mode 100644 index 0000000..f0c534b --- /dev/null +++ b/img/sysimage/menuicon/privacypolicy.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/sysimage/menuicon/terms.svg b/img/sysimage/menuicon/terms.svg new file mode 100644 index 0000000..1694170 --- /dev/null +++ b/img/sysimage/menuicon/terms.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/index.php b/index.php index 7ac088d..573da73 100644 --- a/index.php +++ b/index.php @@ -8,7 +8,7 @@ session_start(); if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true && isset($_COOKIE['loginid']) && isset($_SESSION['userid'])) { - $options = array( + $option = array( // SQL実行失敗時に例外をスルー PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, // デフォルトフェッチモードを連想配列形式に設定 @@ -29,7 +29,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true && isset } } } elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true && isset($_COOKIE['loginid']) && isset($_COOKIE['userid'])) { - $options = array( + $option = array( // SQL実行失敗時に例外をスルー PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, // デフォルトフェッチモードを連想配列形式に設定 diff --git a/js/console_notice.js b/js/console_notice.js index c339eab..818bb75 100644 --- a/js/console_notice.js +++ b/js/console_notice.js @@ -25,4 +25,5 @@ console.log( "", "color:#000;", "", -); + "uwuzuサーバー運営者及びuwuzu開発者がCookie情報等を要求することはありません。", +); \ No newline at end of file diff --git a/new.php b/new.php index 232b2bb..7999c55 100644 --- a/new.php +++ b/new.php @@ -542,7 +542,7 @@ $pdo = null;

登録を押すと利用規約とプライバシーポリシーに同意したこととなります。
未確認の場合は上のボタンよりお読みください。

diff --git a/nextpage/view.php b/nextpage/view.php index de8107f..4c18627 100644 --- a/nextpage/view.php +++ b/nextpage/view.php @@ -72,11 +72,14 @@ function replaceURLsWithLinks($postText) { foreach ($matches[0] as $url) { // ドメイン部分を抽出 $parsedUrl = parse_url($url); - $domain = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; - + if (!isset($parsedUrl['path'])) { + $parsedUrl['path'] = ''; + } + $domain = $parsedUrl['host'].(strlen($parsedUrl['path']) > 24 ? substr($parsedUrl['path'], 0, 24) . '...' : $parsedUrl['path']); + // 不要な文字を削除してaタグを生成 $urlWithoutSpaces = preg_replace('/\s+/', '', $url); - $link = "$domain"; + $link = "$domain"; // URLをドメインのみを表示するaタグで置き換え $postText = preg_replace('/' . preg_quote($url, '/') . '/', $link, $postText); @@ -175,8 +178,8 @@ class MessageDisplay { echo '
'; echo '

' . htmlentities($this->value['username']) . 'さんが追記しました

'; echo '
'; - echo '

'.replaceEmojisWithImages(replaceURLsWithLinks(nl2br($this->value['abi']))) . '

'; - echo '

追記日時 : '. date("Y年m月d日 H:i", strtotime(htmlentities($this->value['abidate']))) . '

'; + echo '

'.processMarkdownAndWrapEmptyLines(replaceEmojisWithImages(replaceURLsWithLinks(nl2br($this->value['abi'])))) . '

'; + echo '
追記日時 : '. date("Y年m月d日 H:i", strtotime(htmlentities($this->value['abidate']))) . '
'; echo '
'; } if($this->value['nsfw'] === "true"){ @@ -186,7 +189,8 @@ class MessageDisplay { echo '
'; echo '
'; - if (false !== strstr($this->value['favorite'], $this->userid)) { + $favoriteList = explode(',', $this->value['favorite']); + if (in_array($this->userid, $favoriteList)) { echo ''; }else{ echo ''; diff --git a/nodeinfo/2.1/index.php b/nodeinfo/2.1/index.php index ce84426..d23b297 100644 --- a/nodeinfo/2.1/index.php +++ b/nodeinfo/2.1/index.php @@ -101,5 +101,7 @@ if(file_get_contents($activitypub_file) === "true"){ $item; // ループ内で $response にデータを追加 echo json_encode($item, JSON_UNESCAPED_UNICODE); +}else{ + header("HTTP/1.1 410 Gone"); } ?> \ No newline at end of file diff --git a/others/index.php b/others/index.php index edc4208..8a01967 100644 --- a/others/index.php +++ b/others/index.php @@ -59,7 +59,7 @@ try { if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_SESSION['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -105,7 +105,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { } elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_COOKIE['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -261,23 +261,61 @@ if( !empty($_POST['btn_submit']) ) { $deleteQuery->bindValue(':touserid', $userid, PDO::PARAM_STR); $res = $deleteQuery->execute(); - // フォローの更新 - $updateFollowQuery = $pdo->prepare("UPDATE account SET follow = REPLACE(follow, :userid, '') WHERE follow LIKE :pattern"); - $updateFollowQuery->bindValue(':userid', ",$userid", PDO::PARAM_STR); - $updateFollowQuery->bindValue(':pattern', "%,$userid%", PDO::PARAM_STR); - $updateFollowQuery->execute(); + // ユーザーIDを削除したい全てのアカウントを取得 + $query = $pdo->prepare("SELECT * FROM account WHERE follow LIKE :pattern1 OR follow LIKE :pattern2 OR follow LIKE :pattern3 OR follower LIKE :pattern1 OR follower LIKE :pattern2 OR follower LIKE :pattern3"); + $query->bindValue(':pattern1', "%,$userid,%", PDO::PARAM_STR); + $query->bindValue(':pattern2', "%,$userid", PDO::PARAM_STR); + $query->bindValue(':pattern3', "$userid,%", PDO::PARAM_STR); + $query->execute(); + $accounts = $query->fetchAll(); - // フォロワーの更新 - $updateFollowerQuery = $pdo->prepare("UPDATE account SET follower = REPLACE(follower, :userid, '') WHERE follower LIKE :pattern"); - $updateFollowerQuery->bindValue(':userid', ",$userid", PDO::PARAM_STR); - $updateFollowerQuery->bindValue(':pattern', "%,$userid%", PDO::PARAM_STR); - $updateFollowerQuery->execute(); + foreach ($accounts as $account) { + // フォローの更新 + if (strpos($account['follow'], ",$userid,") !== false || strpos($account['follow'], ",$userid") !== false || strpos($account['follow'], "$userid,") !== false) { + $followList = explode(',', $account['follow']); + $followList = array_diff($followList, array($userid)); + $newFollowList = implode(',', $followList); + + $updateFollowQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid"); + $updateFollowQuery->bindValue(':follow', $newFollowList, PDO::PARAM_STR); + $updateFollowQuery->bindValue(':userid', $account['userid'], PDO::PARAM_STR); + $updateFollowQuery->execute(); + } + + // フォロワーの更新 + if (strpos($account['follower'], ",$userid,") !== false || strpos($account['follower'], ",$userid") !== false || strpos($account['follower'], "$userid,") !== false) { + $followerList = explode(',', $account['follower']); + $followerList = array_diff($followerList, array($userid)); + $newFollowerList = implode(',', $followerList); + + $updateFollowerQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid"); + $updateFollowerQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR); + $updateFollowerQuery->bindValue(':userid', $account['userid'], PDO::PARAM_STR); + $updateFollowerQuery->execute(); + } + } + + $query = $pdo->prepare("SELECT * FROM ueuse WHERE favorite LIKE :pattern1 OR favorite LIKE :pattern2 OR favorite LIKE :pattern3"); + $query->bindValue(':pattern1', "%,$userid,%", PDO::PARAM_STR); + $query->bindValue(':pattern2', "%,$userid", PDO::PARAM_STR); + $query->bindValue(':pattern3', "$userid,%", PDO::PARAM_STR); + $query->execute(); + $accounts = $query->fetchAll(); + + foreach ($accounts as $account) { + // いいねの更新 + if (strpos($account['favorite'], ",$userid,") !== false || strpos($account['favorite'], ",$userid") !== false || strpos($account['favorite'], "$userid,") !== false) { + $favoriteList = explode(',', $account['favorite']); + $favoriteList = array_diff($favoriteList, array($userid)); + $newFavoriteList = implode(',', $favoriteList); + + $updateFavoriteQuery = $pdo->prepare("UPDATE ueuse SET favorite = :favorite WHERE uniqid = :uniqid"); + $updateFavoriteQuery->bindValue(':favorite', $newFavoriteList, PDO::PARAM_STR); + $updateFavoriteQuery->bindValue(':uniqid', $account['uniqid'], PDO::PARAM_STR); + $updateFavoriteQuery->execute(); + } + } - // いいねの更新 - $updateFavoriteQuery = $pdo->prepare("UPDATE ueuse SET favorite = REPLACE(favorite, :favorite, '') WHERE favorite LIKE :pattern"); - $updateFavoriteQuery->bindValue(':favorite', ",$userid", PDO::PARAM_STR); - $updateFavoriteQuery->bindValue(':pattern', "%,$userid%", PDO::PARAM_STR); - $updateFavoriteQuery->execute(); } catch (Exception $e) { diff --git a/require/botbox.php b/require/botbox.php index 3ff4fd4..ebb0546 100644 --- a/require/botbox.php +++ b/require/botbox.php @@ -20,6 +20,8 @@
プロフィール
設定
その他
+
利用規約
+
プライバシー
ポリシー
絵文字登録
diff --git a/rule/privacypolicy.php b/rule/privacypolicy.php index 90cfff6..5afd0cb 100644 --- a/rule/privacypolicy.php +++ b/rule/privacypolicy.php @@ -60,7 +60,7 @@ foreach ($sprivacypolicy as $privacypolicy) {
@@ -72,6 +72,8 @@ foreach ($sprivacypolicy as $privacypolicy) {

+ 戻る +
diff --git a/rule/releasenotes.php b/rule/releasenotes.php index 5852a3b..4bf81fc 100644 --- a/rule/releasenotes.php +++ b/rule/releasenotes.php @@ -70,7 +70,7 @@ foreach ($srelease as $release) {
@@ -85,6 +85,8 @@ foreach ($srelease as $release) {

+ 戻る + diff --git a/rule/serverabout.php b/rule/serverabout.php index 463eff7..8146890 100644 --- a/rule/serverabout.php +++ b/rule/serverabout.php @@ -7,7 +7,12 @@ require('../db.php'); session_name('uwuzu_s_id'); session_start(); -$servericonfile = "../server/servericon.txt"; +$servericonfile = file_get_contents("../server/servericon.txt"); +$servericondata = explode( "\n", $servericonfile ); +$cnt = count($servericondata); +for( $i=0;$i<$cnt;$i++ ){ + $uwuzuicon[$i] = ($servericondata[$i]); +} //------------------------- @@ -87,7 +92,7 @@ $count2 = $result2->num_rows;
@@ -96,11 +101,11 @@ $count2 = $result2->num_rows;

サーバー情報

- +
-
-
+
+

説明

num_rows;

連絡用メールアドレス :


- +

統計情報

-

ユーザー数 : "?>

-

投稿数 : "?>

- +

ユーザー数 : "?>

+

投稿数 : "?>

+ + +

注意

このサーバーにアカウント登録するには招待コードが必要です。

@@ -128,6 +135,8 @@ $count2 = $result2->num_rows;
Version :
Developer :
Last Update :
+ 戻る + diff --git a/rule/terms.php b/rule/terms.php index 706af81..f852b1b 100644 --- a/rule/terms.php +++ b/rule/terms.php @@ -60,7 +60,7 @@ foreach ($sterms as $terms) {
@@ -72,6 +72,8 @@ foreach ($sterms as $terms) {

+ 戻る + diff --git a/rule/uwuzuabout.php b/rule/uwuzuabout.php index 023004b..b4e58dc 100644 --- a/rule/uwuzuabout.php +++ b/rule/uwuzuabout.php @@ -70,7 +70,7 @@ foreach ($sterms as $terms) {
@@ -85,6 +85,8 @@ foreach ($sterms as $terms) {

+ 戻る + diff --git a/server/uwuzuinfo.txt b/server/uwuzuinfo.txt index 732a0e9..b6aa5e4 100644 --- a/server/uwuzuinfo.txt +++ b/server/uwuzuinfo.txt @@ -1,4 +1,4 @@ uwuzu -1.2.24 -2023/10/04 +1.2.25 +2023/10/22 daichimarukana,putonfps \ No newline at end of file diff --git a/server/uwuzurelease.txt b/server/uwuzurelease.txt index 96ed9dc..c8e13fb 100644 --- a/server/uwuzurelease.txt +++ b/server/uwuzurelease.txt @@ -1,6 +1,24 @@ ## リリースノートだぜぇぇぇぇぇぇい!!!!!!! ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...) +## Version 1.2.25 +リリース日:2023/10/22 +ActivityPubに認識されない問題を修正しました。 +ActivityPubがオフの場合に410 Goneを返すようにしました。 +フォロー解除ボタンのUIを変更しました。 +プロフィール画面でURLが正常に変換されない問題を修正しました。 +アカウント新規登録画面でプライバシーポリシーボタンを押したときに利用規約が表示されてしまう問題を修正しました。 +プロフィールのスマホ向けUIを変更しました。 +似たアカウントidでフォロー・フォロー解除した際にデータが破損する問題を修正しました。 +フォローされていないのにもかかわらず「フォローされています」と表示される問題を修正しました。 +LTL、FTL、ユーザープロフィールページにて端末がオフラインになったときに通知する機能を追加しました。 +サーバーカスタマイズからPWAのmanifest.json項目を変更できるようにしました。 +プロフィール画面でフォローしている人、されている人を確認できるようにしました。 +アカウント削除時にデータが破損する問題を修正しました。 +追記時にMarkdownが適用されるようにしました。 +投稿のURLの表示を若干変更しました。 +スマホ向けメニューの項目に「利用規約」と「プライバシーポリシー」を追加しました。 + ## Version 1.2.24 リリース日:2023/10/04 画像選択ボタンのUIを変更しました。 diff --git a/settings_admin/customize_admin.php b/settings_admin/customize_admin.php index cd294e8..68e5c94 100644 --- a/settings_admin/customize_admin.php +++ b/settings_admin/customize_admin.php @@ -13,6 +13,9 @@ $mojisizefile = "../server/textsize.txt"; $colorfile = "../css/color.css"; $color_info = file_get_contents($colorfile); +$manifestfile = "../manifest/manifest.json"; +$manifest_info = file_get_contents($manifestfile); + $err404imagefile = "../server/404imagepath.txt"; $robots = "../robots.txt"; @@ -220,6 +223,7 @@ if( !empty($_POST['btn_submit']) ) { // 空白除去 $colordata = $_POST['colordata']; + $manifestdata = $_POST['manifestdata']; //鯖名 $file = fopen($colorfile, 'w'); @@ -227,6 +231,12 @@ if( !empty($_POST['btn_submit']) ) { fputs($file, $data); fclose($file); + //manifest + $file = fopen($manifestfile, 'w'); + $data = $manifestdata; + fputs($file, $data); + fclose($file); + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; header("Location:".$url.""); exit; @@ -268,7 +278,13 @@ require('../logout/logout.php');

CSS

ここで指定されている色が適用されます。
もし適用されなかった場合はキャッシュを削除し再読み込みしてください。
表示がおかしくなってしまった場合はカラーコードを再度確認してください。
- + +
+ +
+

PWA(manifest)

+
ここでPWAの設定を変更できます。
"short_name"、"name"が表示されるアプリ名、"theme_color"、"background_color"がテーマカラーとPWA起動時のスプラッシュ画面の背景色です。
いま記載したもの以外の設定は変更しないことをお勧めします。
+
diff --git a/settings_admin/serveradmin.php b/settings_admin/serveradmin.php index ccecf4e..379d445 100644 --- a/settings_admin/serveradmin.php +++ b/settings_admin/serveradmin.php @@ -437,7 +437,7 @@ require('../logout/logout.php');

ActivityPubサーバーとして認識されるようにするか

-
ActivityPubの仮実装をオンにするかです。inboxに入ってきた内容には今現在これといったレスポンスを返しません。
また、publicKeyも返却しません。
現状ActivityPubサーバーと連合を組むことは出来ません。(リモートユーザーの確認程度なら出来ます。)
+
ActivityPubの仮実装をオンにするかです。inboxに入ってきた内容には今現在これといったレスポンスを返しません。
また、publicKeyも返却しません。
現状ActivityPubサーバーと連合を組むことは出来ません。(リモートユーザーの確認程度なら出来ます。)
オフの状態だと410 Goneを返します。
diff --git a/settings_admin/userinfo.php b/settings_admin/userinfo.php index 30eabd8..2aae2b6 100644 --- a/settings_admin/userinfo.php +++ b/settings_admin/userinfo.php @@ -440,23 +440,60 @@ if( !empty($_POST['send_ban_submit']) ) { $deleteQuery->bindValue(':touserid', $userId2, PDO::PARAM_STR); $res = $deleteQuery->execute(); - // フォローの更新 - $updateFollowQuery = $pdo->prepare("UPDATE account SET follow = REPLACE(follow, :userid, '') WHERE follow LIKE :pattern"); - $updateFollowQuery->bindValue(':userid', ",$userId2", PDO::PARAM_STR); - $updateFollowQuery->bindValue(':pattern', "%,$userId2%", PDO::PARAM_STR); - $updateFollowQuery->execute(); + // ユーザーIDを削除したい全てのアカウントを取得 + $query = $pdo->prepare("SELECT * FROM account WHERE follow LIKE :pattern1 OR follow LIKE :pattern2 OR follow LIKE :pattern3 OR follower LIKE :pattern1 OR follower LIKE :pattern2 OR follower LIKE :pattern3"); + $query->bindValue(':pattern1', "%,$userid,%", PDO::PARAM_STR); + $query->bindValue(':pattern2', "%,$userid", PDO::PARAM_STR); + $query->bindValue(':pattern3', "$userid,%", PDO::PARAM_STR); + $query->execute(); + $accounts = $query->fetchAll(); - // フォロワーの更新 - $updateFollowerQuery = $pdo->prepare("UPDATE account SET follower = REPLACE(follower, :userid, '') WHERE follower LIKE :pattern"); - $updateFollowerQuery->bindValue(':userid', ",$userId2", PDO::PARAM_STR); - $updateFollowerQuery->bindValue(':pattern', "%,$userId2%", PDO::PARAM_STR); - $updateFollowerQuery->execute(); + foreach ($accounts as $account) { + // フォローの更新 + if (strpos($account['follow'], ",$userid,") !== false || strpos($account['follow'], ",$userid") !== false || strpos($account['follow'], "$userid,") !== false) { + $followList = explode(',', $account['follow']); + $followList = array_diff($followList, array($userid)); + $newFollowList = implode(',', $followList); - // いいねの更新 - $updateFavoriteQuery = $pdo->prepare("UPDATE ueuse SET favorite = REPLACE(favorite, :favorite, '') WHERE favorite LIKE :pattern"); - $updateFavoriteQuery->bindValue(':favorite', ",$userId2", PDO::PARAM_STR); - $updateFavoriteQuery->bindValue(':pattern', "%,$userId2%", PDO::PARAM_STR); - $updateFavoriteQuery->execute(); + $updateFollowQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid"); + $updateFollowQuery->bindValue(':follow', $newFollowList, PDO::PARAM_STR); + $updateFollowQuery->bindValue(':userid', $account['userid'], PDO::PARAM_STR); + $updateFollowQuery->execute(); + } + + // フォロワーの更新 + if (strpos($account['follower'], ",$userid,") !== false || strpos($account['follower'], ",$userid") !== false || strpos($account['follower'], "$userid,") !== false) { + $followerList = explode(',', $account['follower']); + $followerList = array_diff($followerList, array($userid)); + $newFollowerList = implode(',', $followerList); + + $updateFollowerQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid"); + $updateFollowerQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR); + $updateFollowerQuery->bindValue(':userid', $account['userid'], PDO::PARAM_STR); + $updateFollowerQuery->execute(); + } + } + + $query = $pdo->prepare("SELECT * FROM ueuse WHERE favorite LIKE :pattern1 OR favorite LIKE :pattern2 OR favorite LIKE :pattern3"); + $query->bindValue(':pattern1', "%,$userid,%", PDO::PARAM_STR); + $query->bindValue(':pattern2', "%,$userid", PDO::PARAM_STR); + $query->bindValue(':pattern3', "$userid,%", PDO::PARAM_STR); + $query->execute(); + $accounts = $query->fetchAll(); + + foreach ($accounts as $account) { + // いいねの更新 + if (strpos($account['favorite'], ",$userid,") !== false || strpos($account['favorite'], ",$userid") !== false || strpos($account['favorite'], "$userid,") !== false) { + $favoriteList = explode(',', $account['favorite']); + $favoriteList = array_diff($favoriteList, array($userid)); + $newFavoriteList = implode(',', $favoriteList); + + $updateFavoriteQuery = $pdo->prepare("UPDATE ueuse SET favorite = :favorite WHERE uniqid = :uniqid"); + $updateFavoriteQuery->bindValue(':favorite', $newFavoriteList, PDO::PARAM_STR); + $updateFavoriteQuery->bindValue(':uniqid', $account['uniqid'], PDO::PARAM_STR); + $updateFavoriteQuery->execute(); + } + } } catch (Exception $e) { diff --git a/sw.js b/sw.js index b564d9e..3005359 100644 --- a/sw.js +++ b/sw.js @@ -42,4 +42,4 @@ self.addEventListener('fetch', function(event) { return fetch(event.request); }) ); -}); \ No newline at end of file +}); diff --git a/ueuse/activity/index.php b/ueuse/activity/index.php index 0dd325a..f45c415 100644 --- a/ueuse/activity/index.php +++ b/ueuse/activity/index.php @@ -90,5 +90,7 @@ if(file_get_contents($activitypub_file) === "true"){ echo json_encode($item, JSON_UNESCAPED_UNICODE); } +}else{ + header("HTTP/1.1 410 Gone"); } ?> \ No newline at end of file diff --git a/user/inbox/index.php b/user/inbox/index.php index 48005b1..bc4e71a 100644 --- a/user/inbox/index.php +++ b/user/inbox/index.php @@ -18,5 +18,7 @@ if(file_get_contents($activitypub_file) === "true"){ ); echo json_encode($item, JSON_UNESCAPED_UNICODE); +}else{ + header("HTTP/1.1 410 Gone"); } ?> \ No newline at end of file diff --git a/user/index.php b/user/index.php index 90c6fe0..124e045 100644 --- a/user/index.php +++ b/user/index.php @@ -49,7 +49,7 @@ try { if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_SESSION['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -64,6 +64,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { $role = htmlentities($res["role"]); $sacinfo = htmlentities($res["sacinfo"]); $myblocklist = htmlentities($res["blocklist"]); + $myfollowlist = htmlentities($res["follow"]); $_SESSION['admin_login'] = true; $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; @@ -96,7 +97,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { } elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_COOKIE['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -111,6 +112,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { $role = htmlentities($res["role"]); $sacinfo = htmlentities($res["sacinfo"]); $myblocklist = htmlentities($res["blocklist"]); + $myfollowlist = htmlentities($res["follow"]); $_SESSION['admin_login'] = true; $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; @@ -224,7 +226,7 @@ if( !empty($pdo) ) { function replaceURLsWithLinks($postText) { // URLを正規表現を使って検出 - $pattern = '/(https?:\/\/[^\s]+)/'; + $pattern = '/(https:\/\/[^\s<>\[\]\'"]+)/'; // 改良された正規表現 preg_match_all($pattern, $postText, $matches); // 検出したURLごとに処理を行う @@ -233,11 +235,12 @@ if( !empty($pdo) ) { $parsedUrl = parse_url($url); $domain = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; - // ドメインのみを表示するaタグを生成 - $link = "$domain"; + // 不要な文字を削除してaタグを生成 + $urlWithoutSpaces = preg_replace('/\s+/', '', $url); + $link = "$domain"; // URLをドメインのみを表示するaタグで置き換え - $postText = str_replace($url, $link, $postText); + $postText = preg_replace('/' . preg_quote($url, '/') . '/', $link, $postText); } return $postText; @@ -278,8 +281,9 @@ if( !empty($pdo) ) { // コンマで区切って配列に分割し、要素数を数える $followIds = explode(',', $follow); $followCount = count($followIds)-1; - - $follow_on_me = strpos($follow, $userid); + + $follow_on_me = array_search($userid, $followIds); + if ($follow_on_me !== false) { $follow_yes = "フォローされています"; // worldを含む:6 }else{ @@ -301,6 +305,47 @@ if( !empty($pdo) ) { $allueuse->execute(); $ueuse_cnt = $allueuse->rowCount(); + //-------フォロワー取得--------- + + // フォロワーのユーザーIDを $follower_userids 配列に追加 + foreach ($followerIds as $follower_userid) { + $follower_userids[] = $follower_userid; + } + + // フォロワーのユーザー情報を取得 + $follower_userdata = array(); + + foreach ($follower_userids as $follower_userid) { + $follower_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid"); + $follower_userQuery->bindValue(':userid', $follower_userid); + $follower_userQuery->execute(); + $follower_userinfo = $follower_userQuery->fetch(); + + if ($follower_userinfo) { + // フォロワーのユーザー情報を $follower_userdata 配列に追加 + $follower_userdata[] = $follower_userinfo; + } + } + + //-------フォロー取得--------- + + foreach ($followIds as $follow_userid) { + $follow_userids[] = $follow_userid; + } + + $follow_userdata = array(); + + foreach ($follow_userids as $follow_userid) { + $follow_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid"); + $follow_userQuery->bindValue(':userid', $follow_userid); + $follow_userQuery->execute(); + $follow_userinfo = $follow_userQuery->fetch(); + + if ($follow_userinfo) { + // フォロワーのユーザー情報を $follower_userdata 配列に追加 + $follow_userdata[] = $follow_userinfo; + } + } }else{ @@ -393,9 +438,12 @@ if (!empty($_POST['follow'])) { $updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR); $res = $updateQuery->execute(); - $deluserid = ",".$userdata["userid"]; + $myflwlist = explode(',', $myfollowlist); + $delfollowList = array_diff($myflwlist, array($userData['userid'])); + $deluserid = implode(',', $delfollowList); + // 自分のfollowカラムから相手のユーザーIDを削除 - $updateQuery = $pdo->prepare("UPDATE account SET follow = REPLACE(follow, :follow, '') WHERE userid = :userid"); + $updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid"); $updateQuery->bindValue(':follow', $deluserid, PDO::PARAM_STR); $updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR); $res_follow = $updateQuery->execute(); @@ -433,9 +481,11 @@ if (!empty($_POST['send_block_submit'])) { $updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR); $res = $updateQuery->execute(); - $deluserid = ",".$userdata["userid"]; + $myflwlist = explode(',', $myfollowlist); + $delfollowList = array_diff($myflwlist, array($userData['userid'])); + $deluserid = implode(',', $delfollowList); // 自分のfollowカラムから相手のユーザーIDを削除 - $updateQuery = $pdo->prepare("UPDATE account SET follow = REPLACE(follow, :follow, '') WHERE userid = :userid"); + $updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid"); $updateQuery->bindValue(':follow', $deluserid, PDO::PARAM_STR); $updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR); $res_follow = $updateQuery->execute(); @@ -461,9 +511,11 @@ if (!empty($_POST['send_block_submit'])) { } elseif (!empty($_POST['send_un_block_submit'])) { - $deluserid = ",".$userdata["userid"]; + $myblklist = explode(',', $myBlocklist); + $delblkList = array_diff($myblklist, array($userData['userid'])); + $deluserid = implode(',', $delblkList); // 自分のfollowカラムから相手のユーザーIDを削除 - $updateQuery = $pdo->prepare("UPDATE account SET blocklist = REPLACE(blocklist, :blocklist, '') WHERE userid = :userid"); + $updateQuery = $pdo->prepare("UPDATE account SET blocklist = :blocklist WHERE userid = :userid"); $updateQuery->bindValue(':blocklist', $deluserid, PDO::PARAM_STR); $updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR); $res_block = $updateQuery->execute(); @@ -490,6 +542,7 @@ $pdo = null; + @@ -504,6 +557,16 @@ $pdo = null; + +
+ + +
+
@@ -516,7 +579,8 @@ $pdo = null;
- +
@@ -558,7 +622,7 @@ $pdo = null;
;">

;"> - +

@@ -580,6 +644,7 @@ $pdo = null;

からuwuzuを利用しています。

+ +
+
+

からuwuzuを利用しています。

+

+
+
+ + + +
@@ -880,10 +1005,13 @@ $(document).ready(function() { if (outerBottom <= $('.outer').scrollTop()) { var elem = document.getElementById("noueuse"); - if (elem === null){ + if($("#error").css('display') == 'block') { + // えらー処理 + return; + }else if (elem === null){ // 存在しない場合の処理 loadPosts(); - } else { + }else{ // 存在する場合の処理 return; } @@ -1121,6 +1249,59 @@ $(document).ready(function() { }, 150); }); }); + + var modal4 = document.getElementById('FollowerUserModal'); + var CloseButton4 = document.getElementById('CloseButton4'); // 追加 + var modalMain = $('.modal-content'); + + $('#follower_cnt').click(function() { + modal4.style.display = 'block'; + modalMain.addClass("slideUp"); + modalMain.removeClass("slideDown"); + + CloseButton4.addEventListener('click', () => { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + modal4.style.display = 'none'; + }, 150); + }); + }); + + var modal5 = document.getElementById('FollowUserModal'); + var CloseButton5 = document.getElementById('CloseButton5'); // 追加 + var modalMain = $('.modal-content'); + + $('#follow_cnt').click(function() { + modal5.style.display = 'block'; + modalMain.addClass("slideUp"); + modalMain.removeClass("slideDown"); + + CloseButton5.addEventListener('click', () => { + modalMain.removeClass("slideUp"); + modalMain.addClass("slideDown"); + window.setTimeout(function(){ + modal5.style.display = 'none'; + }, 150); + }); + }); + + window.addEventListener('online', function(){ + checkOnline(); + }); + window.addEventListener('offline', function(){ + checkOnline(); + }); + function checkOnline() { + if( navigator.onLine ) { + $("#online").show(); + $("#offline").hide(); + } else { + $("#online").hide(); + $("#offline").show(); + } + } + }); diff --git a/user/outbox/index.php b/user/outbox/index.php index ac3e72e..edece00 100644 --- a/user/outbox/index.php +++ b/user/outbox/index.php @@ -127,5 +127,7 @@ if(file_get_contents($activitypub_file) === "true"){ echo json_encode($item, JSON_UNESCAPED_UNICODE); } } +}else{ + header("HTTP/1.1 410 Gone"); } ?> \ No newline at end of file