diff --git a/.htaccess b/.htaccess index 343d114..2604d7a 100644 --- a/.htaccess +++ b/.htaccess @@ -1,22 +1,25 @@ -RewriteEngine on +RewriteEngine On +RewriteBase / + RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME}\.php -f +RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php [L] + +# --- アクセス制限ルール --- RewriteRule ^\.htaccess$ - [F] RewriteRule ^db\.php$ - [F] RewriteRule ^settings_admin/CloudflareTurnstile_settings/ - [F] RewriteRule ^settings_admin/hCaptcha_settings/ - [F] RewriteRule ^settings_admin/plugin_settings/ - [F] -RewriteBase / - -RewriteRule ^(@\w+)$ /user/index.php?uwuzuid=$1 [QSA,L] - +# --- その他の独自ルーティング --- +RewriteRule ^(@\w+)$ /user/index.php?userid=$1 [QSA,L] +RewriteRule ^@([^@]+)@([^/]+)$ /user/index.php?userid=$1&domain=$2 [QSA,L] RewriteRule ^!(\w+)~(\w+)$ /ueuse/index.php?ueuseid=$1&touser=$2 [QSA,L] - RewriteRule ^!(\w+)$ /ueuse/index.php?ueuseid=$1 [QSA,L] +# --- エラーハンドリング --- ErrorDocument 400 /errorpage/httperror.php ErrorDocument 401 /errorpage/httperror.php ErrorDocument 403 /errorpage/httperror.php @@ -25,4 +28,5 @@ ErrorDocument 413 /errorpage/httperror.php ErrorDocument 500 /errorpage/httperror.php ErrorDocument 503 /errorpage/httperror.php -Header set X-FRAME-OPTIONS "DENY" \ No newline at end of file +# --- セキュリティヘッダ --- +Header set X-FRAME-OPTIONS "DENY" diff --git a/.well-known/host-meta.php b/.well-known/host-meta.php new file mode 100644 index 0000000..38b7f28 --- /dev/null +++ b/.well-known/host-meta.php @@ -0,0 +1,22 @@ +'; + echo ''; + echo ''; + echo ''; +}else{ + header("HTTP/1.1 410 Gone"); +} +?> \ No newline at end of file diff --git a/.well-known/host-meta/index.php b/.well-known/host-meta/index.php index b05557c..647f51c 100644 --- a/.well-known/host-meta/index.php +++ b/.well-known/host-meta/index.php @@ -1,22 +1,3 @@ '; - echo ''; - echo ''; - echo ''; -}else{ - header("HTTP/1.1 410 Gone"); -} +require('../host-meta.php'); ?> \ No newline at end of file diff --git a/.well-known/nodeinfo.php b/.well-known/nodeinfo.php new file mode 100644 index 0000000..ce0d4a8 --- /dev/null +++ b/.well-known/nodeinfo.php @@ -0,0 +1,28 @@ + [ + array( + "rel" => "http://nodeinfo.diaspora.software/ns/schema/2.1", + "href" => "https://".$domain."/nodeinfo/2.1", + ), + ], + ); + + 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/nodeinfo/index.php b/.well-known/nodeinfo/index.php index 25b6112..0161c99 100644 --- a/.well-known/nodeinfo/index.php +++ b/.well-known/nodeinfo/index.php @@ -1,28 +1,3 @@ [ - array( - "rel" => "http://nodeinfo.diaspora.software/ns/schema/2.1", - "href" => "https://".$domain."/nodeinfo/2.1", - ), - ], - ); - - echo json_encode($item, JSON_UNESCAPED_UNICODE); -}else{ - header("HTTP/1.1 410 Gone"); -} +require('../nodeinfo.php'); ?> \ No newline at end of file diff --git a/.well-known/webfinger.php b/.well-known/webfinger.php new file mode 100644 index 0000000..a352216 --- /dev/null +++ b/.well-known/webfinger.php @@ -0,0 +1,47 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); + } catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); + } + if(isset($_GET['resource'])){ + $user = htmlentities($_GET['resource']); + + $userid = str_replace('acct:','', str_replace('@'.$domain.'', '', $user)); + + $item = array( + "subject" => "acct:".$userid.'@'.$domain.'', + "links" => [ + array( + "rel" => "self", + "type" => "application/activity+json", + "href" => "https://".$domain."/actor/?actor=@".$userid.'', + ), + ], + ); + + 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 cf2b2f1..b8194c6 100644 --- a/.well-known/webfinger/index.php +++ b/.well-known/webfinger/index.php @@ -1,47 +1,3 @@ PDO::ERRMODE_EXCEPTION, - PDO::MYSQL_ATTR_MULTI_STATEMENTS => false - ); - $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); - } catch (PDOException $e) { - // 接続エラーのときエラー内容を取得する - $error_message[] = $e->getMessage(); - } - if(isset($_GET['resource'])){ - $user = htmlentities($_GET['resource']); - - $userid = str_replace('acct:','', str_replace('@'.$domain.'', '', $user)); - - $item = array( - "subject" => "acct:".$userid.'@'.$domain.'', - "links" => [ - array( - "rel" => "self", - "type" => "application/activity+json", - "href" => "https://".$domain."/actor/?actor=@".$userid.'', - ), - ], - ); - - echo json_encode($item, JSON_UNESCAPED_UNICODE); - } -}else{ - header("HTTP/1.1 410 Gone"); -} +require('../webfinger.php'); ?> \ No newline at end of file diff --git a/actor/index.php b/actor/index.php index e543141..7121cd4 100644 --- a/actor/index.php +++ b/actor/index.php @@ -63,7 +63,7 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){ "type" => "Person", "preferredUsername" => "".$userData["userid"]."", "name" => "".$userData["username"]."", - "summary" => "".nl2br($userData["profile"])."", + "summary" => "".preg_replace('/\r\n/i', "", nl2br($userData["profile"]))."", "followers" => "https://".$domain."/user/followers/?actor=@".$userid."", "following" => "https://".$domain."/user/following/?actor=@".$userid."", "inbox" => "https://".$domain."/user/inbox/?actor=@".$userid."", diff --git a/api/auth.php b/api/auth.php new file mode 100644 index 0000000..71e4ea2 --- /dev/null +++ b/api/auth.php @@ -0,0 +1,327 @@ + 0, + 'path' => '/', + 'domain' => '', + 'secure' => true, + 'httponly' => true, + 'samesite' => 'Lax' +]); +session_start(); +session_regenerate_id(true); + +// データベースに接続 +try { + + $option = array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + +} catch(PDOException $e) { + + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +//ログイン認証--------------------------------------------------- +blockedIP($_SERVER['REMOTE_ADDR']); +$is_login = uwuzuUserLogin($_SESSION, $_COOKIE, $_SERVER['REMOTE_ADDR'], "user"); +if($is_login === false){ + header("Location: ../index.php"); + exit; +}else{ + $userid = safetext($is_login['userid']); + $username = safetext($is_login['username']); + $loginid = safetext($is_login["loginid"]); + $role = safetext($is_login["role"]); + $sacinfo = safetext($is_login["sacinfo"]); + $myblocklist = safetext($is_login["blocklist"]); + $myfollowlist = safetext($is_login["follow"]); + $is_Admin = safetext($is_login["admin"]); +} +$notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'"); +$notiQuery->bindValue(':userid', $userid); +$notiQuery->execute(); +$notiData = $notiQuery->fetch(PDO::FETCH_ASSOC); + +$notificationcount = $notiData['notification_count']; + +if( !empty($pdo) ) { + + // データベース接続の設定 + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $dbh->prepare("SELECT userid,role,datetime FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $userid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + +} +$is_trueclient = false; +if(!(empty($_GET["session"])) && !(empty($_GET["client"])) && !(empty($_GET["scope"]))){ + $is_trueclient = true; + $session_code = safetext($_GET["session"]); + if(strlen($session_code) > 512){ + $is_trueclient = false; + } + $client_name = safetext($_GET["client"]); + if(isset($_GET["icon"])){ + $client_icon = safetext(urldecode($_GET["icon"])); + }else{ + $client_icon = "../img/sysimage/errorimage/emoji_404.png"; + } + if(isset($_GET["scope"])){ + $client_scope_base = safetext(urldecode($_GET["scope"])); + $client_scope_base = array_unique(array_map('trim', explode(",", $client_scope_base))); + + $client_scope = []; + $securityScopes = ["write:me", "write:ueuse", "write:follow", "write:favorite", "write:notifications", "write:bookmark", "read:bookmark"]; + $securityScopesView = false; + + foreach ($client_scope_base as $scope) { + if (GetAPIScopes($scope)) { + $client_scope[] = GetAPIScopes($scope); + if($securityScopesView === false && in_array($scope, $securityScopes)){ + $securityScopesView = true; + } + } else { + $client_scope[] = "未知のスコープ ($scope)"; + } + } + }else{ + $client_scope[] = "権限なし"; + } + if(isset($_GET["about"])){ + $client_about = safetext(urldecode($_GET["about"])); + }else{ + $client_about = "クライアントによる説明はありません。"; + } + if(isset($_GET["callback"])){ + $client_callback = safetext(urldecode($_GET["callback"])); + }else{ + $client_callback = null; + } +}else{ + $is_trueclient = false; +} + +if(!(isset($is_done))){ + $is_done = false; +} + +if($is_trueclient === true){ + if( !empty($_POST['allow_submit']) ) { + $tokenQuery = $pdo->prepare("SELECT userid, token FROM api WHERE sessionid = :sessionid"); + $tokenQuery->bindValue(':sessionid', $session_code); + $tokenQuery->execute(); + $tokenData = $tokenQuery->fetch(); + + if(!(empty($tokenData["userid"]))){ + $error_message[] = "不正なリクエストです。"; + } + + foreach ($client_scope_base as $scope) { + if (GetAPIScopes($scope)) { + $client_scope_done[] = $scope; + }else{ + $client_scope_done = array(); + } + } + $client_scope_done = implode(",", $client_scope_done); + if(empty($client_scope_done)){ + $error_message[] = "不正な権限要求です。"; + } + + if($role == "ice"){ + $error_message[] = "アカウントが凍結されているためAPIトークンの発行は行えません。"; + } + + if(empty($error_message)){ + $pdo->beginTransaction(); + try { + $uniqid = createUniqId(); + $token = GenAPIToken(); + $datetime = date("Y-m-d H:i:s"); + + $stmt = $pdo->prepare("INSERT INTO api (uniqid, userid, token, scope, datetime, clientname, sessionid) VALUES (:uniqid, :userid, :token, :scope, :datetime, :clientname, :sessionid)"); + + $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); + $stmt->bindParam(':userid', $userid, PDO::PARAM_STR); + $stmt->bindParam(':token', $token, PDO::PARAM_STR); + $stmt->bindParam(':scope', $client_scope_done, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + $stmt->bindParam(':clientname', $client_name, PDO::PARAM_STR); + $stmt->bindParam(':sessionid', $session_code, PDO::PARAM_STR); + + $res = $stmt->execute(); + + $res = $pdo->commit(); + + } catch(Exception $e) { + $pdo->rollBack(); + } + if($res) { + if(!(empty($client_callback))){ + header("Location: ".$client_callback.""); + exit; + }else{ + $is_done = true; + } + }else{ + $is_done = false; + actionLog($userid, "error", "api/auth", $client_name, $e->getMessage(), 3); + $error_message[] = "APIトークンの生成に失敗しました...(REGISTED_DAME)"; + } + } + } +} + + +require('../logout/logout.php'); + + +?> + + + + + + + + + + + +アクセス許可確認 - <?php echo safetext($serversettings["serverinfo"]["server_name"]);?> + + + + + +
+ + + + +
+

アクセス許可確認

+ +

以下のサービスにあなたのアカウントを使わせてもいいですか...?

+ +
+
+ +

+
+
+
説明
+

+
要求している権限
+
+ - " . safetext($value) . "

"; + } + ?> +
+
+
+
ログイン中のアカウント
+
+ "> +

+
+
+ +
+
許可すると以下のURLにリダイレクトされます
+

+
+ +
+ + +
+

このサービスはあなたに代わってアカウントの操作を行うことや、一部の情報を閲覧することができます。アクセスを許可するかよく考えてください。

+
+ + +
+ 戻る + +
+ +

不正なクライアントによるアクセスです。

+
+ 戻る +
+ +

許可が完了しました!
+ このページを閉じてもとのサービスに戻って大丈夫です。

+ +

アカウントが凍結されているため、アクセスの許可は行えません。

+ +

不明なエラーです。はじめからやり直してください。

+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/api/favorite/change.php b/api/favorite/change.php index db3fd45..851a6d7 100644 --- a/api/favorite/change.php +++ b/api/favorite/change.php @@ -1,15 +1,15 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -53,6 +54,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -61,28 +63,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role, follow, follower FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ - //本文取得 + $AuthData = APIAuth($pdo, $token, "write:favorite"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; if(!(empty($_GET['uniqid']))){ $fav_uniqid = safetext($_GET['uniqid']); }elseif(!(empty($post_json["uniqid"]))){ @@ -101,6 +84,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } @@ -108,16 +92,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/favorite/get.php b/api/favorite/get.php index b118792..9bd39b9 100644 --- a/api/favorite/get.php +++ b/api/favorite/get.php @@ -1,15 +1,15 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -53,6 +54,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -61,27 +63,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role, follow, follower FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "read:ueuse"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; //本文取得 if(!(empty($_GET['uniqid']))){ $fav_uniqid = safetext($_GET['uniqid']); @@ -101,6 +85,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } @@ -108,16 +93,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/me/index.php b/api/me/index.php index b203d6b..d98ab59 100644 --- a/api/me/index.php +++ b/api/me/index.php @@ -1,8 +1,8 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -44,6 +45,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -52,31 +54,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ - $DataQuery = $pdo->prepare("SELECT username,userid,profile,datetime,follow,follower,iconname,headname,role,sacinfo,admin FROM account WHERE userid = :userid"); - $DataQuery->bindValue(':userid', $userData["userid"]); - $DataQuery->execute(); - $userdata = $DataQuery->fetch(); + $AuthData = APIAuth($pdo, $token, "read:me"); + if($AuthData[0] === true){ + $userdata = $AuthData[2]; if (empty($userdata)){ $response = array( @@ -158,6 +138,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $All_ueuse = $allueuse->rowCount(); $response = array( + 'success' => true, 'username' => decode_yajirushi(htmlspecialchars_decode($userdata["username"])), 'userid' => decode_yajirushi(htmlspecialchars_decode($userdata["userid"])), 'profile' => decode_yajirushi(htmlspecialchars_decode($userdata["profile"])), @@ -175,6 +156,14 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { 'language' => "ja-JP", ); } + echo json_encode($response, JSON_UNESCAPED_UNICODE); + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } @@ -182,6 +171,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/me/notification/index.php b/api/me/notification/index.php new file mode 100644 index 0000000..5ba1ee3 --- /dev/null +++ b/api/me/notification/index.php @@ -0,0 +1,171 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); +} catch(PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$Get_Post_Json = file_get_contents("php://input"); +if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { + //トークン取得 + if(!(empty($_GET['token']))){ + $token = safetext($_GET['token']); + }else{ + $post_json = json_decode($Get_Post_Json, true); + if(isset($post_json["token"])){ + $token = safetext($post_json["token"]); + }else{ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } + if($token == ""){ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + + if(!(empty($_GET['limit']))){ + $limit = (int)$_GET['limit']; + }elseif(!(empty($post_json["limit"]))){ + $limit = (int)$post_json["limit"]; + }else{ + $limit = 25; + } + if($limit > 100){ + $limit = 100; + } + + if(!(empty($_GET['page']))){ + $page = (int)$_GET['page']; + }elseif(!(empty($post_json["page"]))){ + $page = (int)$post_json["page"]; + }else{ + $page = 1; + } + $offset = ($page - 1) * $limit; + + session_start(); + + if( !empty($pdo) ) { + $AuthData = APIAuth($pdo, $token, "read:notifications"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; + + $messageQuery = $pdo->prepare("SELECT fromuserid,title,msg,url,datetime,userchk,category FROM notification WHERE touserid = :userid ORDER BY datetime DESC LIMIT :offset, :itemsPerPage"); + $messageQuery->bindValue(':userid', $userData["userid"], PDO::PARAM_STR); + $messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT); + $messageQuery->bindValue(':itemsPerPage', $limit, PDO::PARAM_INT); + $messageQuery->execute(); + + // トランザクション開始 + $pdo->beginTransaction(); + + while ($row = $messageQuery->fetch(PDO::FETCH_ASSOC)) { + $messages[] = $row; + } + + if (!empty($messages)) { + $response = array( + 'success' => true, + ); // ループ外で $response を初期化 + + foreach ($messages as $notificationdata) { + $userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, role FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $notificationdata["fromuserid"]); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if ($userData) { + $now_userdata = array( + "username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])), + "userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])), + "user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))), + "user_header" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + ); + }else if($notificationdata["fromuserid"] === "uwuzu-fromsys"){ + $now_userdata = array( + "username" => decode_yajirushi(htmlspecialchars_decode($serversettings["serverinfo"]["server_name"])), + "userid" => "uwuzu-fromsys", + "user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($serversettings["serverinfo"]["server_icon"])))), + "user_header" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($serversettings["serverinfo"]["server_head"])))), + ); + }else{ + $now_userdata = array(); + } + + if($notificationdata["userchk"] === "done"){ + $userchk = true; + }else{ + $userchk = false; + } + + $item = [ + 'from' => $now_userdata, + 'category' => decode_yajirushi(htmlspecialchars_decode($notificationdata["category"])), + 'title' => decode_yajirushi(htmlspecialchars_decode($notificationdata["title"])), + 'text' => decode_yajirushi(htmlspecialchars_decode($notificationdata["msg"])), + 'datetime' => decode_yajirushi(htmlspecialchars_decode($notificationdata["datetime"])), + 'is_checked' => $userchk, + ]; + + $response[] = $item; // ループ内で $response にデータを追加 + } + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } else { + $err = "notification_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } + } +}else{ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); +} +?> \ No newline at end of file diff --git a/api/me/notification/read.php b/api/me/notification/read.php new file mode 100644 index 0000000..549fa2c --- /dev/null +++ b/api/me/notification/read.php @@ -0,0 +1,123 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); +} catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$Get_Post_Json = file_get_contents("php://input"); +if (isset($_GET['token']) || (!(empty($Get_Post_Json)))) { + //トークン取得 + if (!(empty($_GET['token']))) { + $token = safetext($_GET['token']); + } else { + $post_json = json_decode($Get_Post_Json, true); + if (isset($post_json["token"])) { + $token = safetext($post_json["token"]); + } else { + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } + if ($token == "") { + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + + if (!(empty($_GET['limit']))) { + $limit = (int)$_GET['limit']; + } elseif (!(empty($post_json["limit"]))) { + $limit = (int)$post_json["limit"]; + } else { + $limit = 25; + } + if ($limit > 100) { + $limit = 100; + } + + if (!(empty($_GET['page']))) { + $page = (int)$_GET['page']; + } elseif (!(empty($post_json["page"]))) { + $page = (int)$post_json["page"]; + } else { + $page = 1; + } + $offset = ($page - 1) * $limit; + + session_start(); + + if (!empty($pdo)) { + $AuthData = APIAuth($pdo, $token, "write:notifications"); + if ($AuthData[0] === true) { + $userData = $AuthData[2]; + + $pdo->beginTransaction(); + try { + $stmt = $pdo->prepare("UPDATE notification SET userchk = 'done' WHERE touserid = :userid;"); + $stmt->bindValue(':userid', $userData["userid"], PDO::PARAM_STR); + $res = $stmt->execute(); + if ($res) { + $pdo->commit(); + $response = array( + 'success' => true + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } else { + $pdo->rollBack(); + $err = "update_failed"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); + } + } else { + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } + } +} else { + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); +} diff --git a/api/me/settings/index.php b/api/me/settings/index.php new file mode 100644 index 0000000..839ad65 --- /dev/null +++ b/api/me/settings/index.php @@ -0,0 +1,443 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); +} catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$Get_Post_Json = file_get_contents("php://input"); +if (isset($_GET['token']) || (!(empty($Get_Post_Json)))) { + //トークン取得 + if (!(empty($_GET['token']))) { + $token = safetext($_GET['token']); + } else { + $post_json = json_decode($Get_Post_Json, true); + if (isset($post_json["token"])) { + $token = safetext($post_json["token"]); + } else { + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } + if ($token == "") { + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + + if (!empty($pdo)) { + $AuthData = APIAuth($pdo, $token, "write:me"); + if ($AuthData[0] === true) { + if(file_exists(__DIR__ . "/../../../settings_admin/plugin_settings/amazons3_settings.php")){ + require_once __DIR__ . '/../../../settings_admin/plugin_settings/amazons3_settings.php'; + if(AMS3_CHKS == "true"){ + if(file_exists(__DIR__ . "/../../../plugin/aws/aws-autoloader.php")){ + require_once __DIR__ . '/../../../plugin/aws/aws-autoloader.php'; + }else{ + actionLog(null, "error", "settings", null, "AWS SDK for PHPが見つかりませんでした!", 4); + } + } + }else{ + actionLog(null, "error", "settings", null, "amazons3_settings.phpが見つかりませんでした!", 3); + } + + $userData = $AuthData[2]; + $userid = $userData["userid"]; + + $add_sql = array(); + + if (!(empty($_GET['username']))) { + $username = safetext($_GET['username']); + } elseif (!(empty($post_json["username"]))) { + $username = safetext($post_json["username"]); + } else { + $username = null; + } + + // ユーザーネームの入力チェック + if (!($username === null)) { + if (empty($username)) { + $error_message[] = '表示名を入力してください。(USERNAME_INPUT_PLEASE)'; + } else { + // 文字数を確認 + if (50 < mb_strlen($username, 'UTF-8')) { + $error_message[] = 'ユーザーネームは50文字以内で入力してください。(USERNAME_OVER_MAX_COUNT)'; + } + } + + $add_sql[] = "username = :username"; + } + + + if (!(empty($_GET['profile']))) { + $profile = safetext($_GET['profile']); + } elseif (!(empty($post_json["profile"]))) { + $profile = safetext($post_json["profile"]); + } else { + $profile = null; + } + + if (!($profile === null)) { + if (1024 < mb_strlen($profile, 'UTF-8')) { + $error_message[] = 'プロフィールは1024文字以内で入力してください。(INPUT_OVER_MAX_COUNT)'; + } + $add_sql[] = "profile = :profile"; + } + + + if (!(empty($post_json["icon"]))) { + $imageData = base64_decode($post_json["icon"], true); + + $tmpFilePath = tempnam(sys_get_temp_dir(), 'upload_' . createUniqId()); + file_put_contents($tmpFilePath, $imageData); + + $IconFiles = [ + 'name' => 'upload.png', + 'type' => check_mime($tmpFilePath), + 'tmp_name' => $tmpFilePath, + 'error' => UPLOAD_ERR_OK, + 'size' => strlen($imageData), + ]; + } else { + $IconFiles = array(); + } + + + if (isset($IconFiles)) { + if (!(empty($IconFiles['name']))) { + $uploadedFile = $IconFiles; + if (check_mime($uploadedFile['tmp_name'])) { + $extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION); + delete_exif($extension, $uploadedFile['tmp_name']); + resizeImage($uploadedFile['tmp_name'], 512, 512); + + if (AMS3_CHKS == "true") { + $usericonurl = getUserData($pdo, $userid)["iconname"]; + if (filter_var($usericonurl, FILTER_VALIDATE_URL)) { + $s3delresult = deleteAmazonS3($usericonurl); + } else { + $s3delresult = true; + } + if ($s3delresult == true) { + $s3result = uploadAmazonS3($uploadedFile['tmp_name']); + } else { + $s3result = false; + } + } else { + if (check_mime($uploadedFile['tmp_name']) == "image/webp") { + $newFilename = createUniqId() . '-' . $userid . '.webp'; + } else { + $newFilename = createUniqId() . '-' . $userid . '.' . $extension; + } + $uploadedPath = 'usericons/' . $newFilename; + $result = rename($uploadedFile['tmp_name'], __DIR__ . '/../../../' . $uploadedPath); + + if ($result) { + $iconName = $uploadedPath; // 保存されたファイルのパスを使用 + $currentIconPath = getUserData($pdo, $userid)["iconname"]; + } else { + $errnum = $uploadedFile['error']; + $errcode = "ERROR"; + + switch ($errnum) { + case 1: + $errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN"; + break; + case 2: + $errcode = "FILE_DEKASUGUI_HTML_KAKUNIN"; + break; + case 3: + $errcode = "FILE_SUKOSHIDAKE_UPLOAD"; + break; + case 4: + $errcode = "FILE_UPLOAD_DEKINAKATTA"; + break; + case 6: + $errcode = "TMP_FOLDER_NAI"; + break; + case 7: + $errcode = "FILE_KAKIKOMI_SIPPAI"; + break; + case 8: + $errcode = "PHPINFO()_KAKUNIN"; + break; + case 0: + // 成功だったのに move_uploaded_file() が失敗した + if (!is_uploaded_file($uploadedFile['tmp_name'])) { + $errcode = "TMP_FILE_NAI"; + } elseif (!is_writable(__DIR__ . '/../../../usericons/')) { + $errcode = "SAVE_FOLDER_KAKIKOMI_KENNAI"; + } else { + $errcode = "MOVE_UPLOAD_FILE_SIPPAI"; + } + break; + } + $error_message[] = 'アップロード失敗!(1)エラーコード:' . $errcode . ''; + } + } + if (isset($s3result)) { + if ($s3result == false) { + $error_message[] = 'アップロード失敗!(1)エラーコード: S3ERROR'; + } else { + $iconName = $s3result; // S3に保存されたファイルのパスを使用 + $currentIconPath = getUserData($pdo, $userid)["iconname"]; + } + } + } else { + $error_message[] = "使用できない画像形式です。(FILE_UPLOAD_DEKINAKATTA)"; + } + } + } + if (!(empty($iconName))) { + $add_sql[] = "iconname = :iconname"; + } + + + if (!(empty($post_json["header"]))) { + $imageData = base64_decode($post_json["header"], true); + + $tmpFilePath = tempnam(sys_get_temp_dir(), 'upload_' . createUniqId()); + file_put_contents($tmpFilePath, $imageData); + + $HeadFiles = [ + 'name' => 'upload.png', + 'type' => check_mime($tmpFilePath), + 'tmp_name' => $tmpFilePath, + 'error' => UPLOAD_ERR_OK, + 'size' => strlen($imageData), + ]; + } else { + $HeadFiles = array(); + } + + + if (isset($HeadFiles)) { + if (!(empty($HeadFiles['name']))) { + $uploadedFile = $HeadFiles; + if (check_mime($uploadedFile['tmp_name'])) { + $extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION); + delete_exif($extension, $uploadedFile['tmp_name']); + resizeImage($uploadedFile['tmp_name'], 2048, 1024); + + if (AMS3_CHKS == "true") { + $userheadurl = getUserData($pdo, $userid)["headname"]; + if (filter_var($userheadurl, FILTER_VALIDATE_URL)) { + $s3delresult = deleteAmazonS3($userheadurl); + } else { + $s3delresult = true; + } + if ($s3delresult == true) { + $s3result = uploadAmazonS3($uploadedFile['tmp_name']); + } else { + $s3result = false; + } + } else { + if (check_mime($uploadedFile['tmp_name']) == "image/webp") { + $newFilename = createUniqId() . '-' . $userid . '.webp'; + } else { + $newFilename = createUniqId() . '-' . $userid . '.' . $extension; + } + $uploadedPath = 'userheads/' . $newFilename; + $result = rename($uploadedFile['tmp_name'], __DIR__ . '/../../../' . $uploadedPath); + + if ($result) { + $headName = $uploadedPath; // 保存されたファイルのパスを使用 + $currentHeadPath = getUserData($pdo, $userid)["headname"]; + } else { + $errnum = $uploadedFile['error']; + $errcode = "ERROR"; + + switch ($errnum) { + case 1: + $errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN"; + break; + case 2: + $errcode = "FILE_DEKASUGUI_HTML_KAKUNIN"; + break; + case 3: + $errcode = "FILE_SUKOSHIDAKE_UPLOAD"; + break; + case 4: + $errcode = "FILE_UPLOAD_DEKINAKATTA"; + break; + case 6: + $errcode = "TMP_FOLDER_NAI"; + break; + case 7: + $errcode = "FILE_KAKIKOMI_SIPPAI"; + break; + case 8: + $errcode = "PHPINFO()_KAKUNIN"; + break; + case 0: + // 成功だったのに move_uploaded_file() が失敗した + if (!is_uploaded_file($uploadedFile['tmp_name'])) { + $errcode = "TMP_FILE_NAI"; + } elseif (!is_writable(__DIR__ . '/../../../usericons/')) { + $errcode = "SAVE_FOLDER_KAKIKOMI_KENNAI"; + } else { + $errcode = "MOVE_UPLOAD_FILE_SIPPAI"; + } + break; + } + $error_message[] = 'アップロード失敗!(2)エラーコード:' . $errcode . ''; + } + } + if (isset($s3result)) { + if ($s3result == false) { + $error_message[] = 'アップロード失敗!(2)エラーコード: S3ERROR'; + } else { + $headName = $s3result; // S3に保存されたファイルのパスを使用 + $currentHeadPath = getUserData($pdo, $userid)["headname"]; + } + } + } else { + $error_message[] = "使用できない画像形式です。(FILE_UPLOAD_DEKINAKATTA)"; + } + } + } + + if (!(empty($headName))) { + $add_sql[] = "headname = :headname"; + } + + if(empty($add_sql)) { + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + }else{ + $add_sql = implode(", ", $add_sql); + } + + if (empty($error_message)) { + // トランザクション開始 + $pdo->beginTransaction(); + + try { + + $stmt = $pdo->prepare("UPDATE account SET ".$add_sql." WHERE userid = :userid;"); + + // 他の値をセット + if (!(empty($username))) { + $stmt->bindValue(':username', $username, PDO::PARAM_STR); + } + if (!(empty($profile))) { + $stmt->bindValue(':profile', $profile, PDO::PARAM_STR); + } + if (!(empty($iconName))) { + $stmt->bindValue(':iconname', $iconName, PDO::PARAM_STR); + } + if (!(empty($headName))) { + $stmt->bindValue(':headname', $headName, PDO::PARAM_STR); + } + + $stmt->bindValue(':userid', $userid, PDO::PARAM_STR); + $res = $stmt->execute(); + + // コミット + if($res) { + $pdo->commit(); + if (!(empty($iconName))) { + if ($currentIconPath && !filter_var($currentIconPath, FILTER_VALIDATE_URL)) { + $filePath = realpath(__DIR__ . '/../../../' . $currentIconPath); + if ($filePath && file_exists($filePath)) { + unlink($filePath); + } + } + } + if (!(empty($headName))) { + if ($currentHeadPath && !filter_var($currentHeadPath, FILTER_VALIDATE_URL)) { + $filePath = realpath(__DIR__ . '/../../../' . $currentHeadPath); + if ($filePath && file_exists($filePath)) { + unlink($filePath); + } + } + } + + $response = array( + 'success' => true + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } else { + $pdo->rollBack(); + $err = "update_failed"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } catch (Exception $e) { + $pdo->rollBack(); + actionLog($userid, "error", "user-settings-api", null, $e, 4); + $err = "update_failed"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + + $stmt = null; + }else{ + $err = $error_message; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } else { + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } +} else { + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; +} diff --git a/api/token/get.php b/api/token/get.php new file mode 100644 index 0000000..d7d3539 --- /dev/null +++ b/api/token/get.php @@ -0,0 +1,100 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); +} catch(PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$Get_Post_Json = file_get_contents("php://input"); +if(isset($_GET['session']) || (!(empty($Get_Post_Json)))) { + //トークン取得 + if(!(empty($_GET['session']))){ + $session_id = safetext($_GET['session']); + }else{ + $post_json = json_decode($Get_Post_Json, true); + if(isset($post_json["session"])){ + $session_id = safetext($post_json["session"]); + }else{ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } + if($session_id == ""){ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + + session_start(); + + if( !empty($pdo) ) { + $tokenQuery = $pdo->prepare("SELECT userid, token FROM api WHERE sessionid = :sessionid"); + $tokenQuery->bindValue(':sessionid', $session_id); + $tokenQuery->execute(); + $tokenData = $tokenQuery->fetch(); + + if(empty($tokenData["userid"])){ + $err = "session_invalid"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + }else{ + $userdata = getUserData($pdo, $tokenData["userid"]); + + if (empty($userdata)){ + $response = array( + 'error_code' => "critical_error_userdata_not_found", + 'success' => false + ); + }else{ + DelSessionidAPIToken($pdo, $session_id); + + $response = array( + 'success' => true, + 'username' => decode_yajirushi(htmlspecialchars_decode($userdata["username"])), + 'userid' => decode_yajirushi(htmlspecialchars_decode($userdata["userid"])), + 'token' => decode_yajirushi(htmlspecialchars_decode($tokenData["token"])) + ); + } + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } + } +}else{ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); +} +?> \ No newline at end of file diff --git a/api/ueuse/bookmark/index.php b/api/ueuse/bookmark/index.php new file mode 100644 index 0000000..588d64c --- /dev/null +++ b/api/ueuse/bookmark/index.php @@ -0,0 +1,226 @@ + PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); +} catch(PDOException $e) { + // 接続エラーのときエラー内容を取得する + $error_message[] = $e->getMessage(); +} + +$Get_Post_Json = file_get_contents("php://input"); +if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { + //トークン取得 + if(!(empty($_GET['token']))){ + $token = safetext($_GET['token']); + }else{ + $post_json = json_decode($Get_Post_Json, true); + if(isset($post_json["token"])){ + $token = safetext($post_json["token"]); + }else{ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + } + if($token == ""){ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); + exit; + } + + if(!(empty($_GET['limit']))){ + $limit = (int)$_GET['limit']; + }elseif(!(empty($post_json["limit"]))){ + $limit = (int)$post_json["limit"]; + }else{ + $limit = 25; + } + if($limit > 100){ + $limit = 100; + } + + if(!(empty($_GET['page']))){ + $page = (int)$_GET['page']; + }elseif(!(empty($post_json["page"]))){ + $page = (int)$post_json["page"]; + }else{ + $page = 1; + } + $offset = ($page - 1) * $limit; + + session_start(); + + if( !empty($pdo) ) { + $AuthData = APIAuth($pdo, $token, "read:bookmark"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; + $messages = array(); + + $allBookmarks = explode(',', $userData['bookmark'] ?? ''); + $reversedBookmarks = array_reverse($allBookmarks); + $bookmarkList = array_chunk($reversedBookmarks, $limit); + + $list_Page = max(0, (int)$page - 1); + + if (!empty($bookmarkList[$list_Page])) { + $currentPageUniqIds = $bookmarkList[$list_Page]; + + // 名前付きプレースホルダ作成 + $placeholders = []; + $params = []; + foreach ($currentPageUniqIds as $i => $uniqid) { + $key = ":uniqid$i"; + $placeholders[] = $key; + $params[$key] = $uniqid; + } + $placeholderStr = implode(',', $placeholders); + + $sql = "SELECT ueuse.* + FROM ueuse + LEFT JOIN account ON ueuse.account = account.userid + WHERE ueuse.uniqid IN ($placeholderStr) AND account.role != 'ice' + ORDER BY FIELD(ueuse.uniqid, $placeholderStr)"; + + $stmt = $pdo->prepare($sql); + foreach ($params as $key => $val) { + $stmt->bindValue($key, $val, PDO::PARAM_STR); + } + $stmt->execute(); + $messages = $stmt->fetchAll(PDO::FETCH_ASSOC); + } + + if (!empty($messages)) { + $response = array( + 'success' => true, + ); // ループ外で $response を初期化 + + foreach ($messages as $ueusedata) { + if(!(empty($ueusedata["favorite"]))){ + $favorite = preg_split("/,/", decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite"]))); + array_shift($favorite); + }else{ + $favorite = array(); + } + $favcnts = explode(',', $ueusedata["favorite"]); + $ueusedata["favorite_cnt"] = count($favcnts) - 1; + + $userData = getUserData($pdo, $ueusedata["account"]); + + if ($userData) { + $now_userdata = array( + "username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])), + "userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])), + "user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))), + "user_header" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "is_bot" => $userData['sacinfo'] == 'bot' ? true : false, + ); + } + + if($ueusedata["nsfw"] == "true"){ + $nsfw = true; + }else{ + $nsfw = false; + } + + if($ueusedata["abi"] == "none"){ + $ueusedata["abi"] = ""; + } + + //リプライ数取得 + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $ueusedata['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData){ + $ueusedata['reply_count'] = $rpData['reply_count']; + } + + //リユーズ数取得 + $ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid"); + $ruQuery->bindValue(':ruuniqid', $ueusedata['uniqid']); + $ruQuery->execute(); + $ruData = $ruQuery->fetch(PDO::FETCH_ASSOC); + + if ($ruData){ + $ueusedata['reuse_count'] = $ruData['reuse_count']; + } + + $item = [ + 'uniqid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["uniqid"])), + 'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])), + 'reuseid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ruuniqid"])), + 'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])), + 'account' => $now_userdata, + 'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))), + 'photo2' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo2"])))), + 'photo3' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo3"])))), + 'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))), + 'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))), + 'favorite' => $favorite, + 'favorite_cnt' => $ueusedata["favorite_cnt"], + 'reply_cnt' => $ueusedata["reply_count"], + 'reuse_cnt' => $ueusedata["reuse_count"], + 'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])), + 'abi' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abi"])), + 'abidatetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abidate"])), + 'nsfw' => $nsfw, + ]; + + $response[] = $item; // ループ内で $response にデータを追加 + } + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } else { + $err = "ueuse_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + } + } +}else{ + $err = "input_not_found"; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); +} +?> \ No newline at end of file diff --git a/api/ueuse/create.php b/api/ueuse/create.php index 5c44828..69ff998 100644 --- a/api/ueuse/create.php +++ b/api/ueuse/create.php @@ -1,15 +1,15 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -52,6 +53,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -60,27 +62,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "write:ueuse"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; //本文取得 if(!(empty($_GET['text']))){ $ueuse = safetext($_GET['text']); @@ -90,6 +74,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); @@ -213,6 +198,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { if($ueuse_result[0] == true){ $response = array( + 'success' => true, 'uniqid' => decode_yajirushi(htmlspecialchars_decode($ueuse_result[1])), 'userid' => decode_yajirushi(htmlspecialchars_decode($userData["userid"])), ); @@ -282,16 +268,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/ueuse/delete.php b/api/ueuse/delete.php index f744fac..84a3a7d 100644 --- a/api/ueuse/delete.php +++ b/api/ueuse/delete.php @@ -1,8 +1,8 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -44,6 +45,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -57,6 +59,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); @@ -66,27 +69,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role, loginid FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "write:ueuse"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; if (safetext(isset($ueuseid)) && safetext(isset($userData["userid"])) && safetext(isset($userData["loginid"]))){ $postUserid = safetext($userData["userid"]); $postUniqid = safetext($ueuseid); @@ -114,16 +99,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/ueuse/get.php b/api/ueuse/get.php index 62b11ed..40608df 100644 --- a/api/ueuse/get.php +++ b/api/ueuse/get.php @@ -1,8 +1,8 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -44,6 +45,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -57,6 +59,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); @@ -66,27 +69,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "read:ueuse"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; $sql = "SELECT * FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1"; $stmt = $pdo->prepare($sql); $stmt->bindValue(':ueuseid', $ueuseid, PDO::PARAM_STR); @@ -99,7 +84,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { } if (!empty($messages)) { - $response = array(); // ループ外で $response を初期化 + $response = array( + 'success' => true, + ); // ループ外で $response を初期化 foreach ($messages as $ueusedata) { if(!(empty($ueusedata["favorite"]))){ @@ -111,17 +98,15 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $favcnts = explode(',', $ueusedata["favorite"]); $ueusedata["favorite_cnt"] = count($favcnts) - 1; - $userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, role FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $ueusedata["account"]); - $userQuery->execute(); - $userData = $userQuery->fetch(); + $userData = getUserData($pdo, $ueusedata["account"]); if ($userData) { $now_userdata = array( "username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])), "userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])), "user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))), - "user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "user_header" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "is_bot" => $userData['sacinfo'] == 'bot' ? true : false, ); } @@ -130,10 +115,35 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { }else{ $nsfw = false; } + + if($ueusedata["abi"] == "none"){ + $ueusedata["abi"] = ""; + } + + //リプライ数取得 + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $ueusedata['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData){ + $ueusedata['reply_count'] = $rpData['reply_count']; + } + + //リユーズ数取得 + $ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid"); + $ruQuery->bindValue(':ruuniqid', $ueusedata['uniqid']); + $ruQuery->execute(); + $ruData = $ruQuery->fetch(PDO::FETCH_ASSOC); + + if ($ruData){ + $ueusedata['reuse_count'] = $ruData['reuse_count']; + } $item = [ 'uniqid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["uniqid"])), 'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])), + 'reuseid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ruuniqid"])), 'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])), 'account' => $now_userdata, 'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))), @@ -142,7 +152,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { 'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))), 'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))), 'favorite' => $favorite, - 'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])), + 'favorite_cnt' => $ueusedata["favorite_cnt"], + 'reply_cnt' => $ueusedata["reply_count"], + 'reuse_cnt' => $ueusedata["reuse_count"], 'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])), 'abi' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abi"])), 'abidatetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abidate"])), @@ -157,16 +169,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "ueuse_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/ueuse/index.php b/api/ueuse/index.php index a811e55..e8caf60 100644 --- a/api/ueuse/index.php +++ b/api/ueuse/index.php @@ -1,8 +1,8 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -45,6 +46,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -73,27 +75,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "read:ueuse"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; $sql = "SELECT ueuse.* FROM ueuse LEFT JOIN account ON ueuse.account = account.userid @@ -113,7 +97,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { } if (!empty($messages)) { - $response = array(); // ループ外で $response を初期化 + $response = array( + 'success' => true, + ); // ループ外で $response を初期化 foreach ($messages as $ueusedata) { if(!(empty($ueusedata["favorite"]))){ @@ -125,17 +111,15 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $favcnts = explode(',', $ueusedata["favorite"]); $ueusedata["favorite_cnt"] = count($favcnts) - 1; - $userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, role FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $ueusedata["account"]); - $userQuery->execute(); - $userData = $userQuery->fetch(); + $userData = getUserData($pdo, $ueusedata["account"]); if ($userData) { $now_userdata = array( "username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])), "userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])), "user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))), - "user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "user_header" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "is_bot" => $userData['sacinfo'] == 'bot' ? true : false, ); } @@ -144,10 +128,35 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { }else{ $nsfw = false; } + + if($ueusedata["abi"] == "none"){ + $ueusedata["abi"] = ""; + } + + //リプライ数取得 + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $ueusedata['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData){ + $ueusedata['reply_count'] = $rpData['reply_count']; + } + + //リユーズ数取得 + $ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid"); + $ruQuery->bindValue(':ruuniqid', $ueusedata['uniqid']); + $ruQuery->execute(); + $ruData = $ruQuery->fetch(PDO::FETCH_ASSOC); + + if ($ruData){ + $ueusedata['reuse_count'] = $ruData['reuse_count']; + } $item = [ 'uniqid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["uniqid"])), 'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])), + 'reuseid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ruuniqid"])), 'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])), 'account' => $now_userdata, 'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))), @@ -156,7 +165,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { 'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))), 'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))), 'favorite' => $favorite, - 'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])), + 'favorite_cnt' => $ueusedata["favorite_cnt"], + 'reply_cnt' => $ueusedata["reply_count"], + 'reuse_cnt' => $ueusedata["reuse_count"], 'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])), 'abi' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abi"])), 'abidatetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abidate"])), @@ -171,16 +182,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "ueuse_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/ueuse/mentions.php b/api/ueuse/mentions.php index 2f8fa88..db4ddbb 100644 --- a/api/ueuse/mentions.php +++ b/api/ueuse/mentions.php @@ -1,8 +1,8 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -45,6 +46,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -73,35 +75,17 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); + $AuthData = APIAuth($pdo, $token, "read:ueuse"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; + $Userid = strtolower($userData["userid"]); - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ - $Userid = $userData["userid"]; - - $sql = "SELECT * FROM ueuse WHERE ueuse LIKE :keyword OR abi LIKE :keyword ORDER BY datetime DESC LIMIT :offset, :itemsPerPage"; + $sql = "SELECT * FROM ueuse WHERE FIND_IN_SET(:keyword, mentions) ORDER BY datetime DESC LIMIT :offset, :itemsPerPage"; $stmt = $pdo->prepare($sql); $stmt->bindValue(':offset', $offset, PDO::PARAM_INT); $stmt->bindValue(':itemsPerPage', $limit, PDO::PARAM_INT); - $stmt->bindValue(':keyword', '%@' . $Userid . '%', PDO::PARAM_STR); + $stmt->bindValue(':keyword', '' . $Userid . '', PDO::PARAM_STR); $stmt->execute(); $message_array = $stmt; @@ -111,7 +95,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { } if (!empty($messages)) { - $response = array(); // ループ外で $response を初期化 + $response = array( + 'success' => true, + ); // ループ外で $response を初期化 foreach ($messages as $ueusedata) { if(!(empty($ueusedata["favorite"]))){ @@ -123,17 +109,15 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $favcnts = explode(',', $ueusedata["favorite"]); $ueusedata["favorite_cnt"] = count($favcnts) - 1; - $userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, role FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $ueusedata["account"]); - $userQuery->execute(); - $userData = $userQuery->fetch(); + $userData = getUserData($pdo, $ueusedata["account"]); if ($userData) { $now_userdata = array( "username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])), "userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])), "user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))), - "user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "user_header" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "is_bot" => $userData['sacinfo'] == 'bot' ? true : false, ); } @@ -142,10 +126,35 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { }else{ $nsfw = false; } + + if($ueusedata["abi"] == "none"){ + $ueusedata["abi"] = ""; + } + + //リプライ数取得 + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $ueusedata['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData){ + $ueusedata['reply_count'] = $rpData['reply_count']; + } + + //リユーズ数取得 + $ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid"); + $ruQuery->bindValue(':ruuniqid', $ueusedata['uniqid']); + $ruQuery->execute(); + $ruData = $ruQuery->fetch(PDO::FETCH_ASSOC); + + if ($ruData){ + $ueusedata['reuse_count'] = $ruData['reuse_count']; + } $item = [ 'uniqid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["uniqid"])), 'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])), + 'reuseid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ruuniqid"])), 'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])), 'account' => $now_userdata, 'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))), @@ -154,7 +163,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { 'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))), 'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))), 'favorite' => $favorite, - 'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])), + 'favorite_cnt' => $ueusedata["favorite_cnt"], + 'reply_cnt' => $ueusedata["reply_count"], + 'reuse_cnt' => $ueusedata["reuse_count"], 'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])), 'abi' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abi"])), 'abidatetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abidate"])), @@ -169,16 +180,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "ueuse_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/ueuse/replies.php b/api/ueuse/replies.php index c2a9669..823f603 100644 --- a/api/ueuse/replies.php +++ b/api/ueuse/replies.php @@ -1,8 +1,8 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -45,6 +46,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -58,6 +60,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); @@ -87,27 +90,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "read:ueuse"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; $sql = "SELECT * FROM ueuse WHERE uniqid = :ueuseid OR rpuniqid = :ueuseid ORDER BY datetime ASC LIMIT :offset, :itemsPerPage"; $stmt = $pdo->prepare($sql); $stmt->bindValue(':ueuseid', $ueuseid, PDO::PARAM_STR); @@ -122,7 +107,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { } if (!empty($messages)) { - $response = array(); // ループ外で $response を初期化 + $response = array( + 'success' => true, + ); // ループ外で $response を初期化 foreach ($messages as $ueusedata) { if(!(empty($ueusedata["favorite"]))){ @@ -134,17 +121,15 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $favcnts = explode(',', $ueusedata["favorite"]); $ueusedata["favorite_cnt"] = count($favcnts) - 1; - $userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, role FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $ueusedata["account"]); - $userQuery->execute(); - $userData = $userQuery->fetch(); + $userData = getUserData($pdo, $ueusedata["account"]); if ($userData) { $now_userdata = array( "username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])), "userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])), "user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))), - "user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "user_header" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "is_bot" => $userData['sacinfo'] == 'bot' ? true : false, ); } @@ -153,10 +138,35 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { }else{ $nsfw = false; } + + if($ueusedata["abi"] == "none"){ + $ueusedata["abi"] = ""; + } + + //リプライ数取得 + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $ueusedata['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData){ + $ueusedata['reply_count'] = $rpData['reply_count']; + } + + //リユーズ数取得 + $ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid"); + $ruQuery->bindValue(':ruuniqid', $ueusedata['uniqid']); + $ruQuery->execute(); + $ruData = $ruQuery->fetch(PDO::FETCH_ASSOC); + + if ($ruData){ + $ueusedata['reuse_count'] = $ruData['reuse_count']; + } $item = [ 'uniqid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["uniqid"])), 'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])), + 'reuseid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ruuniqid"])), 'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])), 'account' => $now_userdata, 'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))), @@ -165,7 +175,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { 'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))), 'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))), 'favorite' => $favorite, - 'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])), + 'favorite_cnt' => $ueusedata["favorite_cnt"], + 'reply_cnt' => $ueusedata["reply_count"], + 'reuse_cnt' => $ueusedata["reuse_count"], 'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])), 'abi' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abi"])), 'abidatetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abidate"])), @@ -180,16 +192,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "ueuse_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/ueuse/search.php b/api/ueuse/search.php index 0e8a2fb..96f002e 100644 --- a/api/ueuse/search.php +++ b/api/ueuse/search.php @@ -1,8 +1,8 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -45,6 +46,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -58,6 +60,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); @@ -87,27 +90,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "read:ueuse"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; $Userid = $userData["userid"]; $sql = "SELECT * FROM ueuse WHERE ueuse LIKE :keyword OR abi LIKE :keyword ORDER BY datetime DESC LIMIT :offset, :itemsPerPage"; @@ -125,7 +110,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { } if (!empty($messages)) { - $response = array(); // ループ外で $response を初期化 + $response = array( + 'success' => true, + ); // ループ外で $response を初期化 foreach ($messages as $ueusedata) { if(!(empty($ueusedata["favorite"]))){ @@ -137,17 +124,15 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $favcnts = explode(',', $ueusedata["favorite"]); $ueusedata["favorite_cnt"] = count($favcnts) - 1; - $userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, role FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $ueusedata["account"]); - $userQuery->execute(); - $userData = $userQuery->fetch(); + $userData = getUserData($pdo, $ueusedata["account"]); if ($userData) { $now_userdata = array( "username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])), "userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])), "user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))), - "user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "user_header" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))), + "is_bot" => $userData['sacinfo'] == 'bot' ? true : false, ); } @@ -156,10 +141,35 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { }else{ $nsfw = false; } + + if($ueusedata["abi"] == "none"){ + $ueusedata["abi"] = ""; + } + + //リプライ数取得 + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $ueusedata['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData){ + $ueusedata['reply_count'] = $rpData['reply_count']; + } + + //リユーズ数取得 + $ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid"); + $ruQuery->bindValue(':ruuniqid', $ueusedata['uniqid']); + $ruQuery->execute(); + $ruData = $ruQuery->fetch(PDO::FETCH_ASSOC); + + if ($ruData){ + $ueusedata['reuse_count'] = $ruData['reuse_count']; + } $item = [ 'uniqid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["uniqid"])), 'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])), + 'reuseid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ruuniqid"])), 'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])), 'account' => $now_userdata, 'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))), @@ -168,7 +178,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { 'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))), 'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))), 'favorite' => $favorite, - 'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])), + 'favorite_cnt' => $ueusedata["favorite_cnt"], + 'reply_cnt' => $ueusedata["reply_count"], + 'reuse_cnt' => $ueusedata["reuse_count"], 'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])), 'abi' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abi"])), 'abidatetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["abidate"])), @@ -183,16 +195,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "ueuse_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/users/follow.php b/api/users/follow.php index 7f52f72..13f73a9 100644 --- a/api/users/follow.php +++ b/api/users/follow.php @@ -1,15 +1,15 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -53,6 +54,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -61,27 +63,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role, follow, follower FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "write:follow"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; //本文取得 if(!(empty($_GET['userid']))){ $follow_userid = safetext($_GET['userid']); @@ -111,6 +95,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "could_not_complete"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } @@ -118,6 +103,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "you_cant_it_to_yourself"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } @@ -125,6 +111,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "critical_error_userdata_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } @@ -132,16 +119,26 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/users/index.php b/api/users/index.php index a8859fa..f4d5fc0 100644 --- a/api/users/index.php +++ b/api/users/index.php @@ -1,8 +1,8 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -46,6 +47,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -59,6 +61,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); @@ -68,31 +71,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ - $DataQuery = $pdo->prepare("SELECT username,userid,profile,datetime,follow,follower,iconname,headname,role,sacinfo,admin FROM account WHERE userid = :userid"); - $DataQuery->bindValue(':userid', $userid); - $DataQuery->execute(); - $userdata = $DataQuery->fetch(); + $AuthData = APIAuth($pdo, $token, "read:users"); + if($AuthData[0] === true){ + $userdata = $AuthData[2]; if (empty($userdata)){ $response = array( @@ -174,6 +155,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $All_ueuse = $allueuse->rowCount(); $response = array( + 'success' => true, 'username' => decode_yajirushi(htmlspecialchars_decode($userdata["username"])), 'userid' => decode_yajirushi(htmlspecialchars_decode($userdata["userid"])), 'profile' => decode_yajirushi(htmlspecialchars_decode($userdata["profile"])), @@ -191,6 +173,14 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { 'language' => "ja-JP", ); } + echo json_encode($response, JSON_UNESCAPED_UNICODE); + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } @@ -198,6 +188,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/users/unfollow.php b/api/users/unfollow.php index 0b04050..0d71346 100644 --- a/api/users/unfollow.php +++ b/api/users/unfollow.php @@ -1,15 +1,15 @@ $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -53,6 +54,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -61,27 +63,9 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { session_start(); if( !empty($pdo) ) { - $userQuery = $pdo->prepare("SELECT username, userid, role, follow, follower FROM account WHERE token = :token"); - $userQuery->bindValue(':token', $token); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - if(empty($userData["userid"])){ - $err = "token_invalid"; - $response = array( - 'error_code' => $err, - ); - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }elseif($userData["role"] === "ice"){ - $err = "this_account_has_been_frozen"; - $response = array( - 'error_code' => $err, - ); - - echo json_encode($response, JSON_UNESCAPED_UNICODE); - exit; - }else{ + $AuthData = APIAuth($pdo, $token, "write:follow"); + if($AuthData[0] === true){ + $userData = $AuthData[2]; //本文取得 if(!(empty($_GET['userid']))){ $unfollow_userid = safetext($_GET['userid']); @@ -100,7 +84,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { if(!(empty($Follow_userdata))){ if(!($userid == $Follow_userdata['userid'])){ - $res = follow_user($pdo, $Follow_userdata['userid'], $userid); + $res = unfollow_user($pdo, $Follow_userdata['userid'], $userid); if($res === true){ //フォロー完了 $response = array( @@ -112,6 +96,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "could_not_complete"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); } @@ -119,6 +104,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "you_cant_it_to_yourself"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -127,6 +113,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "critical_error_userdata_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; @@ -135,18 +122,27 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) { $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); exit; } + }else{ + $err = $AuthData[1]; + $response = array( + 'error_code' => $err, + 'success' => false + ); + echo json_encode($response, JSON_UNESCAPED_UNICODE); } } }else{ $err = "input_not_found"; $response = array( 'error_code' => $err, + 'success' => false ); echo json_encode($response, JSON_UNESCAPED_UNICODE); diff --git a/api/v1/instance.php b/api/v1/instance.php index 697c0a2..f009138 100644 --- a/api/v1/instance.php +++ b/api/v1/instance.php @@ -1,28 +1,28 @@ verifyCode($tousercode, $userauthcode, $discrepancy); if ($checkResult) { - $pdo->beginTransaction(); - try { - $touserid = $userid; - $datetime = date("Y-m-d H:i:s"); - $msg = "アカウントにログインがありました。\nもしログインした覚えがない場合は「その他」よりセッショントークンを再生成し、パスワードを変更し、二段階認証を再設定してください。\n\nログインした端末 : ".$device; - $title = '🚪ログイン通知🚪'; - $url = '/settings'; - $userchk = 'none'; - // 通知用SQL作成 - $stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title)"); - - $stmt->bindParam(':fromuserid', safetext("uwuzu-fromsys"), PDO::PARAM_STR); - $stmt->bindParam(':touserid', safetext($touserid), PDO::PARAM_STR); - $stmt->bindParam(':msg', safetext($msg), PDO::PARAM_STR); - $stmt->bindParam(':url', safetext($url), PDO::PARAM_STR); - $stmt->bindParam(':userchk', safetext($userchk), PDO::PARAM_STR); - $stmt->bindParam(':title', safetext($title), PDO::PARAM_STR); - - $stmt->bindParam(':datetime', safetext($datetime), PDO::PARAM_STR); - - // SQLクエリの実行 - $res = $stmt->execute(); - - // コミット - $res = $pdo->commit(); - - } catch(Exception $e) { - - // エラーが発生した時はロールバック - $pdo->rollBack(); - } + $msg = "アカウントにログインがありました。\nもしログインした覚えがない場合は「その他」よりセッショントークンを再生成し、パスワードを変更し、二段階認証を再設定してください。\n\nログインした端末 : ".$device; + send_notification($userid,"uwuzu-fromsys","🚪ログイン通知🚪",$msg,"/settings", "login"); clearstatcache(); diff --git a/bookmark/bookmark.php b/bookmark/bookmark.php index 4f8e7f8..394df64 100644 --- a/bookmark/bookmark.php +++ b/bookmark/bookmark.php @@ -43,8 +43,6 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && sa if($result2["loginid"] === $loginid){ try { - $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS); - // Bookmark情報を取得 $stmt = $pdo->prepare("SELECT bookmark FROM account WHERE userid = :userid"); $stmt->bindValue(':userid', $userId, PDO::PARAM_STR); @@ -52,33 +50,41 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && sa $post = $stmt->fetch(PDO::FETCH_ASSOC); if ($post) { - $bookmarkList = explode(',', $post['bookmark']); - $index = array_search($postUniqid, $bookmarkList); + // ユーズ情報を取得 + $ueusestmt = $pdo->prepare("SELECT uniqid FROM ueuse WHERE uniqid = :uniqid LIMIT 1"); + $ueusestmt->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR); + $ueusestmt->execute(); + $ueuse = $ueusestmt->fetch(PDO::FETCH_ASSOC); + if(!(empty($ueuse))){ + $bookmarkList = explode(',', $post['bookmark']); + $index = array_search($postUniqid, $bookmarkList); - if ($index === false) { - // UniqIDを追加 - $bookmarkList[] = $postUniqid; + if ($index === false) { + // UniqIDを追加 + $bookmarkList[] = $postUniqid; + } else { + // UniqIDを削除 + array_splice($bookmarkList, $index, 1); + } + + // 新しいいいね情報を更新 + $newbookmark = implode(',', $bookmarkList); + $updateQuery = $pdo->prepare("UPDATE account SET bookmark = :bookmark WHERE userid = :userid"); + $updateQuery->bindValue(':bookmark', $newbookmark, PDO::PARAM_STR); + $updateQuery->bindValue(':userid', $userId, PDO::PARAM_STR); + $res = $updateQuery->execute(); + + if ($res) { + echo json_encode(['success' => true, 'newbookmark' => 'success']); + exit; + } else { + echo json_encode(['success' => false, 'error' => 'ブックマークの更新に失敗しました。']); + exit; + } } else { - // UniqIDを削除 - array_splice($bookmarkList, $index, 1); - } - - // 新しいいいね情報を更新 - $newbookmark = implode(',', $bookmarkList); - $updateQuery = $pdo->prepare("UPDATE account SET bookmark = :bookmark WHERE userid = :userid"); - $updateQuery->bindValue(':bookmark', $newbookmark, PDO::PARAM_STR); - $updateQuery->bindValue(':userid', $userId, PDO::PARAM_STR); - $res = $updateQuery->execute(); - - if ($res) { - echo json_encode(['success' => true, 'newbookmark' => 'success']); - exit; - } else { - echo json_encode(['success' => false, 'error' => 'ブックマークの更新に失敗しました。']); + echo json_encode(['success' => false, 'error' => 'ユーズが見つかりません。']); exit; } - - } else { echo json_encode(['success' => false, 'error' => 'アカウントが見つかりません。']); exit; diff --git a/check.php b/check.php index 0847445..471f6e3 100644 --- a/check.php +++ b/check.php @@ -79,37 +79,8 @@ if( !empty($_POST['btn_submit']) ) { $useragent = safetext($_SERVER['HTTP_USER_AGENT']); $device = UserAgent_to_Device($useragent); - $pdo->beginTransaction(); - try { - $touserid = $userid; - $datetime = date("Y-m-d H:i:s"); - $msg = "アカウントにログインがありました。\nもしログインした覚えがない場合は「その他」よりセッショントークンを再生成し、パスワードを変更してください。\n\nログインした端末 : ".$device; - $title = '🚪ログイン通知🚪'; - $url = '/settings'; - $userchk = 'none'; - // 通知用SQL作成 - $stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title)"); - - $stmt->bindParam(':fromuserid', safetext("uwuzu-fromsys"), PDO::PARAM_STR); - $stmt->bindParam(':touserid', safetext($touserid), PDO::PARAM_STR); - $stmt->bindParam(':msg', safetext($msg), PDO::PARAM_STR); - $stmt->bindParam(':url', safetext($url), PDO::PARAM_STR); - $stmt->bindParam(':userchk', safetext($userchk), PDO::PARAM_STR); - $stmt->bindParam(':title', safetext($title), PDO::PARAM_STR); - - $stmt->bindParam(':datetime', safetext($datetime), PDO::PARAM_STR); - - // SQLクエリの実行 - $res = $stmt->execute(); - - // コミット - $res = $pdo->commit(); - - } catch(Exception $e) { - - // エラーが発生した時はロールバック - $pdo->rollBack(); - } + $msg = "アカウントにログインがありました。\nもしログインした覚えがない場合は「その他」よりセッショントークンを再生成し、パスワードを変更してください。\n\nログインした端末 : ".$device; + send_notification($userid,"uwuzu-fromsys","🚪ログイン通知🚪",$msg,"/settings", "login"); clearstatcache(); @@ -222,14 +193,16 @@ $pdo = null;
;"> diff --git a/css/home.css b/css/home.css index 792d027..d0bca64 100644 --- a/css/home.css +++ b/css/home.css @@ -1,19 +1,32 @@ @import url("font.css"); @import url("color.css"); -::-webkit-scrollbar{ - display:none; +::-webkit-scrollbar { + display: none; } -::-webkit-scrollbar:hover{ - overflow: scroll; + +::-webkit-scrollbar:hover { + overflow: scroll; margin-right: 10px; border-radius: 25px; } + ::selection { color: var(--background-color); background: var(--main-color); } -body{ + +.flexbox{ + display: flex; + +} + +.btnbox{ + width: auto; + margin: 0px auto; +} + +body { width: 70%; display: flex; border: none; @@ -23,26 +36,26 @@ body{ margin-right: auto; padding-top: 12px; background-color: var(--background-color); - /* 画像を常に天地左右の中央に配置 */ + /* 画像を常に天地左右の中央に配置 */ background-position: center center; - + /* 画像をタイル状に繰り返し表示しない */ background-repeat: no-repeat; - + /* コンテンツの高さが画像の高さより大きい時、動かないように固定 */ background-attachment: fixed; - + /* 表示するコンテナの大きさに基づいて、背景画像を調整 */ background-size: cover; } @media screen and (max-width:1500px) { - body{ + body { width: 95%; } } -.irobutton{ +.irobutton { cursor: pointer; border: none; display: block; @@ -56,23 +69,25 @@ body{ text-align: center; border-radius: 50px; - color:var(--dark-text-color); + color: var(--dark-text-color); font-size: 18px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-in-out; } -.irobutton:hover{ + +.irobutton:hover { padding: 6px 22px; } -.irobutton:active{ + +.irobutton:active { background-color: color-mix(in srgb, var(--main-color) 90%, #000); padding: 6px 12px; } -.sirobutton{ +.sirobutton { cursor: pointer; border: none; display: block; @@ -91,14 +106,16 @@ body{ font-size: 18px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; transition: all 250ms ease-in-out; border: transparent 1px solid; } -.sirobutton:hover{ + +.sirobutton:hover { padding: 6px 22px; } -.sirobutton:active{ + +.sirobutton:active { padding: 6px 12px; } @@ -110,21 +127,23 @@ body{ border-radius: 10px; background: var(--background-color); font-family: var(--Head-fonts), sans-serif; - color: rgb(32,32,32); + color: rgb(32, 32, 32); font-size: 16px; line-height: 1.5; white-space: nowrap; - box-shadow:0px 0px 25px rgba(0,0,0,0.03); - overflow-x: scroll; - overflow-y : scroll ; + box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.03); + overflow-x: scroll; + overflow-y: scroll; transition: border 350ms ease-in-out; transition: border-bottom 150ms ease-out; border: 1px solid var(--border-color); } -textarea{ + +textarea { height: 200px; resize: vertical; } + .inbox::placeholder { color: var(--subtext-color); } @@ -141,31 +160,34 @@ textarea{ } -.errmsg{ +.errmsg { padding-top: 16px; padding-bottom: 16px; padding-left: 32px; padding-right: 32px; border-radius: 10px; background-color: color-mix(in srgb, var(--tl-color) 90%, var(--error)); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05) inset; margin: 12px; text-align: left; - color:var(--error); + color: var(--error); font-family: var(--Text-fonts), sans-serif; word-wrap: break-word; line-height: 20px; border: 1px solid var(--error); } +.justfit{ + margin: 16px 0px; +} -.flexbtn{ +.flexbtn { display: flex; } -.flexbtn .irobutton{ +.flexbtn .irobutton { border: none; display: block; - width:20%; + width: 20%; margin: 32px; padding: 8px 10%; margin-left: auto; @@ -177,28 +199,30 @@ textarea{ background-color: var(--main-color); border-radius: 50px; - color:var(--background-color); + color: var(--background-color); font-size: 26px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + text-decoration: none; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; } -.flexbtn.irobutton:hover{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:55%; -} -.flexbtn.irobutton:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); - width:45%; + +.flexbtn.irobutton:hover { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 55%; } -.flexbtn.sirobutton{ +.flexbtn.irobutton:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + width: 45%; +} + +.flexbtn.sirobutton { border: none; display: block; - width:50%; + width: 50%; margin: 32px; padding: 8px 10%; margin-left: auto; @@ -211,22 +235,24 @@ textarea{ background-color: var(--sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 26px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + text-decoration: none; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; } -.flexbtn.sirobutton:hover{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:55%; + +.flexbtn.sirobutton:hover { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 55%; } -.flexbtn.sirobutton:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); - width:45%; + +.flexbtn.sirobutton:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + width: 45%; } @@ -238,9 +264,9 @@ textarea{ border-radius: 25px; background-color: var(--background-color); border: 1px solid var(--main-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); } - + .rolebox p { margin: 2px 10px 2px 10px; font-size: 16px; @@ -255,11 +281,12 @@ textarea{ padding: auto; flex-wrap: wrap; } - + .shine { position: relative; overflow: hidden; } + .shine:after { content: ""; position: absolute; @@ -271,21 +298,25 @@ textarea{ transform: rotate(45deg); animation: reflect 3s ease-in-out infinite; } + @keyframes reflect { + 0%, 75% { - transform: rotate(45deg) scale(0); - opacity: 1; + transform: rotate(45deg) scale(0); + opacity: 1; } - + 100% { - transform: rotate(45deg) scale(100); - opacity: 0; + transform: rotate(45deg) scale(100); + opacity: 0; } } + .cyclingmark { display: flex; } + .cyclingmark p::before { content: ""; display: inline-block; @@ -293,66 +324,71 @@ textarea{ height: 16px; vertical-align: middle; margin-right: 5px; - background: url("/img/uwuzuicon.png") - no-repeat; + background: url("/img/uwuzuicon.png") no-repeat; background-size: contain; animation: cycling 2s infinite; margin: -6px 0px 0px -2px; } + @keyframes cycling { from { - animation-timing-function: ease-in-out; - transform: translate(0px, 0px) scale(1, 1) rotate(0deg) skew(0deg, 0deg); - opacity: 1; + animation-timing-function: ease-in-out; + transform: translate(0px, 0px) scale(1, 1) rotate(0deg) skew(0deg, 0deg); + opacity: 1; } - + to { - animation-timing-function: ease-in-out; - transform: translate(0px, 0px) scale(1, 1) rotate(360deg) skew(0deg, 0deg); - opacity: 1; + animation-timing-function: ease-in-out; + transform: translate(0px, 0px) scale(1, 1) rotate(360deg) skew(0deg, 0deg); + opacity: 1; } - + 25% { - animation-timing-function: ease-in-out; - transform: translate(0px, 0px) scale(1, 1) rotate(400deg) skew(0deg, 0deg); - opacity: 1; + animation-timing-function: ease-in-out; + transform: translate(0px, 0px) scale(1, 1) rotate(400deg) skew(0deg, 0deg); + opacity: 1; } - + 40% { - animation-timing-function: ease-in-out; - transform: translate(0px, 0px) scale(1, 1) rotate(330deg) skew(0deg, 0deg); - opacity: 1; + animation-timing-function: ease-in-out; + transform: translate(0px, 0px) scale(1, 1) rotate(330deg) skew(0deg, 0deg); + opacity: 1; } - + 60% { - animation-timing-function: ease-in-out; - transform: translate(0px, 0px) scale(1, 1) rotate(360deg) skew(0deg, 0deg); - opacity: 1; - } -} -.rainbow { - animation: rain 5s infinite; -} -@keyframes rain { - 0% { - border: 1px solid magenta; - color: magenta; - } - 33% { - border: 1px solid yellow; - color: yellow; - } - 66% { - border: 1px solid cyan; - color: cyan; - } - 100% { - border: 1px solid magenta; - color: magenta; + animation-timing-function: ease-in-out; + transform: translate(0px, 0px) scale(1, 1) rotate(360deg) skew(0deg, 0deg); + opacity: 1; } } -.userleftbox{ +.rainbow { + animation: rain 5s infinite; +} + +@keyframes rain { + 0% { + border: 1px solid magenta; + color: magenta; + } + + 33% { + border: 1px solid yellow; + color: yellow; + } + + 66% { + border: 1px solid cyan; + color: cyan; + } + + 100% { + border: 1px solid magenta; + color: magenta; + } +} + +.userleftbox { border-radius: 17px; margin-top: 12px; margin-left: 0px; @@ -364,27 +400,29 @@ textarea{ padding: 0px; } -.userleftbox h1{ +.userleftbox h1 { font-family: var(--Head-fonts), sans-serif; margin-left: 20px; - color:var(--background-color); + color: var(--background-color); font-size: 32px; } -.userleftbox .logo{ + +.userleftbox .logo { display: flex; } -.userleftbox .logo img{ +.userleftbox .logo img { margin-left: auto; margin-right: auto; margin-top: 16px; width: 72%; - + } -.userleftbox .logo p{ - color:var(--main-color); + +.userleftbox .logo p { + color: var(--main-color); font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 32px; @@ -393,12 +431,12 @@ textarea{ margin-bottom: -4px; } -.leftbutton{ +.leftbutton { cursor: pointer; border: none; display: flex; - width:80%; + width: 80%; margin: 8px; padding: 8px auto; margin-left: auto; @@ -411,27 +449,29 @@ textarea{ background-color: transparent; border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 20px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: left; align-items: center; transition: all 250ms ease-out; } -.leftbutton:hover{ + +.leftbutton:hover { background-color: var(--main-color); color: var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:85%; -} -.leftbutton:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); - width:78%; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 85%; } -.leftbutton .notipod{ +.leftbutton:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + width: 78%; +} + +.leftbutton .notipod { width: auto; height: 25px; margin-left: auto; @@ -444,29 +484,30 @@ textarea{ border-radius: 25px; transition: all 250ms ease-out; } -.leftbutton .notipod p{ + +.leftbutton .notipod p { margin-top: -1px; margin-bottom: 0px; margin-left: auto; margin-right: auto; - color:#FFF; + color: #FFF; font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } .leftbutton:hover .notipod { - background-color:#FFF; + background-color: #FFF; } -.leftbutton:hover .notipod p{ - color:#FF4444; +.leftbutton:hover .notipod p { + color: #FF4444; } -.leftbutton img{ +.leftbutton img { width: 32px; height: 32px; margin-left: 0px; @@ -476,7 +517,8 @@ textarea{ vertical-align: middle; background-color: #ffbc0d; } -.leftbutton:hover img{ + +.leftbutton:hover img { background-color: var(--background-color); } @@ -492,7 +534,7 @@ svg { } -main{ +main { position: relative; height: 95dvh; overflow: auto; @@ -502,54 +544,54 @@ main{ margin-right: 12px; width: 60%; background-color: var(--tl-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .025); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .025); border: 1px solid var(--border-color); } -main h1{ - color:var(--text-color); +main h1 { + color: var(--text-color); font-size: 32px; font-family: var(--Head-fonts), sans-serif; } -.userheader{ +.userheader { margin: 12px; border-radius: 10px; width: auto; - height:auto; + height: auto; margin-bottom: 12px; overflow-wrap: break-all; } -.userheader .hed img{ +.userheader .hed img { object-fit: cover; margin-top: 0px; margin-bottom: 0px; margin-left: auto; margin-right: auto; width: 100%; - height:25vh; + height: 25vh; border-radius: 10px; } -.userheader .icon{ +.userheader .icon { margin-left: 24px; margin-right: 24px; display: flex; width: auto; } -.userheader .icon img{ +.userheader .icon img { object-fit: cover; margin-top: -90px; text-align: left; width: 148px; - height:148px; + height: 148px; border-radius: 50%; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); } -.userheader .icon h2 img{ +.userheader .icon h2 img { margin-top: 0px; margin-bottom: 0px; margin-left: 4px; @@ -560,18 +602,18 @@ main h1{ border-radius: 0px; } -.userheader h2{ +.userheader h2 { word-wrap: break-word; margin-left: 12px; margin-top: auto; margin-bottom: 12px; - color:var(--text-color); + color: var(--text-color); font-size: 32px; font-family: var(--Text-fonts), sans-serif; font-weight: 900; } -.userheader p{ +.userheader p { word-wrap: break-word; margin-left: 12px; margin-right: auto; @@ -583,7 +625,7 @@ main h1{ font-weight: 900; } -.userheader span{ +.userheader span { word-wrap: break-word; margin-left: 0px; margin-right: auto; @@ -595,12 +637,12 @@ main h1{ font-weight: 900; } -.userheader .profile{ +.userheader .profile { max-height: 25dvh; overflow: scroll; } -.userheader .profile p{ +.userheader .profile p { text-align: left; margin-top: 12px; margin-bottom: auto; @@ -608,12 +650,13 @@ main h1{ margin-right: 24px; word-wrap: break-word; font-size: 18px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.userheader .profile p img{ + +.userheader .profile p img { vertical-align: middle; margin-top: auto; margin-bottom: auto; @@ -621,26 +664,27 @@ main h1{ margin-right: 4px; height: 28px; } -.userheader .profile p a{ + +.userheader .profile p a { margin-top: auto; margin-bottom: auto; margin-left: auto; font-size: 16px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.userheader .roleboxes{ +.userheader .roleboxes { margin-left: 180px; display: flex; padding: 0px; - flex-wrap : wrap; + flex-wrap: wrap; } -.userheader .rolebox{ +.userheader .rolebox { margin: 4px 6px 4px 6px; width: auto; padding-left: auto; @@ -648,13 +692,13 @@ main h1{ border-radius: 25px; background-color: var(--background-color); border: 1px solid var(--main-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); } -.userheader .rolebox p{ +.userheader .rolebox p { - color:var(--main-color); + color: var(--main-color); margin-top: 2px; margin-bottom: 2px; margin-left: 10px; @@ -666,20 +710,20 @@ main h1{ } -.userheader .profile .hashtags{ +.userheader .profile .hashtags { margin-top: auto; margin-bottom: auto; margin-left: 0px; margin-right: 0px; font-size: 16px; - color:var(--main-color); + color: var(--main-color); text-decoration: none; font-family: var(--Mono-fonts), sans-serif; font-weight: bold; } -.fzone{ +.fzone { margin-left: 24px; margin-right: 24px; margin-bottom: 24px; @@ -691,11 +735,11 @@ main h1{ padding-right: 12px; } -.fzone .follow .fbtn{ +.fzone .follow .fbtn { cursor: pointer; border: none; display: block; - width:120px; + width: 120px; padding: 8px auto; margin-left: auto; @@ -710,30 +754,32 @@ main h1{ background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + 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:hover{ + +.fzone .follow .fbtn:hover { background-color: var(--main-color); color: var(--sub-color); - width:125px; -} -.fzone .follow .fbtn:active{ - width:115px; + width: 125px; } -.fzone .follow .fbtn_no{ +.fzone .follow .fbtn:active { + width: 115px; +} + +.fzone .follow .fbtn_no { cursor: pointer; border: none; display: block; - width:120px; + width: 120px; height: 24px; padding: 8px auto; @@ -749,31 +795,33 @@ main h1{ background-color: var(--sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); border: 1px solid var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + 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_no:hover{ + +.fzone .follow .fbtn_no:hover { background-color: var(--sub-color); color: var(--main-color); - width:125px; -} -.fzone .follow .fbtn_no:active{ - width:115px; + width: 125px; } -.fzone .follow .fbtn_un{ +.fzone .follow .fbtn_no:active { + width: 115px; +} + +.fzone .follow .fbtn_un { cursor: pointer; border: none; display: block; - width:120px; + width: 120px; padding: 8px auto; margin-left: auto; @@ -788,34 +836,36 @@ main h1{ background-color: var(--sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); border: 1px solid var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + 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{ + +.fzone .follow .fbtn_un:hover { background-color: var(--sub-color); color: var(--text-color); - width:125px; + width: 125px; } -.fzone .follow .fbtn_un:active{ - width:115px; + +.fzone .follow .fbtn_un:active { + width: 115px; } -.fzone .follow .report{ +.fzone .follow .report { cursor: pointer; border: none; display: block; padding: 6px; - width:24px; + width: 24px; height: 24px; margin-left: auto; @@ -826,27 +876,30 @@ main h1{ background-color: var(--sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); border: 1px solid var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + 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 .report:hover{ + +.fzone .follow .report:hover { background-color: color-mix(in srgb, var(--tl-color) 90%, var(--error)); color: var(--error); border: 1px solid var(--error); - width:32px; + width: 32px; } -.fzone .follow .report:active{ - width:22px; + +.fzone .follow .report:active { + width: 22px; } -.fzone .follow .report svg{ + +.fzone .follow .report svg { width: 24px; height: 24px; margin-left: auto; @@ -856,35 +909,36 @@ main h1{ fill: currentColor; } -.fzone .time{ +.fzone .time { margin-top: auto; margin-bottom: 0px; margin-left: 0px; margin-right: auto; } -.fzone .time p{ + +.fzone .time p { margin-top: 0px; margin-bottom: 0px; margin-right: 32px; text-align: left; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } -.fzone .time a{ +.fzone .time a { margin-top: 0px; margin-bottom: 0px; text-align: left; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } -.fzone .follow_yes{ +.fzone .follow_yes { border: none; display: block; - width:auto; + width: auto; height: auto; margin-left: auto; @@ -896,9 +950,10 @@ main h1{ background-color: var(--sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); } -.fzone .follow_yes p{ + +.fzone .follow_yes p { overflow-wrap: break-word; margin: 0px; margin-top: auto; @@ -908,10 +963,11 @@ main h1{ font-size: 10px; font-family: 'BIZUD Gothic', sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; } -.select_utl{ + +.select_utl { margin: 0px; background-color: var(--tl-color); border: none; @@ -919,7 +975,8 @@ main h1{ text-align: center; display: flex; } -.select_utl .btn{ + +.select_utl .btn { display: block; width: 25%; line-height: 32px; @@ -939,52 +996,61 @@ main h1{ border: none; cursor: pointer; } -.select_utl .btmline{ + +.select_utl .btmline { color: var(--main-color); border-bottom: 1px solid var(--main-color); } -.ads{ +.ads { display: block; position: relative; animation: slideInY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; margin: 12px; border-radius: 10px; padding: 0px; - overflow:hidden; + overflow: hidden; background-color: var(--background-color); border: 1px solid var(--border-color); width: auto; } + @keyframes slideInY { 0% { - transform: translateY(24px); - opacity: 0; + transform: translateY(24px); + opacity: 0; } + 100% { - transform: translateY(0px); + transform: translateY(0px); } - 40%,100% { - opacity: 1; + + 40%, + 100% { + opacity: 1; } } -.ads a{ + +.ads a { margin: 0px; padding: 0px; } -.ads a img{ + +.ads a img { object-fit: cover; margin: 0px; width: 100%; height: auto; - vertical-align:top; + vertical-align: top; transition: all 0.5s ease; } -.ads a img:hover{ + +.ads a img:hover { cursor: pointer; filter: saturate(125%) brightness(110%); } -.ueuse{ + +.ueuse { animation: slideInY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; margin: 0px; border-radius: 0px; @@ -998,32 +1064,38 @@ main h1{ width: auto; overflow: hidden; } - + @keyframes slideInY { 0% { - transform: translateY(24px); - opacity: 0; + transform: translateY(24px); + opacity: 0; } + 100% { - transform: translateY(0px); + transform: translateY(0px); } - 40%,100% { - opacity: 1; + + 40%, + 100% { + opacity: 1; } } -.ueuse .flebox{ + +.ueuse .flebox { display: flex; flex-wrap: wrap; } -.ueuse .flebox img{ + +.ueuse .flebox img { object-fit: cover; margin-left: -12px; text-align: center; width: 48px; - height:48px; + height: 48px; border-radius: 50%; } + .ueuse .flebox a { flex-shrink: 0; margin-top: auto; @@ -1036,7 +1108,7 @@ main h1{ font-weight: bold; } -.ueuse .flebox a .u_name img{ +.ueuse .flebox a .u_name img { margin-top: 0px; margin-bottom: 0px; margin-left: 4px; @@ -1050,56 +1122,60 @@ main h1{ -.ueuse .flebox .idbox{ +.ueuse .flebox .idbox { margin-top: auto; margin-bottom: auto; margin-left: 6px; - border-radius: 10px; + border-radius: 16px; background-color: var(--background-color); border: 1px solid var(--border-color); } -.ueuse .flebox .idbox a{ + +.ueuse .flebox .idbox a { margin-top: 6px; margin-bottom: 6px; margin-left: 8px; margin-right: 8px; text-align: center; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; } -.ueuse .flebox .bot{ +.ueuse .flebox .bot { margin-top: auto; margin-bottom: auto; - padding: 6px 8px; + padding: 6px 8px; margin-left: 6px; - border-radius: 10px; - background-color: var(--sub-color); + border-radius: 16px; + background-color: var(--background-color); border: 1px solid var(--border-color); font-family: var(--Mono-fonts), sans-serif; font-weight: bold; text-align: center; font-size: 12px; - color:var(--main-color); + color: var(--subtext-color); } -.ueuse .content{ + +.ueuse .content { margin-left: 60px; } -.ueuse p{ - line-height:20px; - overflow-wrap: break-word; + +.ueuse p { + line-height: 20px; + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.ueuse .inline{ + +.ueuse .inline { width: fit-content; margin-left: 4px; margin-right: 4px; @@ -1117,7 +1193,7 @@ main h1{ vertical-align: top; } -.ueuse .codeblock{ +.ueuse .codeblock { width: calc(100% - 12px); margin-left: 0px; margin-right: 0px; @@ -1135,7 +1211,13 @@ main h1{ vertical-align: top; } -.ueuse .quote{ +.ueuse .codeblock code { + white-space: pre-wrap; + word-break: break-word; +} + + +.ueuse .quote { width: fit-content; border-left: 5px solid; border-radius: 5px; @@ -1145,13 +1227,13 @@ main h1{ padding-right: 6px; padding-top: 4px; padding-bottom: 4px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.ueuse .blur{ +.ueuse .blur { position: relative; background-color: #323232; width: fit-content; @@ -1161,16 +1243,25 @@ main h1{ padding-right: 2px; padding-top: 3px; padding-bottom: 3px; - color: #323232; + color: transparent; border-radius: 5px; transition: 0.5s; } -.ueuse .blur:hover{ + +.ueuse .blur:hover { background-color: var(--ueuse-color); color: var(--text-color); } -.ueuse .unixtime{ +.ueuse .blur * { + transition: 0.5s; + opacity: 0; +} +.ueuse .blur:hover * { + opacity: 1; +} + +.ueuse .unixtime { width: fit-content; margin-left: 4px; margin-right: 4px; @@ -1189,54 +1280,54 @@ main h1{ vertical-align: top; } -.ueuse h1{ - overflow-wrap: break-word; +.ueuse h1 { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 48px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse h2{ - overflow-wrap: break-word; +.ueuse h2 { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 32px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse h3{ - overflow-wrap: break-word; +.ueuse h3 { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 24px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse center{ - overflow-wrap: break-word; +.ueuse center { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: auto; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse .mta{ +.ueuse .mta { line-height: 30px; background-color: var(--sub-color); padding: 6px; @@ -1246,13 +1337,14 @@ main h1{ margin-left: 3px; margin-right: 3px; font-size: 14px; - color:var(--main-color); + color: var(--main-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; transition: all 250ms ease-out; } -.ueuse .mta img{ + +.ueuse .mta img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -1260,23 +1352,25 @@ main h1{ height: 14px; vertical-align: middle; } -.ueuse .mta:hover{ + +.ueuse .mta:hover { font-size: 14px; background-color: var(--main-color); - color:var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + color: var(--sub-color); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); } -.ueuse a{ +.ueuse a { margin-top: auto; margin-bottom: auto; font-size: 16px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse p img{ + +.ueuse p img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -1285,7 +1379,7 @@ main h1{ vertical-align: middle; } -.ueuse h1 img{ +.ueuse h1 img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -1294,7 +1388,7 @@ main h1{ vertical-align: middle; } -.ueuse h2 img{ +.ueuse h2 img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -1303,7 +1397,7 @@ main h1{ vertical-align: middle; } -.ueuse h3 img{ +.ueuse h3 img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -1312,7 +1406,7 @@ main h1{ vertical-align: middle; } -.ueuse img{ +.ueuse img { margin-left: 60px; margin-top: auto; margin-bottom: auto; @@ -1321,35 +1415,40 @@ main h1{ vertical-align: middle; } -.ueuse .flebox .time{ +.ueuse .flebox .time { margin-top: auto; margin-bottom: auto; margin-left: auto; margin-right: 12px; text-align: right; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } -.ueuse .photo1 a{ + +.ueuse .photo1 a { width: 48%; } -.ueuse .photo2 a{ + +.ueuse .photo2 a { width: 49%; } -.ueuse .photo3 a{ + +.ueuse .photo3 a { width: 49%; } -.ueuse .photo3_btm a{ + +.ueuse .photo3_btm a { width: 100%; margin-left: auto; margin-right: auto; } -.ueuse .photo4 a{ + +.ueuse .photo4 a { width: 49%; } -.ueuse .photo1 a img{ +.ueuse .photo1 a img { background: linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%), linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%); background-color: #FFF; background-size: 20px 20px; @@ -1365,12 +1464,12 @@ main h1{ cursor: pointer; } -.ueuse .photo2{ +.ueuse .photo2 { display: flex; justify-content: space-between; } -.ueuse .photo2 a img{ +.ueuse .photo2 a img { background: linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%), linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%); background-color: #FFF; background-size: 20px 20px; @@ -1386,16 +1485,18 @@ main h1{ cursor: pointer; } -.ueuse .photo3{ +.ueuse .photo3 { display: flex; justify-content: space-between; flex-wrap: wrap; } -.ueuse .photo3_btm{ + +.ueuse .photo3_btm { display: block; width: 100%; } -.ueuse .photo3 a img{ + +.ueuse .photo3 a img { background: linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%), linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%); background-color: #FFF; background-size: 20px 20px; @@ -1410,7 +1511,8 @@ main h1{ border: 1px solid var(--border-color); cursor: pointer; } -.ueuse .photo3_btm a img{ + +.ueuse .photo3_btm a img { background: linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%), linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%); background-color: #FFF; background-size: 20px 20px; @@ -1425,12 +1527,14 @@ main h1{ border: 1px solid var(--border-color); cursor: pointer; } -.ueuse .photo4{ + +.ueuse .photo4 { display: flex; flex-wrap: wrap; justify-content: space-between; } -.ueuse .photo4 a img{ + +.ueuse .photo4 a img { background: linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%), linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%); background-color: #FFF; background-size: 20px 20px; @@ -1445,7 +1549,8 @@ main h1{ border: 1px solid var(--border-color); cursor: pointer; } -.ueuse .video1 video{ + +.ueuse .video1 video { object-fit: cover; border-radius: 10px; margin-top: 12px; @@ -1455,12 +1560,14 @@ main h1{ height: 350px; border: 1px solid var(--border-color); } -.ueuse .youtube_and_nicovideo_player{ + +.ueuse .youtube_and_nicovideo_player { margin-top: 12px; width: 100%; height: fit-content; } -.ueuse .youtube_and_nicovideo_player iframe{ + +.ueuse .youtube_and_nicovideo_player iframe { border: none; width: 100%; aspect-ratio: 16 / 9; @@ -1468,8 +1575,8 @@ main h1{ border: 1px solid var(--border-color); } -.ueuse .abi{ - margin-left:auto; +.ueuse .abi { + margin-left: auto; margin-right: auto; margin-top: 12px; margin-bottom: 12px; @@ -1484,20 +1591,20 @@ main h1{ } -.ueuse .abi p{ - line-height:20px; - overflow-wrap: break-word; +.ueuse .abi p { + line-height: 20px; + overflow-wrap: break-word; margin-top: 0px; margin-bottom: 0px; margin-left: auto; font-size: 14px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.ueuse .abi .back{ +.ueuse .abi .back { background-color: var(--sub-color); padding: 12px; border-radius: 7px; @@ -1505,18 +1612,19 @@ main h1{ margin-bottom: 12px; } -.ueuse .abi .back h1{ - overflow-wrap: break-word; +.ueuse .abi .back h1 { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: auto; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse .abi .back h1 img{ + +.ueuse .abi .back h1 img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -1525,7 +1633,7 @@ main h1{ vertical-align: middle; } -.ueuse .abi h1{ +.ueuse .abi h1 { overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; @@ -1536,7 +1644,8 @@ main h1{ font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse .abi h2{ + +.ueuse .abi h2 { overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; @@ -1547,7 +1656,8 @@ main h1{ font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse .abi h3{ + +.ueuse .abi h3 { overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; @@ -1558,27 +1668,30 @@ main h1{ font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse .abi .h3s{ - overflow-wrap: break-word; + +.ueuse .abi .h3s { + overflow-wrap: break-word; margin-top: 12px; margin-bottom: auto; margin-left: auto; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse .favbox{ + +.ueuse .favbox { display: flex; margin-left: 0px; width: 100%; } -.ueuse .favbox .favbtn{ + +.ueuse .favbox .favbtn { cursor: pointer; border: none; display: block; - width:auto; + width: auto; padding: 8px auto; margin-left: 0px; @@ -1595,38 +1708,41 @@ main h1{ background-color: transparent; border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } -.ueuse .favbox .favbtn:hover{ + +.ueuse .favbox .favbtn:hover { cursor: pointer; border: none; display: block; - width:auto; + width: auto; background-color: var(--main-color); border-radius: 50px; - color: var(--sub-color);; + color: var(--sub-color); + ; font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.ueuse .favbox .favbtn_after{ + +.ueuse .favbox .favbtn_after { cursor: pointer; border: none; display: block; - width:auto; + width: auto; padding: 8px auto; margin-left: 0px; @@ -1644,14 +1760,15 @@ main h1{ background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out } + .ueuse .favbox .favbtn svg { margin-top: -4px; margin-right: 4px; @@ -1660,6 +1777,7 @@ main h1{ fill: currentColor; transition: all 250ms ease-out; } + .ueuse .favbox .favbtn_after svg { margin-top: -4px; margin-right: 4px; @@ -1670,11 +1788,11 @@ main h1{ } -.ueuse .favbox .tuduki{ +.ueuse .favbox .tuduki { cursor: pointer; border: none; display: block; - width:auto; + width: auto; margin-left: 0px; margin-right: 12px; @@ -1691,19 +1809,20 @@ main h1{ background-color: transparent; border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } -.ueuse .favbox .tuduki:hover{ + +.ueuse .favbox .tuduki:hover { cursor: pointer; border: none; display: block; - width:auto; + width: auto; margin-left: 0px; margin-right: 12px; margin-top: 2px; @@ -1716,26 +1835,27 @@ main h1{ background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } + .ueuse .favbox .tuduki svg { fill: currentColor; transition: all 250ms ease-out; } -.ueuse .favbox .reuse{ +.ueuse .favbox .reuse { cursor: pointer; border: none; display: block; - width:auto; + width: auto; margin-left: 0px; margin-right: 12px; @@ -1751,38 +1871,40 @@ main h1{ background-color: transparent; border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } -.ueuse .favbox .reuse:hover{ +.ueuse .favbox .reuse:hover { background-color: var(--main-color); - color:var(--sub-color); + color: var(--sub-color); font-family: var(--Head-fonts), sans-serif; transition: all 250ms ease-out; } + .ueuse .favbox .reuse svg { width: 24px; height: 26px; fill: currentColor; transition: all 250ms ease-out; } -.ueuse .favbox .reuse_after{ + +.ueuse .favbox .reuse_after { background-color: var(--main-color); - color:var(--sub-color); + color: var(--sub-color); transition: all 250ms ease-out } -.ueuse .favbox .delbtn{ +.ueuse .favbox .delbtn { cursor: pointer; border: none; display: block; - width:fit-content; + width: fit-content; padding: 2px 8px; margin-left: 6px; @@ -1801,7 +1923,7 @@ main h1{ transition: all 250ms ease-out; } -.ueuse .favbox .delbtn:hover{ +.ueuse .favbox .delbtn:hover { cursor: pointer; border: none; display: block; @@ -1813,10 +1935,11 @@ main h1{ font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } + .ueuse .favbox .delbtn svg { margin-top: -6px; margin-right: 0px; @@ -1826,11 +1949,11 @@ main h1{ transition: all 250ms ease-out; } -.ueuse .favbox .etcbtn{ +.ueuse .favbox .etcbtn { cursor: pointer; border: none; display: block; - width:fit-content; + width: fit-content; padding: 2px 8px; margin-left: 6px; @@ -1849,12 +1972,13 @@ main h1{ transition: all 250ms ease-out; } -.ueuse .favbox .etcbtn:hover{ +.ueuse .favbox .etcbtn:hover { background-color: var(--main-color); color: var(--sub-color); font-family: var(--Head-fonts), sans-serif; transition: all 250ms ease-out; } + .ueuse .favbox .etcbtn svg { margin-top: -12px; margin-right: 0px; @@ -1865,11 +1989,11 @@ main h1{ } -.ueuse .favbox .addabi{ +.ueuse .favbox .addabi { cursor: pointer; border: none; display: block; - width:auto; + width: auto; padding: 8px auto; margin-left: 6px; @@ -1887,22 +2011,22 @@ main h1{ background-color: transparent; border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.ueuse .favbox .addabi:hover{ +.ueuse .favbox .addabi:hover { cursor: pointer; border: none; display: block; - width:auto; + width: auto; margin-left: 6px; margin-right: 6px; @@ -1918,16 +2042,18 @@ main h1{ background-color: var(--main-color); border-radius: 50px; - color: var(--sub-color);; + color: var(--sub-color); + ; font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } + .ueuse .favbox .addabi svg { margin-top: -12px; margin-right: 0px; @@ -1937,11 +2063,11 @@ main h1{ transition: all 250ms ease-out; } -.ueuse .favbox .share{ +.ueuse .favbox .share { cursor: pointer; border: none; display: block; - width:auto; + width: auto; padding: 8px auto; margin-left: auto; @@ -1959,21 +2085,22 @@ main h1{ background-color: var(--sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.ueuse .favbox .share:hover{ + +.ueuse .favbox .share:hover { cursor: pointer; border: none; display: block; - width:auto; + width: auto; margin-left: auto; margin-right: 6px; @@ -1989,16 +2116,18 @@ main h1{ background-color: var(--main-color); border-radius: 50px; - color: var(--sub-color);; + color: var(--sub-color); + ; font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } + .ueuse .favbox .share svg { margin-top: -6px; margin-right: 0px; @@ -2009,11 +2138,11 @@ main h1{ transition: all 250ms ease-out; } -.ueuse .favbox .bookmark{ +.ueuse .favbox .bookmark { cursor: pointer; border: none; display: block; - width:auto; + width: auto; padding: 8px auto; margin-left: auto; @@ -2031,38 +2160,42 @@ main h1{ background-color: transparent; border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.ueuse .favbox .bookmark:hover{ + +.ueuse .favbox .bookmark:hover { cursor: pointer; border: none; display: block; - width:auto; + width: auto; background-color: var(--main-color); border-radius: 50px; - color: var(--sub-color);; + color: var(--sub-color); + ; font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.ueuse .favbox .bookmark_after{ + +.ueuse .favbox .bookmark_after { background-color: var(--main-color); - color: var(--sub-color);; + color: var(--sub-color); + ; } .ueuse .favbox .bookmark svg { @@ -2075,12 +2208,12 @@ main h1{ transition: all 250ms ease-out; } -.ueuse .favbox img{ +.ueuse .favbox img { margin-left: 0px; width: 24px; } -.ueuse hr{ +.ueuse hr { height: 0; margin-top: 12px; margin-bottom: 12px; @@ -2088,18 +2221,20 @@ main h1{ border: 0; border-top: 1px solid var(--subtext-color); } -.ueuse .hashtags{ + +.ueuse .hashtags { margin-top: auto; margin-bottom: auto; margin-left: 0px; margin-right: 0px; font-size: 16px; - color:var(--main-color); + color: var(--main-color); text-decoration: none; font-family: var(--Mono-fonts), sans-serif; font-weight: normal; } -.ueuse .nsfw{ + +.ueuse .nsfw { display: flex; overflow: hidden; margin-top: 12px; @@ -2109,52 +2244,60 @@ main h1{ padding: 12px; border-radius: 10px; } -.ueuse .nsfw .btnzone{ + +.ueuse .nsfw .btnzone { display: block; margin-left: auto; margin-top: auto; margin-right: 0px; margin-bottom: -6px; } -.ueuse .nsfw p{ + +.ueuse .nsfw p { margin-left: 0px; } -.ueuse .nsfw_main{ + +.ueuse .nsfw_main { border: 1px solid var(--border-color); overflow: hidden; border-radius: 10px; } -.ueuse .nsfw_main .block{ + +.ueuse .nsfw_main .block { filter: brightness(70%) blur(32px) saturate(70%); pointer-events: none; } -.ueuse .nsfw_main .clear{ + +.ueuse .nsfw_main .clear { filter: brightness(100%) blur(0px) saturate(100%); } -.ueuse .profilebox{ +.ueuse .profilebox { max-height: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.ueuse .profilebox p{ - line-height:20px; - overflow-wrap: break-word; + +.ueuse .profilebox p { + line-height: 20px; + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 24px; margin-right: 24px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse .headbox a{ + +.ueuse .headbox a { margin: 0px; } -.ueuse .headbox img{ + +.ueuse .headbox img { overflow: hidden; object-fit: cover; margin-left: 0px; @@ -2165,20 +2308,23 @@ main h1{ height: 74px; border-radius: 7px; } -.ueuse .flebox .user{ + +.ueuse .flebox .user { margin-bottom: 12px; display: flex; flex-wrap: wrap; } -.ueuse .flebox .user img{ + +.ueuse .flebox .user img { object-fit: cover; margin-top: -54px; margin-left: 12px; text-align: center; width: 74px; - height:74px; + height: 74px; border-radius: 50%; } + .ueuse .flebox .user a { flex-shrink: 0; margin-top: auto; @@ -2190,29 +2336,32 @@ main h1{ font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse .flebox .user .idbox{ + +.ueuse .flebox .user .idbox { margin-top: auto; margin-bottom: auto; margin-left: 6px; - border-radius: 10px; + border-radius: 16px; background-color: var(--background-color); border: 1px solid var(--border-color); } -.ueuse .flebox .user .idbox a{ + +.ueuse .flebox .user .idbox a { margin-top: 6px; margin-bottom: 6px; margin-left: 8px; margin-right: 8px; text-align: center; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; } -.ueuse .flebox .user .bot{ + +.ueuse .flebox .user .bot { margin-top: auto; margin-bottom: auto; - padding: 6px 8px; + padding: 6px 8px; margin-left: 6px; border-radius: 10px; background-color: var(--sub-color); @@ -2221,9 +2370,10 @@ main h1{ font-weight: bold; text-align: center; font-size: 12px; - color:var(--main-color); + color: var(--main-color); } -.ueuse .flebox .user .u_name a img{ + +.ueuse .flebox .user .u_name a img { margin-top: 0px; margin-bottom: 0px; margin-left: 4px; @@ -2233,8 +2383,9 @@ main h1{ vertical-align: text-top; border-radius: 0px; } -.ueuse .reuse_box{ - margin-left:auto; + +.ueuse .reuse_box { + margin-left: auto; margin-right: auto; margin-top: 12px; margin-bottom: 12px; @@ -2244,20 +2395,23 @@ main h1{ border: 1px solid var(--border-color); width: auto; } -.ueuse .reuse_box .reuse_flebox{ + +.ueuse .reuse_box .reuse_flebox { display: flex; flex-wrap: wrap; margin-bottom: 12px; } -.ueuse .reuse_box .reuse_flebox img{ + +.ueuse .reuse_box .reuse_flebox img { object-fit: cover; margin-left: -6px; text-align: center; width: 32px; - height:32px; + height: 32px; border-radius: 50%; } + .ueuse .reuse_box .reuse_flebox a { flex-shrink: 0; margin-top: auto; @@ -2266,7 +2420,8 @@ main h1{ font-size: 16px; color: var(--text-color); } -.ueuse .reuse_box .reuse_flebox a .u_name img{ + +.ueuse .reuse_box .reuse_flebox a .u_name img { margin-top: 0px; margin-bottom: 0px; margin-left: 4px; @@ -2276,7 +2431,8 @@ main h1{ vertical-align: text-top; border-radius: 0px; } -.ueuse .reuse_box .reuse_flebox .idbox{ + +.ueuse .reuse_box .reuse_flebox .idbox { margin-top: auto; margin-bottom: auto; margin-left: 6px; @@ -2284,7 +2440,8 @@ main h1{ background-color: var(--background-color); border: 1px solid var(--border-color); } -.ueuse .reuse_box .reuse_flebox .idbox a{ + +.ueuse .reuse_box .reuse_flebox .idbox a { margin-top: 3px; margin-bottom: 3px; margin-left: 4px; @@ -2292,12 +2449,13 @@ main h1{ text-align: center; font-size: 12px; text-decoration: none; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } -.ueuse .reuse_box p{ - line-height:20px; - overflow-wrap: break-word; + +.ueuse .reuse_box p { + line-height: 20px; + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; @@ -2306,53 +2464,62 @@ main h1{ font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.ueuse .reuse_box h1{ + +.ueuse .reuse_box h1 { margin-left: 0px; font-size: 32px; } -.ueuse .reuse_box h2{ + +.ueuse .reuse_box h2 { margin-left: 0px; font-size: 26px; } -.ueuse .reuse_box h3{ + +.ueuse .reuse_box h3 { margin-left: 0px; font-size: 20px; } -.ueuse .reuse_box h1 img{ + +.ueuse .reuse_box h1 img { height: 48px; } -.ueuse .reuse_box h2 img{ + +.ueuse .reuse_box h2 img { height: 32px; } -.ueuse .reuse_box h3 img{ + +.ueuse .reuse_box h3 img { height: 24px; } -.ueuse .reuse_box img{ + +.ueuse .reuse_box img { height: 24px; } -.ueuse .reuse_box .nsfw{ + +.ueuse .reuse_box .nsfw { margin-top: 0px; margin-bottom: 12px; border: 1px solid var(--border-color); background-color: var(--tl-color); border-radius: 6px; } -.ueuse .reuse_box .nsfw_main{ + +.ueuse .reuse_box .nsfw_main { border-radius: 6px; } -.tokonone p{ +.tokonone p { text-align: center; margin-top: 64px; margin-bottom: 64px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.send_progress{ +.send_progress { display: none; width: 100%; height: 2px; @@ -2361,24 +2528,28 @@ main h1{ box-shadow: 0 -1px 0 var(--border-color); animation: progressView 250ms ease-out 1 forwards; } -.send_progress .per{ + +.send_progress .per { width: 0px; margin: 0px; height: 2px; background-color: var(--main-color); transition: width 500ms ease-in; } + @keyframes progressView { 0% { height: 0px; opacity: 0; } + 100% { height: 2px; opacity: 1; } } -.sendbox{ + +.sendbox { margin: 0px; border-radius: 0px; padding-left: 24px; @@ -2391,39 +2562,39 @@ main h1{ width: auto; } -.sendbox .fx{ +.sendbox .fx { display: flex; width: 100%; } -.sendbox .fx img{ +.sendbox .fx img { object-fit: cover; margin-left: -12px; text-align: center; width: 58px; - height:58px; + height: 58px; border-radius: 50%; } -.sendbox p{ - line-height:20px; +.sendbox p { + line-height: 20px; text-align: left; margin-top: 12px; margin-bottom: 12px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.sendbox textarea{ +.sendbox textarea { background-color: var(--ueuse-color); text-align: left; margin-left: auto; margin-right: auto; - width:100%; - height:90px; + width: 100%; + height: 90px; border-radius: 10px; outline: none; border: none; @@ -2433,23 +2604,24 @@ main h1{ font-weight: normal; } -.sendbox .fxbox{ +.sendbox .fxbox { display: flex; flex-wrap: wrap; } -.sendbox label > input { - display:none; /* アップロードボタンのスタイルを無効にする */ +.sendbox label>input { + display: none; + /* アップロードボタンのスタイルを無効にする */ } -.sendbox label{ +.sendbox label { cursor: pointer; border: none; display: block; width: 24px; height: 24px; padding: 6px 6px; - + margin-left: 0px; margin-right: 12px; @@ -2460,45 +2632,50 @@ main h1{ background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); } -.sendbox label:hover{ + +.sendbox label:hover { background-color: var(--main-color); color: var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); } -.sendbox label:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + +.sendbox label:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); } -.sendbox .label_set{ + +.sendbox .label_set { background-color: var(--sub-color); color: var(--main-color); border: 1px solid var(--main-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .0); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .0); } -.sendbox label svg{ + +.sendbox label svg { margin: auto; fill: currentColor; - vertical-align:top; + vertical-align: top; width: 24px; height: 24px; } -.sendbox .fxbox p{ - line-height:20px; + +.sendbox .fxbox p { + line-height: 20px; text-align: left; margin-top: auto; margin-bottom: auto; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; @@ -2513,16 +2690,17 @@ main h1{ opacity: 0; cursor: pointer; transition: all 250ms ease-out; -} +} + .sendbox .fxbox .nsfw_label { cursor: pointer; border: none; display: block; - width:6%; + width: 6%; height: 24px; padding: 6px 6px; - + background-color: var(--main-color); width: auto; @@ -2532,24 +2710,27 @@ main h1{ border-radius: 50px; transition: all 250ms ease-out; } -.sendbox .fxbox .nsfw_input:checked + .nsfw_label { + +.sendbox .fxbox .nsfw_input:checked+.nsfw_label { background-color: var(--error); color: color-mix(in srgb, var(--tl-color) 90%, var(--error)); -} +} + .sendbox .fxbox .nsfw_button { position: relative; width: auto; height: auto; } -.sendbox .fxbox .nsfw_label svg{ + +.sendbox .fxbox .nsfw_label svg { margin: auto; fill: currentColor; - vertical-align:top; + vertical-align: top; width: 24px; height: 24px; } -.sendbox .fxbox .moji_cnt{ +.sendbox .fxbox .moji_cnt { margin-top: auto; margin-bottom: auto; margin-left: auto; @@ -2560,11 +2741,12 @@ main h1{ font-family: var(--Mono-fonts), sans-serif; font-weight: normal; } -.sendbox .fxbox .red{ + +.sendbox .fxbox .red { color: var(--error); } -.sendbox .emoji_picker{ +.sendbox .emoji_picker { animation: Up_to_down_slideY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; margin-left: auto; margin-right: auto; @@ -2582,7 +2764,8 @@ main h1{ overflow-x: hidden; overflow-y: scroll; } -.sendbox .emoji_picker p{ + +.sendbox .emoji_picker p { margin: 0px; word-wrap: break-word; line-height: 20px; @@ -2591,12 +2774,14 @@ main h1{ font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.sendbox .emoji_picker .emoji_picker_flex{ + +.sendbox .emoji_picker .emoji_picker_flex { display: flex; flex-wrap: wrap; justify-content: space-between; } -.sendbox .emoji_picker .emoji_picker_flex .one_emoji{ + +.sendbox .emoji_picker .emoji_picker_flex .one_emoji { cursor: pointer; margin: 6px; width: 64px; @@ -2605,36 +2790,43 @@ main h1{ border-radius: 8px; transition: all 250ms ease-out; } -.sendbox .emoji_picker .emoji_picker_flex .one_emoji img{ + +.sendbox .emoji_picker .emoji_picker_flex .one_emoji img { margin: 8px; width: 48px; height: 48px; - object-fit:contain; + object-fit: contain; } -.sendbox .emoji_picker .emoji_picker_flex .one_emoji:hover{ + +.sendbox .emoji_picker .emoji_picker_flex .one_emoji:hover { background-color: color-mix(in srgb, var(--tl-color) 95%, #000); } -.sendbox .emoji_picker .tokonone p{ + +.sendbox .emoji_picker .tokonone p { font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } + @keyframes Up_to_down_slideY { 0% { - transform: translateY(-12px); - opacity: 0; + transform: translateY(-12px); + opacity: 0; } + 100% { - transform: translateY(0px); + transform: translateY(0px); } - 40%,100% { - opacity: 1; + + 40%, + 100% { + opacity: 1; } } -.sendbox .harmful_notice{ +.sendbox .harmful_notice { animation: Up_to_down_slideY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; margin-left: auto; margin-right: auto; @@ -2649,7 +2841,8 @@ main h1{ overflow-x: hidden; overflow-y: scroll; } -.sendbox .harmful_notice p{ + +.sendbox .harmful_notice p { margin: 0px; word-wrap: break-word; line-height: 16px; @@ -2659,11 +2852,11 @@ main h1{ font-weight: normal; } -.ueusebtn{ +.ueusebtn { cursor: pointer; border: none; display: block; - width:20%; + width: 20%; padding: 8px auto; margin-left: 6px; margin-right: 0px; @@ -2675,34 +2868,38 @@ main h1{ background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.ueusebtn:hover{ + +.ueusebtn:hover { background-color: var(--main-color); color: var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:21%; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 21%; } -.ueusebtn:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .0); - width:19%; + +.ueusebtn:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .0); + width: 19%; } -.ueusebtn:disabled{ + +.ueusebtn:disabled { pointer-events: none; background-color: #CCC; color: #FFF; } + /*--------------------------*/ -.ueuse2{ +.ueuse2 { margin: 12px; border-radius: 10px; padding-left: 24px; @@ -2713,71 +2910,77 @@ main h1{ border: 1px solid var(--border-color); width: auto; } -.ueuse2 .flebox{ + +.ueuse2 .flebox { display: flex; } -.ueuse2 .flebox img{ + +.ueuse2 .flebox img { object-fit: cover; margin-left: -12px; text-align: center; width: 64px; - height:64px; + height: 64px; border-radius: 50%; } -.ueuse2 .flebox a{ + +.ueuse2 .flebox a { margin-top: auto; margin-bottom: auto; margin-left: 12px; font-size: 26px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse2 .flebox .idbox{ +.ueuse2 .flebox .idbox { margin-top: auto; margin-bottom: auto; margin-left: 6px; - border-radius: 10px; + border-radius: 16px; background-color: var(--background-color); border: 1px solid var(--border-color); } -.ueuse2 .flebox .idbox a{ + +.ueuse2 .flebox .idbox a { margin-top: 6px; margin-bottom: 6px; margin-left: 8px; margin-right: 8px; text-align: center; font-size: 16px; - color:var(--subtext-color); + color: var(--subtext-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; } -.ueuse2 p{ - overflow-wrap: break-word; +.ueuse2 p { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 80px; font-size: 22px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse2 a{ + +.ueuse2 a { margin-top: auto; margin-bottom: auto; margin-left: 6px; font-size: 16px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ueuse2 p img{ + +.ueuse2 p img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -2786,18 +2989,18 @@ main h1{ vertical-align: middle; } -.ueuse2 .flebox .time{ +.ueuse2 .flebox .time { margin-top: auto; margin-bottom: auto; margin-left: auto; margin-right: 12px; text-align: right; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } -.ueuse2 .photo1 img{ +.ueuse2 .photo1 img { object-fit: cover; border-radius: 10px; margin-top: 12px; @@ -2808,11 +3011,11 @@ main h1{ border: 1px solid var(--border-color); } -.ueuse2 .photo2{ +.ueuse2 .photo2 { display: flex; } -.ueuse2 .photo2 img{ +.ueuse2 .photo2 img { object-fit: cover; border-radius: 10px; margin-top: 12px; @@ -2823,7 +3026,7 @@ main h1{ border: 1px solid var(--border-color); } -.ueuse2 .video1 video{ +.ueuse2 .video1 video { object-fit: cover; border-radius: 10px; margin-top: 12px; @@ -2834,7 +3037,7 @@ main h1{ border: 1px solid var(--border-color); } -.formarea{ +.formarea { margin-bottom: 16px; padding-top: 16px; padding-bottom: 16px; @@ -2842,51 +3045,53 @@ main h1{ padding-right: 32px; border-radius: 15px; background-color: var(--tl-color); - box-shadow:none; + box-shadow: none; text-align: left; } -.formarea p{ +.formarea p { line-height: 20px; - overflow-wrap: break-word; + overflow-wrap: break-word; margin-top: 12px; margin-bottom: 12px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.formarea li{ + +.formarea li { line-height: 20px; - overflow-wrap: break-word; + overflow-wrap: break-word; margin-top: 12px; margin-bottom: 12px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.formarea .iconimg{ +.formarea .iconimg { margin-left: auto; margin-right: auto; text-align: center; } -.formarea .iconimg img{ +.formarea .iconimg img { object-fit: cover; margin-top: -64px; margin-left: auto; margin-right: auto; text-align: center; width: 100px; - height:100px; + height: 100px; border-radius: 50%; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); } -.formarea .hed img{ + +.formarea .hed img { object-fit: cover; object-fit: cover; margin-top: 0px; @@ -2894,25 +3099,25 @@ main h1{ margin-left: auto; margin-right: auto; width: 100%; - height:25vh; + height: 25vh; border-radius: 10px; } -.formarea .authzone{ +.formarea .authzone { width: 100%; margin-left: auto; margin-right: auto; text-align: center; } -.formarea .sub{ +.formarea .sub { display: flex; margin: 48px; margin-left: auto; margin-right: auto; } -.formarea .p2{ +.formarea .p2 { margin-top: 0px; margin-bottom: 10px; word-wrap: break-word; @@ -2923,7 +3128,7 @@ main h1{ font-weight: normal; } -.formarea .update_box{ +.formarea .update_box { margin: 12px 0px; border-radius: 10px; padding: 24px; @@ -2931,21 +3136,24 @@ main h1{ border: 1px solid var(--border-color); width: auto; } -.formarea .update_box h1{ + +.formarea .update_box h1 { margin: 0px 0px 12px 0px; text-align: left; font-size: 32px; - color:var(--text-color); + color: var(--text-color); font-family: var(--Text-fonts), sans-serif; } -.formarea .update_box h2{ + +.formarea .update_box h2 { margin: 12px 0px; text-align: left; font-size: 16px; - color:var(--text-color); + color: var(--text-color); font-family: var(--Mono-fonts), sans-serif; } -.formarea .update_box .update_text{ + +.formarea .update_box .update_text { margin: 12px 0px; border-radius: 6px; padding: 12px; @@ -2953,21 +3161,24 @@ main h1{ border: 1px solid var(--border-color); width: auto; } -.formarea .update_box .update_text p{ + +.formarea .update_box .update_text p { margin: 2px 0px; text-align: left; font-size: 16px; - color:var(--text-color); + color: var(--text-color); font-family: var(--Text-fonts), sans-serif; } -.formarea table{ + +.formarea table { width: 100%; text-align: left; font-size: 16px; - color:var(--text-color); + color: var(--text-color); font-family: var(--Mono-fonts), sans-serif; } -.formarea .emojipreview{ + +.formarea .emojipreview { margin-left: auto; margin-right: auto; width: 50%; @@ -2975,7 +3186,8 @@ main h1{ display: flex; justify-content: space-between; } -.formarea .emojiimg{ + +.formarea .emojiimg { margin-left: auto; margin-right: auto; text-align: center; @@ -2983,16 +3195,19 @@ main h1{ height: fit-content; padding: 8px; border-radius: 6px; - box-shadow:0 0px 24px 0 rgba(0, 0, 0, .1) + box-shadow: 0 0px 24px 0 rgba(0, 0, 0, .1) } -.formarea .light{ + +.formarea .light { background-color: var(--ueuse-color); } -.formarea .dark{ + +.formarea .dark { background-color: var(--dark-sub-color); } -.formarea .emojiimg img{ - vertical-align:top; + +.formarea .emojiimg img { + vertical-align: top; object-fit: cover; margin-left: auto; margin-right: auto; @@ -3002,7 +3217,7 @@ main h1{ border-radius: 0px; } -.p2{ +.p2 { margin-top: 0px; margin-bottom: 10px; word-wrap: break-word; @@ -3014,9 +3229,11 @@ main h1{ } label>input { - display:none; /* アップロードボタンのスタイルを無効にする */ + display: none; + /* アップロードボタンのスタイルを無効にする */ } -.imgbtn{ + +.imgbtn { cursor: pointer; border: none; display: block; @@ -3028,30 +3245,32 @@ label>input { background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.imgbtn:hover{ + +.imgbtn:hover { background-color: var(--main-color); color: var(--sub-color); padding: 4px 22px; } -.imgbtn:active{ + +.imgbtn:active { padding: 4px 12px; } -.imgbtn2{ +.imgbtn2 { cursor: pointer; border: none; display: block; - width:fit-content; + width: fit-content; padding: 4px 16px; margin-top: -64px; margin-left: 12px; @@ -3060,22 +3279,24 @@ label>input { background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.imgbtn2:hover{ + +.imgbtn2:hover { background-color: var(--main-color); color: var(--sub-color); padding: 4px 22px; } -.imgebtn2:active{ + +.imgebtn2:active { padding: 4px 12px; } @@ -3088,13 +3309,14 @@ label>input { height: 100%; background-color: rgba(0, 0, 0, 0.25); backdrop-filter: blur(5px); - z-index: 9999; + z-index: 10000; transition: all 250ms ease-out; } .show { display: block; } + .modal-content { background-color: var(--background-color); padding: 16px; @@ -3106,32 +3328,34 @@ label>input { left: 40%; right: 40%; transform: translate(-50%, -50%); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); overflow: scroll; } -.modal-content textarea{ +.modal-content textarea { background-color: var(--background-color); text-align: left; margin-left: auto; margin-right: auto; - width:100%; - height:90px; + width: 100%; + height: 90px; border-radius: 10px; outline: none; border: none; resize: none; font-size: 18px; } -.modal-content p{ + +.modal-content p { line-height: 20px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.modal-content p img{ + +.modal-content p img { margin-top: 0px; margin-bottom: 0px; margin-left: 4px; @@ -3142,14 +3366,15 @@ label>input { border-radius: 0px; } -.modal-content h1{ +.modal-content h1 { font-size: 24px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.modal-content h1 img{ + +.modal-content h1 img { margin-top: 0px; margin-bottom: 0px; margin-left: 4px; @@ -3160,18 +3385,18 @@ label>input { border-radius: 0px; } -.modal-content .btn_area{ +.modal-content .btn_area { display: flex; width: 70%; margin-left: auto; margin-right: 0px; } -.modal-content .fbtn{ +.modal-content .fbtn { cursor: pointer; border: none; display: block; - width:120px; + width: 120px; padding: 8px auto; margin-left: auto; @@ -3185,30 +3410,32 @@ label>input { background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.modal-content .fbtn:hover{ + +.modal-content .fbtn:hover { background-color: var(--main-color); color: var(--sub-color); - width:125px; -} -.modal-content .fbtn:active{ - width:115px; + width: 125px; } -.modal-content .fbtn_no{ +.modal-content .fbtn:active { + width: 115px; +} + +.modal-content .fbtn_no { cursor: pointer; border: none; display: block; - width:120px; + width: 120px; padding: 8px auto; margin-left: auto; @@ -3222,27 +3449,29 @@ label>input { background-color: var(--sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); border: 1px solid var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.modal-content .fbtn_no:hover{ + +.modal-content .fbtn_no:hover { background-color: var(--sub-color); color: var(--main-color); - width:125px; -} -.modal-content .fbtn_no:active{ - width:115px; + width: 125px; } -.modal-content .action_userlist{ +.modal-content .fbtn_no:active { + width: 115px; +} + +.modal-content .action_userlist { display: flex; width: auto; background-color: var(--ueuse-color); @@ -3253,29 +3482,31 @@ label>input { margin-bottom: 6px; } -.modal-content .action_userlist img{ +.modal-content .action_userlist img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; } -.modal-content .action_userlist .userabout{ +.modal-content .action_userlist .userabout { display: block; margin-left: 12px; margin-top: auto; margin-bottom: auto; } -.modal-content .action_userlist .userabout .username a{ + +.modal-content .action_userlist .userabout .username a { line-height: 20px; - overflow-wrap: break-word; + overflow-wrap: break-word; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.modal-content .action_userlist .userabout .username a img{ + +.modal-content .action_userlist .userabout .username a img { margin-top: 0px; margin-bottom: 0px; margin-left: 4px; @@ -3285,11 +3516,12 @@ label>input { vertical-align: text-top; border-radius: 0px; } -.modal-content .action_userlist .userabout .userid a{ + +.modal-content .action_userlist .userabout .userid a { line-height: 20px; - overflow-wrap: break-word; + overflow-wrap: break-word; font-size: 14px; - color:var(--subtext-color); + color: var(--subtext-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; @@ -3297,38 +3529,56 @@ label>input { .modal-content.slideUp { animation: SlideUp .3s ease-out forwards; - } +} + .modal-content.slideDown { animation: SlideDown .15s ease-in-out forwards; } + +.modal-content .scope_desc{ + margin-left: 8px; + line-height: 24px; + overflow-wrap: break-word; + font-size: 16px; + color: var(--text-color); + text-decoration: none; + font-family: var(--Text-fonts), sans-serif; + font-weight: normal; +} + /*下から上*/ @keyframes SlideUp { 0% { - opacity: 0; - transform: translateY(-1%); + opacity: 0; + transform: translateY(-1%); } + 100% { - opacity: 1; - transform: translateY(-20%); + opacity: 1; + transform: translateY(-20%); } } + /*上から下*/ @keyframes SlideDown { 0% { - opacity: 1; - transform: translateY(-20%); + opacity: 1; + transform: translateY(-20%); } + 100% { - opacity: 0; - transform: translateY(-1%); + opacity: 0; + transform: translateY(-1%); } } -.modal-content .modal-follow-area{ + +.modal-content .modal-follow-area { max-height: 220px; overflow: scroll; border-radius: 10px; margin-bottom: 16px; } + .Image_modal { display: none; position: fixed; @@ -3341,6 +3591,7 @@ label>input { z-index: 9999; transition: all 250ms ease-out; } + .Image_modal .modal-content { padding: 0px; border-radius: 15px; @@ -3354,31 +3605,32 @@ label>input { bottom: 0; left: 0; margin: auto; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); overflow: hidden; cursor: zoom-out; } -.Image_modal .modal-content img{ + +.Image_modal .modal-content img { background: linear-gradient(45deg, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%), - 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; width: 100%; height: 80dvh; margin: 0px; - vertical-align:top; + vertical-align: top; object-fit: contain; } .topbox { position: fixed; - + top: 0; left: 0; width: 100%; height: 47px; - + background-color: var(--main-color); font-family: var(--Text-fonts), sans-serif; font-weight: bold; @@ -3387,20 +3639,23 @@ label>input { color: var(--background-color); border-bottom: 1px solid color-mix(in srgb, var(--main-color) 95%, #000); } -.topbox .logo{ + +.topbox .logo { width: 1080px; max-width: 95%; margin: 0px auto; } -.topbox .logo img{ + +.topbox .logo img { margin-left: 0px; margin-right: auto; - margin-top: 0px; - height: 47px; + margin-top: 4px; + height: 39px; + margin-bottom: 4px; } -.terms{ - overflow-wrap: break-word; +.terms { + overflow-wrap: break-word; margin-left: auto; margin-right: auto; width: calc(1080px - 64px); @@ -3412,8 +3667,8 @@ label>input { border-radius: 15px; } -.terms h1{ - line-height:32px; +.terms h1 { + line-height: 32px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 48px; @@ -3421,8 +3676,8 @@ label>input { color: var(--text-color); } -.terms h2{ - line-height:32px; +.terms h2 { + line-height: 32px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 48px; @@ -3430,8 +3685,8 @@ label>input { color: var(--text-color); } -.terms h3{ - line-height:28px; +.terms h3 { + line-height: 28px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 32px; @@ -3439,8 +3694,8 @@ label>input { color: var(--text-color); } -.terms h4{ - line-height:24px; +.terms h4 { + line-height: 24px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 24px; @@ -3448,10 +3703,10 @@ label>input { color: var(--text-color); } -.terms p{ +.terms p { margin-top: 2px; margin-bottom: 2px; - line-height:24px; + line-height: 24px; font-family: var(--Text-fonts), sans-serif; font-weight: normal; font-size: 16px; @@ -3459,28 +3714,30 @@ label>input { color: var(--text-color); } -.terms img{ - width:100%; - height:260px; +.terms img { + 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%); + 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; - width: auto; - height: 40dvh; - margin: 12px; + min-width: 60%; + max-width: 100%; + height: auto; + margin: 0px; border-radius: 15px; } -.terms .code{ + +.terms .code { background-color: var(--text-color); border-radius: 15px; padding: 12px; } -.terms .code p{ - line-height:24px; +.terms .code p { + line-height: 24px; margin-right: 12px; margin-left: 12px; font-family: var(--Text-fonts), sans-serif; @@ -3490,21 +3747,23 @@ label>input { color: var(--background-color); } -.terms .fxbx{ +.terms .fxbx { display: flex; } -.terms .fxbx .new{ + +.terms .fxbx .new { height: fit-content; - margin:0px; + margin: 0px; margin-right: 6px; margin-top: auto; margin-bottom: auto; - padding:0px 8px; + padding: 0px 8px; border: 1px solid #00b96c; text-align: center; border-radius: 15px; } -.terms .fxbx .new p{ + +.terms .fxbx .new p { line-height: 12px; margin-top: 4px; margin-bottom: 4px; @@ -3514,21 +3773,23 @@ label>input { font-size: 14px; font-family: var(--Mono-fonts), sans-serif; font-weight: normal; - vertical-align:middle; + vertical-align: middle; align-items: center; } -.terms .fxbx .fix{ + +.terms .fxbx .fix { height: fit-content; - margin:0px; + margin: 0px; margin-right: 6px; margin-top: auto; margin-bottom: auto; - padding:0px 8px; + padding: 0px 8px; border: 1px solid #e6890f; text-align: center; border-radius: 15px; } -.terms .fxbx .fix p{ + +.terms .fxbx .fix p { line-height: 12px; margin-top: 4px; margin-bottom: 4px; @@ -3538,21 +3799,23 @@ label>input { font-size: 14px; font-family: var(--Mono-fonts), sans-serif; font-weight: normal; - vertical-align:middle; + vertical-align: middle; align-items: center; } -.terms .fxbx .chg{ + +.terms .fxbx .chg { height: fit-content; - margin:0px; + margin: 0px; margin-right: 6px; margin-top: auto; margin-bottom: auto; - padding:0px 8px; + padding: 0px 8px; border: 1px solid #1d9bf0; text-align: center; border-radius: 15px; } -.terms .fxbx .chg p{ + +.terms .fxbx .chg p { line-height: 12px; margin-top: 4px; margin-bottom: 4px; @@ -3562,21 +3825,23 @@ label>input { font-size: 14px; font-family: var(--Mono-fonts), sans-serif; font-weight: normal; - vertical-align:middle; + vertical-align: middle; align-items: center; } -.terms .fxbx .del{ + +.terms .fxbx .del { height: fit-content; - margin:0px; + margin: 0px; margin-right: 6px; margin-top: auto; margin-bottom: auto; - padding:0px 8px; + padding: 0px 8px; border: 1px solid var(--error); text-align: center; border-radius: 15px; } -.terms .fxbx .del p{ + +.terms .fxbx .del p { line-height: 12px; margin-top: 4px; margin-bottom: 4px; @@ -3586,15 +3851,16 @@ label>input { font-size: 14px; font-family: var(--Mono-fonts), sans-serif; font-weight: normal; - vertical-align:middle; + vertical-align: middle; align-items: center; } -.terms .space_tab{ + +.terms .space_tab { margin-left: 45px; } -.terms .p2c{ +.terms .p2c { margin-top: 0px; margin-bottom: 10px; text-align: left; @@ -3605,7 +3871,8 @@ label>input { font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.terms .p3{ + +.terms .p3 { margin-top: 24px; text-align: left; word-wrap: break-word; @@ -3616,7 +3883,7 @@ label>input { font-weight: bold; } -.terms .sp2c{ +.terms .sp2c { margin-top: 0px; margin-bottom: 10px; text-align: center; @@ -3627,7 +3894,8 @@ label>input { font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.terms .sp3{ + +.terms .sp3 { margin-top: 24px; text-align: center; word-wrap: break-word; @@ -3638,18 +3906,18 @@ label>input { font-weight: bold; } -.terms ul{ +.terms ul { margin-top: 6px; margin-bottom: 6px; font-family: var(--Text-fonts), sans-serif; line-height: 20px; } -.terms .err404{ +.terms .err404 { text-align: center; } -.terms .err404 img{ +.terms .err404 img { height: 25dvh; text-align: center; margin-left: auto; @@ -3657,9 +3925,9 @@ label>input { background: transparent; } -.terms .err404 h1{ +.terms .err404 h1 { margin-top: 64px; - line-height:64px; + line-height: 64px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 64px; @@ -3667,10 +3935,10 @@ label>input { color: var(--text-color); } -.terms .err404 p{ +.terms .err404 p { margin-top: 2px; margin-bottom: 2px; - line-height:32px; + line-height: 32px; font-family: var(--Text-fonts), sans-serif; font-weight: normal; font-size: 16px; @@ -3679,7 +3947,7 @@ label>input { } -.rightbox{ +.rightbox { position: relative; border-radius: 0px; margin-top: 12px; @@ -3690,7 +3958,7 @@ label>input { padding: 0px; } -.rightbox h1{ +.rightbox h1 { margin-top: 12px; margin-bottom: 0px; @@ -3701,7 +3969,7 @@ label>input { color: var(--text-color); } -.rightbox .noticearea{ +.rightbox .noticearea { width: auto; height: fit-content; max-height: 50dvh; @@ -3709,8 +3977,8 @@ label>input { border-radius: 10px; } -.rightbox .noticebox{ - overflow-wrap: break-word; +.rightbox .noticebox { + overflow-wrap: break-word; border-radius: 10px; margin-top: 12px; margin-bottom: 12px; @@ -3723,7 +3991,7 @@ label>input { padding: 12px; } -.rightbox .noticebox h4{ +.rightbox .noticebox h4 { margin-top: 2px; margin-bottom: 12px; font-family: var(--Text-fonts), sans-serif; @@ -3733,7 +4001,7 @@ label>input { color: var(--text-color); } -.rightbox .noticebox p{ +.rightbox .noticebox p { line-height: 20px; margin-top: 2px; margin-bottom: 12px; @@ -3741,20 +4009,21 @@ label>input { font-weight: normal; font-size: 16px; text-align: left; - overflow-wrap:break-word; + overflow-wrap: break-word; color: var(--text-color); } -.rightbox .noticebox a{ + +.rightbox .noticebox a { margin-top: auto; margin-bottom: auto; font-size: 16px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.rightbox .noticebox img{ +.rightbox .noticebox img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -3763,7 +4032,7 @@ label>input { vertical-align: middle; } -.rightbox .noticebox .makeup p{ +.rightbox .noticebox .makeup p { line-height: 20px; margin-top: 2px; margin-bottom: 2px; @@ -3774,44 +4043,46 @@ label>input { color: var(--text-color); } -.rightbox .noticebox .makeup a{ +.rightbox .noticebox .makeup a { margin-top: 24px; margin-bottom: auto; margin-left: 0px; font-size: 16px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.rightbox .noticebox .time{ +.rightbox .noticebox .time { margin-top: 4px; margin-bottom: auto; margin-left: 0px; margin-right: auto; } -.rightbox .noticebox .time p{ + +.rightbox .noticebox .time p { margin-top: 0px; margin-bottom: 0px; text-align: left; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } -.rightbox .btmbox{ +.rightbox .btmbox { position: absolute; - bottom: 8px; /*下に固定*/ + bottom: 8px; + /*下に固定*/ height: fit-content; max-width: 45dvh; width: 90%; overflow: scroll; } -.rightbox .btmbox h2{ +.rightbox .btmbox h2 { margin-top: 12px; margin-bottom: 12px; font-family: var(--Text-fonts), sans-serif; @@ -3821,7 +4092,7 @@ label>input { color: var(--text-color); } -.rightbox .btmbox h3{ +.rightbox .btmbox h3 { margin-top: 2px; margin-bottom: 12px; font-family: var(--Text-fonts), sans-serif; @@ -3831,8 +4102,8 @@ label>input { color: var(--text-color); } -.rightbox .btmbox p{ - +.rightbox .btmbox p { + line-height: 20px; margin-top: 2px; margin-bottom: 2px; @@ -3843,13 +4114,13 @@ label>input { color: var(--text-color); } -.rightbox .btmbox a{ +.rightbox .btmbox a { margin-top: 24px; margin-bottom: auto; margin-left: 0px; margin-right: 6px; font-size: 14px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; @@ -3859,63 +4130,71 @@ label>input { .loading { text-align: center; - font-size: 48px; /* 絵文字のサイズ */ - animation: rotate 0.5s infinite linear; /* アニメーションを適用 */ + font-size: 48px; + /* 絵文字のサイズ */ + animation: rotate 0.5s infinite linear; + /* アニメーションを適用 */ } @keyframes rotate { from { transform: rotate(0deg); } + to { transform: rotate(360deg); } } - -.emojibox{ + +.emojibox { margin-left: 0px; margin-right: 0px; padding: 12px; width: auto; } -.emojibox_flex{ + +.emojibox_flex { margin-left: 12px; margin-right: 12px; padding: 12px; width: auto; display: flex; } -.emojibox_flex .right_box{ + +.emojibox_flex .right_box { margin-left: auto; margin-right: 0px; vertical-align: middle; } -.emojibox_button{ + +.emojibox_button { cursor: pointer; border: none; display: block; padding: 6px; - width:38px; + width: 38px; height: 38px; margin-left: auto; margin-top: 24px; margin-bottom: 24px; background-color: var(--sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } -.emojibox_button:hover{ + +.emojibox_button:hover { background-color: color-mix(in srgb, var(--tl-color) 90%, var(--error)); color: var(--error); } -.emojibox_button svg{ + +.emojibox_button svg { width: 28px; height: 28px; margin-left: auto; @@ -3924,11 +4203,12 @@ label>input { margin-bottom: 6px; fill: currentColor; } -.emojibox h1{ + +.emojibox h1 { margin-left: 12px; } -.emojizone{ +.emojizone { margin: 0px; display: flex; flex-wrap: wrap; @@ -3936,7 +4216,8 @@ label>input { padding: 24px; padding-top: 24px; } -.emojizone .tokonone{ + +.emojizone .tokonone { width: calc(50% - 32px); height: fit-content; margin-top: 0px; @@ -3945,11 +4226,13 @@ label>input { margin-bottom: 12px; padding: 12px; } -.emojizone .tokonone p{ + +.emojizone .tokonone p { margin-top: 30px; margin-bottom: 30px; } -.emjtex{ + +.emjtex { width: calc(50% - 36px); background-color: var(--ueuse-color); margin-top: 0px; @@ -3962,18 +4245,19 @@ label>input { box-shadow: none; transition: all 250ms ease-out; } -.emjtex:hover{ + +.emjtex:hover { background-color: color-mix(in srgb, var(--background-color) 95%, #000); } -.emjtex .fx{ +.emjtex .fx { display: flex; max-width: 100%; flex-wrap: wrap; justify-content: flex-start; } -.emjtex img{ +.emjtex img { margin-top: 6px; margin-bottom: 6px; margin-left: 6px; @@ -3983,96 +4267,104 @@ label>input { object-fit: initial; } -.emjtex .btm_zone{ +.emjtex .btm_zone { margin-top: auto; - margin-bottom:auto; + margin-bottom: auto; } -.emjtex h3{ +.emjtex h3 { overflow-wrap: break-word; margin-top: 6px; margin-bottom: 6px; margin-left: 6px; font-size: 24px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Mono-fonts), sans-serif; font-weight: bold; } -.emjtex p{ +.emjtex p { overflow-wrap: break-word; margin-top: 6px; margin-bottom: 6px; margin-left: 6px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.rp{ +.rp { display: flex; width: 100%; height: fit-content; } -.rp p{ - overflow-wrap: break-word; + +.rp p { + overflow-wrap: break-word; margin-top: 0px; margin-bottom: 6px; margin-left: 6px; font-size: 14px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.rp .here{ + +.rp .here { margin-right: 8px; width: 12px; height: 12px; background-color: var(--main-color); border-radius: 50%; } -.rp .totop{ + +.rp .totop { width: 14px; height: 8px; border-left: 2px solid var(--text-color); border-bottom: 2px solid var(--text-color); border-bottom-left-radius: 6px; } -.ru{ + +.ru { display: flex; width: 100%; height: fit-content; margin-bottom: 12px; } -.ru a{ + +.ru a { display: flex; width: 100%; height: fit-content; } -.ru a img{ + +.ru a img { margin-left: 0px; object-fit: cover; text-align: center; width: 24px; - height:24px; + height: 24px; border-radius: 50%; } -.ru a p{ - overflow-wrap: break-word; + +.ru a p { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 6px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.ru a p img{ + +.ru a p img { vertical-align: text-top; margin-top: auto; margin-bottom: auto; @@ -4083,10 +4375,11 @@ label>input { border-radius: 0px; } -.this{ - background-color: color-mix(in srgb, var(--sub-color) 30%, var(--background-color))!important; +.this { + background-color: color-mix(in srgb, var(--sub-color) 30%, var(--background-color)) !important; } -.notification{ + +.notification { animation: slideInY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; margin: 0px; border-radius: 0px; @@ -4098,36 +4391,43 @@ label>input { border-bottom: 1px solid var(--border-color); width: auto; } -.notification:first-child{ + +.notification:first-child { border-top: 1px solid var(--border-color); } + @keyframes slideInY { 0% { - transform: translateY(24px); - opacity: 0; + transform: translateY(24px); + opacity: 0; } + 100% { - transform: translateY(0px); + transform: translateY(0px); } - 40%,100% { - opacity: 1; + + 40%, + 100% { + opacity: 1; } } -.notification .flebox{ + +.notification .flebox { display: flex; } -.notification .flebox a{ +.notification .flebox a { margin-top: auto; margin-bottom: auto; margin-left: 12px; font-size: 18px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.notification .flebox .icon img{ + +.notification .flebox .icon img { margin-top: auto; margin-bottom: auto; margin-left: 0px; @@ -4136,61 +4436,68 @@ label>input { height: 32px; object-fit: cover; } -.notification .flebox .icon a{ - margin:0px; + +.notification .flebox .icon a { + margin: 0px; } -.notification .flebox .username{ + +.notification .flebox .username { margin-top: auto; margin-bottom: auto; margin-left: 8px; } -.notification .flebox .username a{ - margin:0px; - color:var(--subtext-color); + +.notification .flebox .username a { + margin: 0px; + color: var(--subtext-color); font-size: 14px; text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.notification .flebox .username img{ + +.notification .flebox .username img { margin-left: 6px; margin-right: 6px; width: 14px; height: 14px; } -.notification .flebox .idbox{ + +.notification .flebox .idbox { margin-top: auto; margin-bottom: auto; margin-left: 6px; - border-radius: 10px; + border-radius: 16px; background-color: var(--background-color); border: 1px solid var(--border-color); } -.notification .flebox .idbox a{ + +.notification .flebox .idbox a { margin-top: 6px; margin-bottom: 6px; margin-left: 8px; margin-right: 8px; text-align: center; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; } -.notification p{ - line-height:20px; - overflow-wrap: break-word; +.notification p { + line-height: 20px; + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.notification .inline{ + +.notification .inline { width: fit-content; margin-left: 4px; margin-right: 4px; @@ -4208,7 +4515,7 @@ label>input { vertical-align: top; } -.notification .quote{ +.notification .quote { width: fit-content; border-left: 5px solid; border-radius: 5px; @@ -4218,13 +4525,13 @@ label>input { padding-right: 6px; padding-top: 4px; padding-bottom: 4px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.notification .blur{ +.notification .blur { position: relative; background-color: #323232; width: fit-content; @@ -4234,63 +4541,71 @@ label>input { padding-right: 2px; padding-top: 3px; padding-bottom: 3px; - color: #323232; + color: transparent; border-radius: 5px; transition: 0.5s; } -.notification .blur:hover{ + +.notification .blur:hover { background-color: var(--notification-color); color: var(--text-color); } +.notification .blur * { + transition: 0.5s; + opacity: 0; +} +.notification .blur:hover * { + opacity: 1; +} -.notification h1{ - overflow-wrap: break-word; +.notification h1 { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 48px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.notification h2{ - overflow-wrap: break-word; +.notification h2 { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 32px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.notification h3{ - overflow-wrap: break-word; +.notification h3 { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 24px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.notification center{ - overflow-wrap: break-word; +.notification center { + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: auto; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.notification .mta{ +.notification .mta { line-height: 30px; background-color: var(--sub-color); padding: 6px; @@ -4300,13 +4615,14 @@ label>input { margin-left: 3px; margin-right: 3px; font-size: 14px; - color:var(--main-color); + color: var(--main-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; transition: all 250ms ease-out; } -.notification .mta img{ + +.notification .mta img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -4314,24 +4630,26 @@ label>input { height: 14px; vertical-align: middle; } -.notification .mta:hover{ + +.notification .mta:hover { font-size: 14px; background-color: var(--main-color); - color:var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + color: var(--sub-color); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); } -.notification a{ +.notification a { margin-top: auto; margin-bottom: auto; font-size: 16px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.notification p img{ + +.notification p img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -4340,7 +4658,7 @@ label>input { vertical-align: middle; } -.notification h1 img{ +.notification h1 img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -4349,7 +4667,7 @@ label>input { vertical-align: middle; } -.notification h2 img{ +.notification h2 img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -4358,7 +4676,7 @@ label>input { vertical-align: middle; } -.notification h3 img{ +.notification h3 img { margin-top: auto; margin-bottom: auto; margin-left: 4px; @@ -4369,29 +4687,30 @@ label>input { -.notification .flebox .time{ +.notification .flebox .time { margin-top: auto; margin-bottom: auto; margin-left: auto; margin-right: 0px; text-align: right; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } -.notification a{ - overflow-wrap: break-word; +.notification a { + overflow-wrap: break-word; margin-top: 24px; margin-bottom: auto; margin-left: 0px; font-size: 16px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -hr{ + +hr { height: 0; margin-top: 12px; margin-bottom: 12px; @@ -4401,12 +4720,12 @@ hr{ } -.search_btn{ +.search_btn { margin-top: 24px; cursor: pointer; border: none; display: block; - width:20%; + width: 20%; padding: 8px auto; margin-left: auto; margin-right: 0px; @@ -4418,28 +4737,30 @@ hr{ background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.search_btn:hover{ + +.search_btn:hover { background-color: var(--main-color); color: var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:21%; -} -.search_btn:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); - width:19%; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 21%; } -.botbox{ +.search_btn:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + width: 19%; +} + +.botbox { display: none; } @@ -4470,10 +4791,12 @@ hr{ border-bottom: 3px solid var(--background-color); transform: rotate(-45deg); } + .new_ueuse { margin-left: auto; margin-right: auto; } + .new_ueuse_text { width: auto; height: 24px; @@ -4489,18 +4812,27 @@ hr{ background: var(--main-color); text-align: center; overflow: hidden; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); border-radius: 25px; padding-top: 8px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; - color:var(--background-color); + color: var(--background-color); font-family: var(--Text-fonts), sans-serif; } + @keyframes slideDown { - 0%, 100% { transform: translateY(-64px); } - 10%, 90% { transform: translateY(32px); } + + 0%, + 100% { + transform: translateY(-64px); + } + + 10%, + 90% { + transform: translateY(32px); + } } @@ -4563,7 +4895,7 @@ hr{ } } -.tlchange{ +.tlchange { border-radius: 0px; margin: 0px; background-color: var(--ueuse-color); @@ -4572,7 +4904,8 @@ hr{ text-align: center; display: flex; } -.tlchange .btn{ + +.tlchange .btn { width: 30%; line-height: 32px; margin-left: auto; @@ -4593,39 +4926,43 @@ hr{ padding: 0px; } -.tlchange .on{ + +.tlchange .on { color: var(--main-color); border-bottom: 1px solid var(--main-color); } -.hny{ +.hny { border-radius: 10px; overflow: hidden; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05) inset; margin: 12px; border: 1px solid var(--border-color); } -.hny .top{ + +.hny .top { background-color: #CB4042; padding-left: 24px; padding-right: 24px; padding-top: 8px; padding-bottom: 8px; - color:#F5F4F0; + color: #F5F4F0; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.hny .textmain{ + +.hny .textmain { background-color: #F5F5F5; padding-top: 8px; padding-bottom: 24px; padding-left: 24px; padding-right: 24px; } -.hny .textmain h1{ + +.hny .textmain h1 { background-color: #dcae64; text-align: left; - color:#FCFAF2; + color: #FCFAF2; font-family: var(--Text-fonts), sans-serif; word-wrap: break-word; font-size: 32px; @@ -4633,18 +4970,20 @@ hr{ padding: 12px; border-radius: 7px; } -.hny .textmain p{ + +.hny .textmain p { text-align: left; - color:#252525; + color: #252525; font-family: var(--Text-fonts), sans-serif; word-wrap: break-word; font-size: 16px; line-height: 22px; font-weight: bold; } -.hny .textmain .rp{ + +.hny .textmain .rp { text-align: right; - color:#252525; + color: #252525; font-family: var(--Text-fonts), sans-serif; word-wrap: break-word; font-size: 14px; @@ -4655,14 +4994,13 @@ hr{ .switch_input { position: absolute; - left: 0; - top: 0; - width: 64%; - height: 64%; + width: 50px; + height: 26px; z-index: 5; opacity: 0; cursor: pointer; -} +} + .switch_label { width: 50px; height: 26px; @@ -4674,6 +5012,7 @@ hr{ box-sizing: border-box; border: solid 1px color-mix(in srgb, var(--background-color) 85%, #000); } + .switch_label:after { content: ""; position: absolute; @@ -4688,17 +5027,20 @@ hr{ background: var(--background-color); transition: 0.2s; } -.switch_input:checked + .switch_label { + +.switch_input:checked+.switch_label { background-color: var(--main-color); border: solid 1px var(--main-color); -} -.switch_input:checked + .switch_label:after { +} + +.switch_input:checked+.switch_label:after { left: 24px; margin-top: 2px; margin-left: 2px; width: 20px; height: 20px; } + .switch_button { position: relative; width: 75px; @@ -4709,11 +5051,12 @@ hr{ input[type=radio] { display: none; } + .radiobtn_label { height: 32px; position: relative; cursor: pointer; - padding-left:8px; + padding-left: 8px; padding-right: 8px; padding-top: 5px; @@ -4724,13 +5067,14 @@ input[type=radio] { transition: 0.4s; box-sizing: border-box; - color:var(--dark-text-color); + color: var(--dark-text-color); font-family: var(--Text-fonts), sans-serif; word-wrap: break-word; font-size: 16px; line-height: 22px; font-weight: normal; } + .radiobtn_label::after { content: ""; position: absolute; @@ -4748,11 +5092,13 @@ input[type=radio] { box-shadow: 0 0 0px rgba(0, 0, 0, 0.0); transition: 0.2s; } -.radiobtn_input:checked + .radiobtn_label { + +.radiobtn_input:checked+.radiobtn_label { background-color: var(--main-color); padding-left: 30px; -} -.radiobtn_input:checked + .radiobtn_label::after { +} + +.radiobtn_input:checked+.radiobtn_label::after { margin-top: 8px; margin-left: 8px; margin-bottom: 8px; @@ -4770,7 +5116,7 @@ summary { padding: 0.5em; } -.server_code{ +.server_code { margin-top: 12px; margin-bottom: 12px; border-radius: 10px; @@ -4782,69 +5128,80 @@ summary { border: 1px solid var(--border-color); width: auto; } + .server_code details { padding: 0px; margin-top: 0px; margin-bottom: 0px; text-align: left; - color:var(--text-color); + color: var(--text-color); font-family: var(--Mono-fonts), sans-serif; word-wrap: break-word; font-size: 18px; line-height: 22px; font-weight: bold; } + .server_code summary { display: block; list-style: none; } + .server_code summary::-webkit-details-marker { display: none; } + @keyframes slideInYopen { 0% { - transform: translateY(-16px); - opacity: 0; + transform: translateY(-16px); + opacity: 0; } + 100% { - transform: translateY(0px); + transform: translateY(0px); } - 40%,100% { - opacity: 1; + + 40%, + 100% { + opacity: 1; } } -.server_code p{ + +.server_code p { margin-top: 4px; margin-bottom: 4px; text-align: left; - color:var(--text-color); + color: var(--text-color); font-family: var(--Mono-fonts), sans-serif; word-wrap: break-word; font-size: 14px; line-height: 22px; font-weight: bold; } + .delbox { margin: 0px; padding: 0px; display: flex; } -.delbox p{ + +.delbox p { margin-top: auto; margin-bottom: auto; text-align: left; - color:var(--text-color); + color: var(--text-color); font-family: var(--Mono-fonts), sans-serif; word-wrap: break-word; font-size: 14px; line-height: 22px; font-weight: bold; } -.delbox .delbtn{ + +.delbox .delbtn { cursor: pointer; border: none; display: block; - width:60px; + width: 60px; padding: 8px auto; margin-left: auto; margin-right: 0px; @@ -4854,25 +5211,27 @@ summary { padding-bottom: 2px; background-color: var(--background-color); border-radius: 50px; - color:var(--error); + color: var(--error); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } -.delbox .delbtn:hover{ +.delbox .delbtn:hover { background-color: var(--error); - color: var(--background-color);; + color: var(--background-color); + ; transition: all 250ms ease-out; } -.mini_irobtn{ + +.mini_irobtn { cursor: pointer; border: none; display: block; - width:60px; + width: 60px; padding: 8px auto; margin-left: auto; margin-right: 0px; @@ -4886,24 +5245,28 @@ summary { font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } -.mini_irobtn:hover{ + +.mini_irobtn:hover { background-color: var(--main-color); - color: var(--background-color);; + color: var(--background-color); + ; transition: all 250ms ease-out; } -.admin_settings{ +.admin_settings { display: flex; } -.admin_settings .admin_right{ + +.admin_settings .admin_right { margin-right: 0px; width: 70%; } -.admin_settings .admin_left{ + +.admin_settings .admin_left { position: sticky; top: 0; margin-left: 0px; @@ -4912,11 +5275,12 @@ summary { height: 92.5dvh; border-right: 1px solid var(--border-color); } -.admin_leftbtn{ + +.admin_leftbtn { cursor: pointer; border: none; display: flex; - width:80%; + width: 80%; margin: 8px; padding: 8px auto; margin-left: auto; @@ -4930,59 +5294,66 @@ summary { background-color: var(--background-color)FFF; border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 18px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: left; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } -.admin_leftbtn:hover{ + +.admin_leftbtn:hover { background-color: var(--main-color); color: var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:85%; -} -.admin_leftbtn:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); - width:75%; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 85%; } -.admin_userinfo{ +.admin_leftbtn:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + width: 75%; +} + +.admin_userinfo { padding: 12px; } -.admin_userinfo .icon{ + +.admin_userinfo .icon { display: flex; vertical-align: middle; } -.admin_userinfo .icon img{ + +.admin_userinfo .icon img { object-fit: cover; margin-top: 12px; text-align: left; width: 128px; - height:128px; + height: 128px; border-radius: 50%; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); } -.admin_userinfo .icon .tatext{ + +.admin_userinfo .icon .tatext { display: block; margin-top: auto; margin-bottom: auto; } -.admin_userinfo .icon .tatext h2{ + +.admin_userinfo .icon .tatext h2 { word-wrap: break-word; margin-left: 12px; margin-top: 12px; margin-bottom: auto; - color:var(--text-color); + color: var(--text-color); font-size: 32px; font-family: var(--Text-fonts), sans-serif; font-weight: 900; } -.admin_userinfo .icon .tatext p{ + +.admin_userinfo .icon .tatext p { word-wrap: break-word; margin-left: 12px; margin-right: auto; @@ -4994,7 +5365,7 @@ summary { font-weight: 900; } -.admin_userinfo .profile p{ +.admin_userinfo .profile p { text-align: left; margin-top: 12px; margin-bottom: auto; @@ -5002,19 +5373,21 @@ summary { margin-right: 0px; word-wrap: break-word; font-size: 18px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } -.admin_userinfo .roleboxes{ + +.admin_userinfo .roleboxes { margin-top: 12px; margin-left: 0px; display: flex; padding: 0px; - flex-wrap : wrap; + flex-wrap: wrap; } -.admin_userinfo .rolebox{ + +.admin_userinfo .rolebox { margin-top: 0px; margin-bottom: 12px; margin-left: 0px; @@ -5025,10 +5398,11 @@ summary { background-color: var(--background-color); border: 1px solid var(--main-color); border-radius: 25px; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); } -.admin_userinfo .rolebox p{ - color:var(--main-color); + +.admin_userinfo .rolebox p { + color: var(--main-color); margin-top: 2px; margin-bottom: 2px; margin-left: 10px; @@ -5037,20 +5411,23 @@ summary { font-family: var(--Head-fonts), sans-serif; font-weight: normal; } -.admin_userinfo .about{ + +.admin_userinfo .about { display: block; } -.admin_userinfo .p2{ + +.admin_userinfo .p2 { margin-top: 0px; margin-bottom: 10px; word-wrap: break-word; line-height: 20px; - color:var(--subtext-color); + color: var(--subtext-color); font-size: 12px; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } -.admin_userinfo .about p{ + +.admin_userinfo .about p { word-wrap: break-word; margin-left: 0px; margin-right: auto; @@ -5061,14 +5438,16 @@ summary { font-family: var(--Text-fonts), sans-serif; font-weight: 900; } -.admin_userinfo .banzone{ + +.admin_userinfo .banzone { display: flex; } -.admin_userinfo .banzone .banbtn{ + +.admin_userinfo .banzone .banbtn { cursor: pointer; border: none; display: block; - width:25%; + width: 25%; margin: 12px; padding: 8px 5%; margin-left: auto; @@ -5081,29 +5460,32 @@ summary { text-align: center; border-radius: 50px; - color:var(--background-color); + color: var(--background-color); font-size: 22px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; } -.admin_userinfo .banzone .banbtn:hover{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:30%; + +.admin_userinfo .banzone .banbtn:hover { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 30%; } -.admin_userinfo .banzone .banbtn:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); - width:20%; + +.admin_userinfo .banzone .banbtn:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + width: 20%; } -.admin_userinfo .banzone .waterbtn{ + +.admin_userinfo .banzone .waterbtn { cursor: pointer; border: none; display: block; - width:25%; + width: 25%; margin: 12px; padding: 8px 5%; margin-left: auto; @@ -5116,29 +5498,32 @@ summary { text-align: center; border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 22px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; } -.admin_userinfo .banzone .waterbtn:hover{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:30%; + +.admin_userinfo .banzone .waterbtn:hover { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 30%; } -.admin_userinfo .banzone .waterbtn:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); - width:20%; + +.admin_userinfo .banzone .waterbtn:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + width: 20%; } -.admin_userinfo .banzone .icebtn{ + +.admin_userinfo .banzone .icebtn { cursor: pointer; border: none; display: block; - width:25%; + width: 25%; margin: 12px; padding: 8px 5%; margin-left: auto; @@ -5151,30 +5536,32 @@ summary { text-align: center; border-radius: 50px; - color:var(--background-color); + color: var(--background-color); font-size: 22px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; } -.admin_userinfo .banzone .icebtn:hover{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:30%; -} -.admin_userinfo .banzone .icebtn:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); - width:20%; + +.admin_userinfo .banzone .icebtn:hover { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 30%; } -.error{ +.admin_userinfo .banzone .icebtn:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + width: 20%; +} + +.error { width: auto; margin-top: 12px; margin-left: 12px; - margin-right:12px; + margin-right: 12px; margin-bottom: 12px; background-color: var(--sub-color); @@ -5185,7 +5572,8 @@ summary { text-align: center; overflow: hidden; } -.error h1{ + +.error h1 { margin-top: 0px; border-radius: 8px; padding: 6px; @@ -5195,20 +5583,22 @@ summary { font-family: var(--Mono-fonts), sans-serif; font-weight: bold; } -.error p{ + +.error p { color: var(--text-color); font-size: 18px; font-family: var(--Text-fonts), sans-serif; font-weight: 900; } -.overview{ +.overview { display: flex; width: 100%; margin-top: 12px; margin-bottom: 12px; } -.overview_cnt_l{ + +.overview_cnt_l { margin-left: 0px; margin-right: 6px; width: 50%; @@ -5217,7 +5607,8 @@ summary { border-radius: 10px; border: 1px solid var(--border-color); } -.overview_cnt_r{ + +.overview_cnt_r { margin-left: 6px; margin-right: 0px; width: 50%; @@ -5226,36 +5617,43 @@ summary { border-radius: 10px; border: 1px solid var(--border-color); } -.overview p{ + +.overview p { color: var(--text-color); font-size: 32px; font-family: var(--Mono-fonts), sans-serif; font-weight: bold; } -.overview .p2{ + +.overview .p2 { color: var(--subtext-color); font-size: 12px; font-family: var(--Mono-fonts), sans-serif; font-weight: normal; } -.servericon{ + +.servericon { text-align: center; } -.servericon .up{ + +.servericon .up { margin-top: -74px; } -.servericon img{ + +.servericon img { object-fit: cover; + min-width: auto; width: 100px; height: 100px; border-radius: 15px; - box-shadow:0 0px 0px 0 rgba(0, 0, 0, .0); + box-shadow: 0 0px 0px 0 rgba(0, 0, 0, .0); margin: 0px; } -.serverhead{ +.serverhead { text-align: center; } + .formarea .serverhead img { object-fit: cover; width: 100%; @@ -5263,6 +5661,7 @@ summary { border-radius: 10px; margin: 0px; } + .serverhead img { object-fit: cover; width: 60%; @@ -5270,10 +5669,12 @@ summary { border-radius: 10px; margin: 0px; } -.serverhead_set{ + +.serverhead_set { text-align: center; } -.serverhead_set img{ + +.serverhead_set img { object-fit: cover; width: 100%; height: 160px; @@ -5281,7 +5682,7 @@ summary { margin: 0px; } -.f_c_area{ +.f_c_area { margin: 0px; background-color: var(--tl-color); border: none; @@ -5289,7 +5690,8 @@ summary { text-align: center; display: flex; } -.f_c_area .fcnt{ + +.f_c_area .fcnt { display: block; width: 25%; line-height: 32px; @@ -5300,11 +5702,13 @@ summary { display: inline-block; border: none; } -.f_c_area .fcnt .p2{ + +.f_c_area .fcnt .p2 { margin-top: 0px; margin-bottom: 0px; } -.f_c_area .fcnt p{ + +.f_c_area .fcnt p { overflow-wrap: break-word; margin-top: 0px; margin-bottom: 0px; @@ -5315,12 +5719,13 @@ summary { font-weight: normal; text-align: center; } -.sp_time_area{ + +.sp_time_area { display: none; } -.offline{ +.offline { position: absolute; animation: slideDownOffline 5.0s ease-in-out forwards; margin-top: 32px; @@ -5333,10 +5738,11 @@ summary { z-index: 9999; background-color: var(--error); border-radius: 20px; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); text-decoration: none; } -.offline p{ + +.offline p { margin-top: 4px; margin-bottom: 4px; margin-left: 12px; @@ -5344,16 +5750,26 @@ summary { line-height: 24px; font-family: var(--Text-fonts), sans-serif; font-size: 16px; - color:var(--tl-color); - color: transparent; + 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); } + + 0%, + 100% { + transform: translateY(-40dvh); + } + + 20%, + 90% { + transform: translateY(0px); + } } -.online{ + +.online { position: absolute; animation: slideDownOffline 5.0s ease-in-out forwards; margin-top: 32px; @@ -5366,10 +5782,11 @@ summary { z-index: 9999; background-color: #1d9bf0; border-radius: 20px; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); text-decoration: none; } -.online p{ + +.online p { margin-top: 4px; margin-bottom: 4px; margin-left: 12px; @@ -5377,12 +5794,13 @@ summary { line-height: 24px; font-family: var(--Text-fonts), sans-serif; font-size: 16px; - color:var(--tl-color); - color: transparent; + color: var(--tl-color); + color: transparent; text-shadow: 0 0 0 var(--tl-color); text-align: center; } -.new_ueuse{ + +.new_ueuse { position: absolute; animation: slideDownOffline 5.0s ease-in-out forwards; margin-top: 32px; @@ -5395,11 +5813,12 @@ summary { z-index: 9999; background-color: var(--main-color); border-radius: 20px; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .3); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .3); text-decoration: none; cursor: pointer; } -.new_ueuse p{ + +.new_ueuse p { margin-top: 4px; margin-bottom: 4px; margin-left: 12px; @@ -5407,13 +5826,13 @@ summary { line-height: 24px; font-family: var(--Text-fonts), sans-serif; font-size: 16px; - color:var(--tl-color); - color: transparent; + color: var(--tl-color); + color: transparent; text-shadow: 0 0 0 var(--tl-color); text-align: center; } -.graph{ +.graph { margin-top: 12px; margin-bottom: 12px; margin-left: 0px; @@ -5424,7 +5843,8 @@ summary { border-radius: 50px; border: solid 1px var(--border-color); } -.graph .per{ + +.graph .per { margin-top: 4px; margin-bottom: 4px; margin-right: 4px; @@ -5435,7 +5855,7 @@ summary { border: none; } -noscript{ +noscript { position: fixed; top: 0; left: 0; @@ -5447,7 +5867,8 @@ noscript{ transition: all 250ms ease-out; cursor: not-allowed; } -noscript .noscript_modal{ + +noscript .noscript_modal { padding: 0px; border-radius: 15px; width: fit-content; @@ -5461,39 +5882,45 @@ noscript .noscript_modal{ bottom: 45%; left: 0; margin: auto; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); overflow: scroll; cursor: auto; } -noscript .noscript_modal .inner{ + +noscript .noscript_modal .inner { margin: 64px; } -noscript .noscript_modal .inner .oops_icon{ + +noscript .noscript_modal .inner .oops_icon { margin-top: -32px; font-family: var(--Text-fonts), sans-serif; font-size: 74px; text-align: center; } -noscript .noscript_modal .inner h1{ + +noscript .noscript_modal .inner h1 { line-height: 32px; font-family: var(--Text-fonts), sans-serif; font-size: 32px; - color:var(--text-color); + color: var(--text-color); text-align: center; font-weight: bold; } -noscript .noscript_modal .inner p{ + +noscript .noscript_modal .inner p { line-height: 20px; font-family: var(--Text-fonts), sans-serif; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-align: center; } -noscript .noscript_modal .inner .p2{ + +noscript .noscript_modal .inner .p2 { margin-top: 12px; text-align: center; } -noscript .noscript_modal .inner .infobtn{ + +noscript .noscript_modal .inner .infobtn { display: block; width: 128px; padding: 6px; @@ -5501,52 +5928,57 @@ noscript .noscript_modal .inner .infobtn{ margin-left: auto; margin-right: auto; display: block; - background-color:#FFC832; - color:#ffffff; + background-color: #FFC832; + color: #ffffff; border-radius: 32px; font-size: 20px; font-family: var(--Mono-fonts), 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; font-weight: normal; text-decoration: none; } -noscript .noscript_modal .inner .center_text{ + +noscript .noscript_modal .inner .center_text { margin-top: 12px; display: block; } -noscript .noscript_modal .inner .center_text p{ + +noscript .noscript_modal .inner .center_text p { line-height: 16px; margin: 0px; text-align: center; - color:#777; + color: #777; font-size: 14px; font-family: var(--Mono-fonts), 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; font-weight: normal; } -.special:hover span{ - display:inline-block; +.special:hover span { + display: inline-block; vertical-align: top; animation: cycling 500ms; } + @keyframes cycling { from { - animation-timing-function: ease-in-out; - transform: scale(1.0, 1.0) translate(0%, 0%) rotate(0deg) skew(0deg, 0deg); - opacity: 1; + animation-timing-function: ease-in-out; + transform: scale(1.0, 1.0) translate(0%, 0%) rotate(0deg) skew(0deg, 0deg); + opacity: 1; } - 50%{ + + 50% { animation-timing-function: ease-in-out; transform: scale(1.5, 1.5) translate(0%, 0%) rotate(-15deg) skew(0deg, 0deg); opacity: 1; } + to { - animation-timing-function: ease-out; - transform: scale(1.0, 1.0) translate(0%, 0%) rotate(0deg) skew(0deg, 0deg); - opacity: 1; + animation-timing-function: ease-out; + transform: scale(1.0, 1.0) translate(0%, 0%) rotate(0deg) skew(0deg, 0deg); + opacity: 1; } } -.tutorial_background{ +.tutorial_background { position: fixed; top: 0; left: 0; @@ -5557,7 +5989,8 @@ noscript .noscript_modal .inner .center_text p{ z-index: 9999; transition: all 250ms ease-out; } -.tutorial_background .tutorial_modal{ + +.tutorial_background .tutorial_modal { padding: 0px; border-radius: 15px; width: 720px; @@ -5571,46 +6004,52 @@ noscript .noscript_modal .inner .center_text p{ bottom: 45%; left: 0; margin: auto; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); overflow: scroll; cursor: auto; } -.tutorial_background .tutorial_modal .tutorial{ + +.tutorial_background .tutorial_modal .tutorial { margin: 64px; height: calc(100% - 128px); width: calc(100% - 128px); } -.tutorial_background .tutorial_modal .tutorial .page{ + +.tutorial_background .tutorial_modal .tutorial .page { position: relative; transition: all 250ms ease-out; animation: slideInX 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; height: 100%; width: 100%; } -.tutorial_background .tutorial_modal .tutorial .page h1{ + +.tutorial_background .tutorial_modal .tutorial .page h1 { line-height: 32px; font-family: var(--Text-fonts), sans-serif; font-size: 32px; - color:var(--text-color); + color: var(--text-color); text-align: center; font-weight: bold; } -.tutorial_background .tutorial_modal .tutorial .page h2{ + +.tutorial_background .tutorial_modal .tutorial .page h2 { line-height: 28px; font-family: var(--Text-fonts), sans-serif; font-size: 24px; - color:var(--text-color); + color: var(--text-color); text-align: left; font-weight: bold; } -.tutorial_background .tutorial_modal .tutorial .page p{ + +.tutorial_background .tutorial_modal .tutorial .page p { line-height: 20px; font-family: var(--Text-fonts), sans-serif; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-align: left; } -.tutorial_background .tutorial_modal .tutorial .page img{ + +.tutorial_background .tutorial_modal .tutorial .page img { margin-left: auto; margin-right: auto; text-align: center; @@ -5618,65 +6057,74 @@ noscript .noscript_modal .inner .center_text p{ object-fit: contain; border-radius: 10px; } -.tutorial_background .tutorial_modal .tutorial .page .btm_area{ + +.tutorial_background .tutorial_modal .tutorial .page .btm_area { width: 100%; position: absolute; bottom: 0px; display: flex; - justify-content:flex-end; - margin:auto 0px 0px 0px; + justify-content: flex-end; + margin: auto 0px 0px 0px; } -.tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn{ + +.tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn { cursor: pointer; border: none; display: block; - width:20%; + width: 20%; padding: 4px 4px; margin-left: 12px; margin-right: 0px; background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 18px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: all 250ms ease-out; } -.tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:hover{ + +.tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:hover { background-color: var(--main-color); color: var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - width:21%; + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + width: 21%; } -.tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .0); - width:19%; + +.tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .0); + width: 19%; } -.tutorial_background .tutorial_modal .tutorial .page .btm_area .backcolor{ + +.tutorial_background .tutorial_modal .tutorial .page .btm_area .backcolor { background-color: #CCC; color: #FFF; } -.tutorial_background .tutorial_modal .tutorial .page .btm_area .backcolor:hover{ + +.tutorial_background .tutorial_modal .tutorial .page .btm_area .backcolor:hover { background-color: #CCC; color: #FFF; } @keyframes slideInX { 0% { - transform: translateX(24px); - opacity: 0; + transform: translateX(24px); + opacity: 0; } + 100% { - transform: translateX(0px); + transform: translateX(0px); } - 40%,100% { - opacity: 1; + + 40%, + 100% { + opacity: 1; } } -.ueuse_popup_back{ +.ueuse_popup_back { position: fixed; top: 0; left: 0; @@ -5686,6 +6134,7 @@ noscript .noscript_modal .inner .center_text p{ transition: all 250ms ease-out; animation: popupBlurAnim 250ms ease-out 1 forwards; } + .ueuse_popup_back .ueuse_popup_menu { display: none; position: absolute; @@ -5697,16 +6146,19 @@ noscript .noscript_modal .inner .center_text p{ border-radius: 10px; animation: popup_menu 150ms ease-out forwards; } -@keyframes popup_menu{ + +@keyframes popup_menu { 0% { transform: translateY(-16px) scale(0.9); opacity: 0; } + 100% { transform: translateY(0px) scale(1.0); opacity: 1; } } + .ueuse_popup_back .ueuse_popup_menu button { cursor: pointer; display: block; @@ -5720,17 +6172,19 @@ noscript .noscript_modal .inner .center_text p{ font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: left; transition: all 250ms ease-out; } -.ueuse_popup_back .ueuse_popup_menu button svg{ + +.ueuse_popup_back .ueuse_popup_menu button svg { width: 24px; height: 24px; fill: currentColor; margin-top: -4px; margin-right: 8px; } + .ueuse_popup_back .ueuse_popup_menu button:hover { background-color: var(--sub-color); color: var(--main-color); @@ -5740,14 +6194,17 @@ noscript .noscript_modal .inner .center_text p{ background-color: var(--error); color: var(--background-color); } -.ueuse_popup_back .bye{ + +.ueuse_popup_back .bye { animation: bye_popup_menu 125ms ease-in forwards; } -@keyframes bye_popup_menu{ + +@keyframes bye_popup_menu { 0% { transform: translateY(0px) scale(1.0); opacity: 1; } + 100% { transform: translateY(-16px) scale(0.9); opacity: 0; @@ -5755,7 +6212,7 @@ noscript .noscript_modal .inner .center_text p{ } -.emoji_admin{ +.emoji_admin { margin-top: 12px; margin-bottom: 12px; border-radius: 10px; @@ -5766,19 +6223,21 @@ noscript .noscript_modal .inner .center_text p{ border: 1px solid var(--border-color); width: auto; } + .emoji_admin details { padding: 0px; margin-top: 0px; margin-bottom: 0px; text-align: left; - color:var(--text-color); + color: var(--text-color); font-family: var(--Mono-fonts), sans-serif; word-wrap: break-word; font-size: 18px; line-height: 32px; font-weight: bold; } -.emoji_admin details img{ + +.emoji_admin details img { padding: 0px; margin-top: 0px; margin-bottom: 0px; @@ -5788,25 +6247,28 @@ noscript .noscript_modal .inner .center_text p{ object-fit: initial; vertical-align: middle; } + .emoji_admin summary { display: block; list-style: none; - color:var(--text-color); + color: var(--text-color); font-family: var(--Mono-fonts), sans-serif; word-wrap: break-word; font-size: 20px; line-height: 32px; font-weight: bold; } + .emoji_admin summary::-webkit-details-marker { display: none; } -.emoji_admin p{ + +.emoji_admin p { margin-top: 4px; margin-bottom: 4px; text-align: left; - color:var(--text-color); + color: var(--text-color); font-family: var(--Mono-fonts), sans-serif; word-wrap: break-word; font-size: 14px; @@ -5822,7 +6284,8 @@ noscript .noscript_modal .inner .center_text p{ background-color: var(--background-color); border: 1px solid var(--border-color); width: auto; - min-height: 32px; /* 閉じた状態での最小高さ */ + min-height: 32px; + /* 閉じた状態での最小高さ */ line-height: 32px; } @@ -5837,6 +6300,7 @@ noscript .noscript_modal .inner .center_text p{ font-size: 18px; font-weight: bold; } + .actionlog details span { margin: 0px 6px 0px 4px; padding: 2px 6px; @@ -5845,31 +6309,37 @@ noscript .noscript_modal .inner .center_text p{ font-weight: normal; font-size: 16px; } + .actionlog details .INFO { background-color: color-mix(in srgb, var(--background-color) 90%, var(--success)); border: solid 1px var(--success); color: var(--success); } + .actionlog details .NOTICE { background-color: color-mix(in srgb, var(--background-color) 90%, var(--good)); border: solid 1px var(--good); color: var(--good); } + .actionlog details .WARNING { background-color: color-mix(in srgb, var(--background-color) 90%, var(--warn)); border: solid 1px var(--warn); color: var(--warn); } + .actionlog details .ERROR { background-color: color-mix(in srgb, var(--background-color) 90%, var(--danger)); border: solid 1px var(--danger); color: var(--danger); } + .actionlog details .CRITICAL { background-color: color-mix(in srgb, var(--background-color) 90%, var(--error)); border: solid 1px var(--error); color: var(--error); } + .actionlog summary { display: block; list-style: none; @@ -5877,9 +6347,11 @@ noscript .noscript_modal .inner .center_text p{ line-height: 32px; overflow: hidden; } + .actionlog summary::-webkit-details-marker { display: none; } + .actionlog p { margin-top: 4px; margin-bottom: 4px; @@ -5892,26 +6364,104 @@ noscript .noscript_modal .inner .center_text p{ font-weight: normal; } +.auth_clientbox{ + width: 100%; + height: fit-content; + background-color: var(--background-color); + border: solid 1px var(--border-color); + border-radius: 10px; +} +.auth_clientbox .flexbox{ + margin: 16px; + display: flex; + width: 100%; + height: fit-content; +} +.auth_clientbox .flexbox img{ + width: 64px; + height: 64px; + object-fit: cover; + border-radius: 8px; +} +.auth_clientbox .flexbox p{ + width: calc(100% - 24px); + margin: auto auto auto 16px; + font-weight: bold; + font-size: 24px; + line-height: 24px; + color: var(--text-color); +} +.auth_clientbox .about{ + margin: 16px; + width: calc(100% - 32px); +} +.auth_clientbox .about .scopebox{ + width: calc(100% - 32px); + border: solid 1px var(--border-color); + background-color: var(--tl-color); + border-radius: 8px; + padding: 2px 16px; +} +.auth_clientbox .accountbox{ + width: calc(100% - 32px); + height: fit-content; + margin: 16px; +} +.auth_clientbox .accountbox .flexbox{ + margin: 0px; + display: flex; + width: 100%; + height: fit-content; +} +.auth_clientbox .accountbox .flexbox img{ + width: 32px; + height: 32px; + object-fit: cover; + border-radius: 16px; +} +.auth_clientbox .accountbox .flexbox p{ + width: calc(100% - 8px); + margin: auto auto auto 8px; + font-weight: normal; + font-size: 16px; + line-height: 16px; + color: var(--text-color); +} +.auth_clientbox .callbackbox{ + width: calc(100% - 32px); + height: fit-content; + margin: 16px; +} +.auth_clientbox .callbackbox p{ + font-family: var(--Mono-fonts), sans-serif; + font-weight: normal; + font-size: 14px; + line-height: 14px; + color: var(--text-color); +} /*------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------スマホ向け--------------------------------------------------*/ /*--------------------------------------------------ここから--------------------------------------------------*/ /*------------------------------------------------------------------------------------------------------------*/ -@media screen and (min-width:768px) and ( max-width:1024px) { - .rightbox{ +@media screen and (min-width:768px) and (max-width:1024px) { + .rightbox { display: none; } - main{ + + main { margin-right: 0px; width: 72%; } - .userleftbox{ + + .userleftbox { padding: 16px; width: 28%; } } + @media screen and (max-width:768px) { - body{ + body { width: 100%; display: block; border: none; @@ -5922,91 +6472,94 @@ noscript .noscript_modal .inner .center_text p{ padding-top: 0px; } - .userleftbox{ + .userleftbox { display: none; } - .userheader .icon{ + .userheader .icon { margin-left: 12px; margin-right: 12px; display: block; width: auto; } - .userheader .roleboxes{ + .userheader .roleboxes { margin-left: 6px; margin-right: 6px; display: flex; padding: 0px; - flex-wrap : wrap; + flex-wrap: wrap; } - .userheader .icon{ + .userheader .icon { margin-right: 24px; } - .userheader .icon h2{ + + .userheader .icon h2 { word-wrap: break-word; - margin-left:0px; + margin-left: 0px; display: flex; padding: 0px; - flex-wrap : wrap; + flex-wrap: wrap; } - .userheader .icon p{ + .userheader .icon p { word-wrap: break-word; margin-top: 12px; - margin-left:0px; + margin-left: 0px; display: flex; padding: 0px; - flex-wrap : wrap; + flex-wrap: wrap; } - .userheader .profile p{ + .userheader .profile p { margin-left: 12px; margin-right: 12px; } - .fzone{ + .fzone { margin-left: 12px; margin-right: 12px; justify-content: flex-end } - .fzone .time{ + .fzone .time { display: none; } - .sp_time_area{ + .sp_time_area { display: block; margin-left: 24px; - margin-right:24px; + margin-right: 24px; } - .sp_time_area .time{ + .sp_time_area .time { margin-top: auto; margin-bottom: 24px; margin-left: 0px; margin-right: auto; } - .sp_time_area .time p{ + + .sp_time_area .time p { margin-top: 0px; margin-bottom: 0px; margin-right: 32px; text-align: left; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } - .sp_time_area .time a{ + + .sp_time_area .time a { margin-top: 0px; margin-bottom: 0px; text-align: left; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } - main{ + main { height: 94dvh; overflow: auto; border-radius: 0px; @@ -6015,67 +6568,68 @@ noscript .noscript_modal .inner .center_text p{ margin-right: 0px; width: auto; background-color: var(--tl-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); border: none; } - main h1{ - color:var(--text-color); + main h1 { + color: var(--text-color); font-size: 32px; font-family: var(--Head-fonts), sans-serif; } - .fzone .follow_yes p{ + .fzone .follow_yes p { margin-top: 10px; margin-bottom: 10px; margin-left: 6px; margin-right: 6px; } - .sendbox{ + .sendbox { padding-left: 12px; padding-right: 12px; padding-top: 12px; padding-bottom: 12px; } - .sendbox .fx img{ + .sendbox .fx img { object-fit: cover; margin-left: -12px; text-align: center; width: 58px; - height:58px; + height: 58px; border-radius: 50%; } - .sendbox p{ - line-height:20px; + .sendbox p { + line-height: 20px; text-align: left; margin-top: 12px; margin-bottom: 12px; font-size: 14px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } - .sendbox .fxbox{ + .sendbox .fxbox { display: flex; } - .sendbox label > input { - display:none; /* アップロードボタンのスタイルを無効にする */ + .sendbox label>input { + display: none; + /* アップロードボタンのスタイルを無効にする */ } - .sendbox label{ + .sendbox label { cursor: pointer; border: none; display: block; width: 24px; height: 24px; padding: 6px 6px; - + margin-left: 0px; margin-right: 12px; @@ -6086,50 +6640,57 @@ noscript .noscript_modal .inner .center_text p{ background-color: var(--main-color); text-align: center; } - .sendbox label img{ - vertical-align:bottom; + + .sendbox label img { + vertical-align: bottom; width: 24px; } - .sendbox .fxbox p{ - line-height:20px; + + .sendbox .fxbox p { + line-height: 20px; text-align: left; margin-top: auto; margin-bottom: auto; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } - .sendbox .emoji_picker .emoji_picker_flex{ + + .sendbox .emoji_picker .emoji_picker_flex { justify-content: space-between; } - .sendbox .emoji_picker .emoji_picker_flex .one_emoji{ + + .sendbox .emoji_picker .emoji_picker_flex .one_emoji { margin: 6px; width: 40px; height: 40px; } - .sendbox .emoji_picker .emoji_picker_flex .one_emoji img{ + + .sendbox .emoji_picker .emoji_picker_flex .one_emoji img { margin: 3px; width: 34px; height: 34px; } - .ueusebtn{ - width:30%; - } - .ueusebtn:hover{ - width:31%; - } - .ueusebtn:active{ - width:29%; + .ueusebtn { + width: 30%; } - .rightbox{ + .ueusebtn:hover { + width: 31%; + } + + .ueusebtn:active { + width: 29%; + } + + .rightbox { display: none; } - .botbox{ + .botbox { display: block; margin-bottom: 0px; margin-top: 0px; @@ -6144,7 +6705,7 @@ noscript .noscript_modal .inner .center_text p{ height: 6dvh; } - .botbox .lbtnzone{ + .botbox .lbtnzone { display: flex; width: 100%; margin-top: 0px; @@ -6153,12 +6714,12 @@ noscript .noscript_modal .inner .center_text p{ margin-bottom: 0px; } - - .btmbutton{ + + .btmbutton { cursor: pointer; border: none; display: block; - width:25%; + width: 25%; margin: 16px; padding: 8px auto; height: auto; @@ -6171,25 +6732,27 @@ noscript .noscript_modal .inner .center_text p{ padding-bottom: 0.5dvh; border-radius: 0px; - color:var(--main-color); + color: var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; - box-shadow:none; + box-shadow: none; border: none; } - .btmbutton:hover{ + + .btmbutton:hover { background-color: var(--background-color); color: var(--main-color); - box-shadow:none; + box-shadow: none; } - .btmbutton:active svg{ - box-shadow:none; + + .btmbutton:active svg { + box-shadow: none; margin-left: auto; margin-right: auto; margin-top: auto; @@ -6198,6 +6761,7 @@ noscript .noscript_modal .inner .center_text p{ width: 4.7dvh; height: 4.7dvh; } + svg { width: 5dvh; height: 5dvh; @@ -6209,32 +6773,37 @@ noscript .noscript_modal .inner .center_text p{ transition: all 250ms ease-out; } - .irobutton{ + .irobutton { padding: 8px 5%; } - .irobutton:hover{ + + .irobutton:hover { padding: 8px 6%; } - .irobutton:active{ - padding: 8px 4%; - } - .sirobutton{ - padding: 8px 5%; - } - .sirobutton:hover{ - padding: 8px 6%; - } - .sirobutton:active{ + + .irobutton:active { padding: 8px 4%; } - .ueuse .favbox img{ + .sirobutton { + padding: 8px 5%; + } + + .sirobutton:hover { + padding: 8px 6%; + } + + .sirobutton:active { + padding: 8px 4%; + } + + .ueuse .favbox img { width: 24px; height: 24px; } - .ueuse .favbox .favbtn{ - width:auto; + .ueuse .favbox .favbtn { + width: auto; margin-left: 0px; margin-right: 12px; margin-top: 2px; @@ -6254,6 +6823,7 @@ noscript .noscript_modal .inner .center_text p{ fill: currentColor; transition: all 250ms ease-out; } + .ueuse .favbox .favbtn_after svg { margin-top: -4px; margin-right: 4px; @@ -6263,8 +6833,8 @@ noscript .noscript_modal .inner .center_text p{ transition: all 250ms ease-out; } - .ueuse .favbox .tuduki{ - width:auto; + .ueuse .favbox .tuduki { + width: auto; margin-left: 0px; margin-right: 12px; margin-top: 2px; @@ -6275,6 +6845,7 @@ noscript .noscript_modal .inner .center_text p{ padding-left: 8px; padding-right: 8px; } + .ueuse .favbox .tuduki svg { margin-top: -8px; margin-right: 4px; @@ -6284,8 +6855,8 @@ noscript .noscript_modal .inner .center_text p{ transition: all 250ms ease-out; } - .ueuse .favbox .delbtn{ - width:60px; + .ueuse .favbox .delbtn { + width: 60px; margin-left: 6px; margin-right: 0px; margin-top: 2px; @@ -6295,8 +6866,9 @@ noscript .noscript_modal .inner .center_text p{ padding-left: 2px; padding-right: 2px; } - .ueuse .favbox .addabi{ - width:auto; + + .ueuse .favbox .addabi { + width: auto; margin-left: 6px; margin-right: 6px; margin-top: 2px; @@ -6306,6 +6878,7 @@ noscript .noscript_modal .inner .center_text p{ padding-left: 8px; padding-right: 8px; } + .ueuse .favbox .addabi svg { margin-top: -8px; margin-right: 0px; @@ -6316,8 +6889,8 @@ noscript .noscript_modal .inner .center_text p{ transition: all 250ms ease-out; } - .ueuse .favbox .share{ - width:auto; + .ueuse .favbox .share { + width: auto; margin-left: auto; margin-right: 6px; margin-top: 2px; @@ -6328,8 +6901,8 @@ noscript .noscript_modal .inner .center_text p{ padding-right: 8px; } - .ueuse .favbox .bookmark{ - width:auto; + .ueuse .favbox .bookmark { + width: auto; margin-left: auto; margin-right: 6px; margin-top: 2px; @@ -6339,7 +6912,8 @@ noscript .noscript_modal .inner .center_text p{ padding-left: 8px; padding-right: 8px; } - .ueuse{ + + .ueuse { animation: slideInY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; margin: 0px; border-radius: 0px; @@ -6351,7 +6925,7 @@ noscript .noscript_modal .inner .center_text p{ width: auto; } - .ueuse .flebox{ + .ueuse .flebox { display: flex; flex-wrap: wrap; } @@ -6368,25 +6942,27 @@ noscript .noscript_modal .inner .center_text p{ font-weight: bold; } - .ueuse .flebox .time{ + .ueuse .flebox .time { margin-top: 6px; margin-bottom: 6px; margin-left: auto; margin-right: 12px; text-align: right; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } - .ueuse .headbox{ + .ueuse .headbox { margin-bottom: 12px; } - .ueuse .headbox a{ + + .ueuse .headbox a { margin: 0px; padding: 0px; } - .ueuse .headbox img{ + + .ueuse .headbox img { margin-left: auto; margin-right: auto; margin-top: 0px; @@ -6394,23 +6970,28 @@ noscript .noscript_modal .inner .center_text p{ width: 100%; height: 74px; } - .ueuse .profilebox p{ + + .ueuse .profilebox p { margin-left: 12px; margin-right: 12px; } - .ueuse .flebox .user{ + + .ueuse .flebox .user { margin-top: -12px; } - .ueuse .flebox .user img{ + + .ueuse .flebox .user img { margin-left: 12px; } + .ueuse .flebox .user a { margin-left: 0px; } - .ueuse .flebox .user .bot{ + + .ueuse .flebox .user .bot { margin-top: auto; margin-bottom: auto; - padding: 3px 8px; + padding: 3px 8px; margin-left: 6px; border-radius: 10px; font-family: var(--Mono-fonts), sans-serif; @@ -6418,8 +6999,8 @@ noscript .noscript_modal .inner .center_text p{ text-align: center; font-size: 12px; } - - .leftbox{ + + .leftbox { display: block; border-radius: 17px; margin-top: 12px; @@ -6431,31 +7012,33 @@ noscript .noscript_modal .inner .center_text p{ height: 100%; margin-left: 0px; padding: 32px; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); border: 1px solid var(--main-color); } - .leftbox h1{ + .leftbox h1 { font-family: var(--Head-fonts), sans-serif; margin-left: 20px; - color:var(--background-color); + color: var(--background-color); font-size: 32px; } - .leftbox .logo{ + + .leftbox .logo { display: flex; } - .leftbox .logo img{ + .leftbox .logo img { margin-left: auto; margin-right: auto; margin-top: 16px; width: 72%; - + } - .leftbox .logo p{ - color:var(--main-color); + + .leftbox .logo p { + color: var(--main-color); font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 32px; @@ -6464,23 +7047,25 @@ noscript .noscript_modal .inner .center_text p{ margin-bottom: -4px; } - .imgbtn{ - width:40%; - } - .imgbtn:hover{ - background-color: var(--main-color); - color: var(--sub-color); - width:35%; - } - .imgebtn:active{ - width:45%; + .imgbtn { + width: 40%; } - .imgbtn2{ + .imgbtn:hover { + background-color: var(--main-color); + color: var(--sub-color); + width: 35%; + } + + .imgebtn:active { + width: 45%; + } + + .imgbtn2 { cursor: pointer; border: none; display: block; - width:20%; + width: 20%; padding: 8px auto; margin-top: -64px; margin-left: 12px; @@ -6493,28 +7078,30 @@ noscript .noscript_modal .inner .center_text p{ background-color: var(--main-color); border-radius: 50px; - color:var(--sub-color); + color: var(--sub-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } - .imgbtn2:hover{ + + .imgbtn2:hover { background-color: var(--main-color); color: var(--sub-color); - width:19%; + width: 19%; } - .imgebtn2:active{ - width:21%; + + .imgebtn2:active { + width: 21%; } - + .topbox { position: absolute; - + top: 0; left: 0; width: 100%; @@ -6525,18 +7112,21 @@ noscript .noscript_modal .inner .center_text p{ margin-right: auto; } - .topbox .logo{ + .topbox .logo { width: 92%; } - .topbox .logo img{ - margin-left: 0px; + + .topbox .logo img { margin-right: auto; - margin-top: 0px; + margin-left: 0px; + margin-top: 4px; + margin-bottom: 4px; width: fit-content; + height: 39px; } - .terms{ - overflow-wrap: break-word; + .terms { + overflow-wrap: break-word; margin-left: auto; margin-right: auto; width: 90%; @@ -6547,8 +7137,8 @@ noscript .noscript_modal .inner .center_text p{ background-color: transparent !important; } - .terms h1{ - line-height:52px; + .terms h1 { + line-height: 52px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 48px; @@ -6556,8 +7146,8 @@ noscript .noscript_modal .inner .center_text p{ color: var(--text-color); } - .terms h2{ - line-height:52px; + .terms h2 { + line-height: 52px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 48px; @@ -6565,8 +7155,8 @@ noscript .noscript_modal .inner .center_text p{ color: var(--text-color); } - .terms h3{ - line-height:36px; + .terms h3 { + line-height: 36px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 32px; @@ -6574,8 +7164,8 @@ noscript .noscript_modal .inner .center_text p{ color: var(--text-color); } - .terms h4{ - line-height:24px; + .terms h4 { + line-height: 24px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 24px; @@ -6583,10 +7173,10 @@ noscript .noscript_modal .inner .center_text p{ color: var(--text-color); } - .terms p{ + .terms p { margin-top: 2px; margin-bottom: 2px; - line-height:24px; + line-height: 24px; font-family: var(--Text-fonts), sans-serif; font-weight: normal; font-size: 16px; @@ -6594,7 +7184,7 @@ noscript .noscript_modal .inner .center_text p{ color: var(--text-color); } - .terms img{ + .terms img { object-fit: cover; width: auto; @@ -6606,14 +7196,14 @@ noscript .noscript_modal .inner .center_text p{ border-radius: 15px; } - .terms .code{ + .terms .code { background-color: var(--text-color); border-radius: 15px; padding: 12px; } - .terms .code p{ - line-height:24px; + .terms .code p { + line-height: 24px; margin-right: 12px; margin-left: 12px; font-family: var(--Text-fonts), sans-serif; @@ -6624,7 +7214,7 @@ noscript .noscript_modal .inner .center_text p{ } - .terms .p2c{ + .terms .p2c { margin-top: 0px; margin-bottom: 10px; text-align: left; @@ -6636,7 +7226,7 @@ noscript .noscript_modal .inner .center_text p{ font-weight: normal; } - .terms .p3{ + .terms .p3 { margin-top: 24px; text-align: left; word-wrap: break-word; @@ -6647,9 +7237,9 @@ noscript .noscript_modal .inner .center_text p{ font-weight: bold; } - .terms .err404 h1{ + .terms .err404 h1 { margin-top: 128px; - line-height:64px; + line-height: 64px; font-family: var(--Text-fonts), sans-serif; font-weight: bold; font-size: 64px; @@ -6657,19 +7247,7 @@ noscript .noscript_modal .inner .center_text p{ color: var(--text-color); } - .ueuse .flebox .bot{ - margin-top: auto; - margin-bottom: auto; - padding: 3px 8px; - margin-left: 6px; - border-radius: 10px; - font-family: var(--Mono-fonts), sans-serif; - font-weight: bold; - text-align: center; - font-size: 12px; - } - - .ueuse .photo1 img{ + .ueuse .photo1 img { object-fit: cover; border-radius: 10px; margin-top: 12px; @@ -6679,8 +7257,8 @@ noscript .noscript_modal .inner .center_text p{ height: auto; border: 1px solid var(--border-color); } - - .ueuse .photo2 a img{ + + .ueuse .photo2 a img { object-fit: cover; border-radius: 10px; margin-top: 12px; @@ -6691,7 +7269,7 @@ noscript .noscript_modal .inner .center_text p{ border: 1px solid var(--border-color); } - .ueuse .photo3 a img{ + .ueuse .photo3 a img { object-fit: cover; border-radius: 10px; margin-top: 12px; @@ -6701,7 +7279,8 @@ noscript .noscript_modal .inner .center_text p{ height: 20dvh; border: 1px solid var(--border-color); } - .ueuse .photo3_btm a img{ + + .ueuse .photo3_btm a img { object-fit: cover; border-radius: 10px; margin-top: 6px; @@ -6711,7 +7290,8 @@ noscript .noscript_modal .inner .center_text p{ height: 25dvh; border: 1px solid var(--border-color); } - .ueuse .photo4 a img{ + + .ueuse .photo4 a img { object-fit: cover; border-radius: 10px; margin-top: 8px; @@ -6721,8 +7301,8 @@ noscript .noscript_modal .inner .center_text p{ height: 20dvh; border: 1px solid var(--border-color); } - - .ueuse .video1 video{ + + .ueuse .video1 video { object-fit: cover; border-radius: 10px; margin-top: 12px; @@ -6734,179 +7314,182 @@ noscript .noscript_modal .inner .center_text p{ } - .notification .flebox a{ + .notification .flebox a { margin-top: auto; margin-bottom: auto; margin-left: 12px; font-size: 18px; - color:var(--text-color); - text-decoration: none; - font-family: var(--Text-fonts), sans-serif; - font-weight: bold; - } - - .notification .flebox .idbox{ - margin-top: auto; - margin-bottom: auto; - margin-left: 6px; - border-radius: 10px; - background-color: var(--background-color); - border: 1px solid var(--border-color); - } - .notification .flebox .idbox a{ - margin-top: 6px; - margin-bottom: 6px; - margin-left: 8px; - margin-right: 8px; - text-align: center; - font-size: 12px; - color:var(--subtext-color); - text-decoration: none; - font-family: var(--Text-fonts), sans-serif; - } - - .notification p{ - line-height: 20px; - overflow-wrap: break-word; - margin-top: auto; - margin-bottom: auto; - margin-left: 0px; - font-size: 16px; - color:var(--text-color); - text-decoration: none; - font-family: var(--Text-fonts), sans-serif; - font-weight: bold; - } - - .notification h3{ - overflow-wrap: break-word; - margin-top: 12px; - margin-bottom: 6px; - margin-left: 0px; - font-size: 18px; - color:var(--text-color); - text-decoration: none; - font-family: var(--Text-fonts), sans-serif; - font-weight: bold; - } - - - .notification .flebox .time{ - margin-top: auto; - margin-bottom: auto; - margin-left: auto; - margin-right: 0px; - text-align: right; - font-size: 12px; - color:var(--subtext-color); - font-family: var(--Text-fonts), sans-serif; - } - - .notification a{ - overflow-wrap: break-word; - margin-top: 32px; - margin-bottom: auto; - margin-left: 0px; - font-size: 16px; - color:var(--link-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } - .notification2 .flebox a{ - margin-top: auto; - margin-bottom: auto; - margin-left: 12px; - font-size: 18px; - color:var(--text-color); - text-decoration: none; - font-family: var(--Text-fonts), sans-serif; - font-weight: bold; - } - - .notification2 .flebox .idbox{ + .notification .flebox .idbox { margin-top: auto; margin-bottom: auto; margin-left: 6px; - border-radius: 10px; + border-radius: 16px; background-color: var(--background-color); border: 1px solid var(--border-color); } - .notification2 .flebox .idbox a{ + + .notification .flebox .idbox a { margin-top: 6px; margin-bottom: 6px; margin-left: 8px; margin-right: 8px; text-align: center; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; } - - .notification2 p{ + + .notification p { line-height: 20px; - overflow-wrap: break-word; + overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; margin-left: 0px; font-size: 16px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } - - .notification2 h3{ - overflow-wrap: break-word; + + .notification h3 { + overflow-wrap: break-word; margin-top: 12px; margin-bottom: 6px; margin-left: 0px; font-size: 18px; - color:var(--text-color); + color: var(--text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } - - - .notification2 .flebox .time{ + + + .notification .flebox .time { margin-top: auto; margin-bottom: auto; margin-left: auto; margin-right: 0px; text-align: right; font-size: 12px; - color:var(--subtext-color); + color: var(--subtext-color); font-family: var(--Text-fonts), sans-serif; } - - .notification2 a{ - overflow-wrap: break-word; + + .notification a { + overflow-wrap: break-word; margin-top: 32px; margin-bottom: auto; margin-left: 0px; font-size: 16px; - color:var(--link-color); + color: var(--link-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } - - .modal{ - top:0; + + .notification2 .flebox a { + margin-top: auto; + margin-bottom: auto; + margin-left: 12px; + font-size: 18px; + color: var(--text-color); + text-decoration: none; + font-family: var(--Text-fonts), sans-serif; + font-weight: bold; + } + + .notification2 .flebox .idbox { + margin-top: auto; + margin-bottom: auto; + margin-left: 6px; + border-radius: 16px; + background-color: var(--background-color); + border: 1px solid var(--border-color); + } + + .notification2 .flebox .idbox a { + margin-top: 6px; + margin-bottom: 6px; + margin-left: 8px; + margin-right: 8px; + text-align: center; + font-size: 12px; + color: var(--subtext-color); + text-decoration: none; + font-family: var(--Text-fonts), sans-serif; + } + + .notification2 p { + line-height: 20px; + overflow-wrap: break-word; + margin-top: auto; + margin-bottom: auto; + margin-left: 0px; + font-size: 16px; + color: var(--text-color); + text-decoration: none; + font-family: var(--Text-fonts), sans-serif; + font-weight: bold; + } + + .notification2 h3 { + overflow-wrap: break-word; + margin-top: 12px; + margin-bottom: 6px; + margin-left: 0px; + font-size: 18px; + color: var(--text-color); + text-decoration: none; + font-family: var(--Text-fonts), sans-serif; + font-weight: bold; + } + + + .notification2 .flebox .time { + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + margin-right: 0px; + text-align: right; + font-size: 12px; + color: var(--subtext-color); + font-family: var(--Text-fonts), sans-serif; + } + + .notification2 a { + overflow-wrap: break-word; + margin-top: 32px; + margin-bottom: auto; + margin-left: 0px; + font-size: 16px; + color: var(--link-color); + text-decoration: none; + font-family: var(--Text-fonts), sans-serif; + font-weight: bold; + } + + .modal { + top: 0; left: 0; bottom: 0; width: 100%; height: 100dvh; background-color: rgba(0, 0, 0, 0.25); backdrop-filter: blur(4px); - z-index: 9999; + z-index: 10000; margin-bottom: 0px; } + .modal-content { - margin-top:35dvh; + margin-top: 35dvh; width: calc(100% - 48px); margin-bottom: 0px; height: 60dvh; @@ -6919,15 +7502,15 @@ noscript .noscript_modal .inner .center_text p{ animation: SlideUp .5s ease-in-out forwards; } - .modal-content textarea{ + .modal-content textarea { text-align: left; - width:100%; - height:90px; + width: 100%; + height: 90px; border-radius: 12px; font-size: 16px; } - .modal-content .btn_area{ + .modal-content .btn_area { display: flex; width: 100%; margin-top: 12px; @@ -6936,11 +7519,11 @@ noscript .noscript_modal .inner .center_text p{ margin-bottom: 48px } - .modal-content .fbtn{ + .modal-content .fbtn { cursor: pointer; border: none; display: block; - width:48%; + width: 48%; padding: 8px auto; margin-left: auto; margin-right: 0px; @@ -6951,24 +7534,26 @@ noscript .noscript_modal .inner .center_text p{ font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } - .modal-content .fbtn:hover{ - width:50%; - } - .modal-content .fbtn:active{ - width:45%; + + .modal-content .fbtn:hover { + width: 50%; } - .modal-content .fbtn_no{ + .modal-content .fbtn:active { + width: 45%; + } + + .modal-content .fbtn_no { cursor: pointer; border: none; display: block; - width:48%; + width: 48%; padding: 8px auto; margin-left: 0px; margin-right: auto; @@ -6979,56 +7564,65 @@ noscript .noscript_modal .inner .center_text p{ font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: center; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } - .modal-content .fbtn_no:hover{ - width:50%; + + .modal-content .fbtn_no:hover { + width: 50%; } - .modal-content .fbtn_no:active{ - width:45%; + + .modal-content .fbtn_no:active { + width: 45%; } .modal-content.slideUp { animation: SlideUp .3s ease-out forwards; - } + } + .modal-content.slideDown { animation: SlideDown .15s ease-in-out forwards; } - .modal-content .modal-follow-area{ + + .modal-content .modal-follow-area { max-height: 40dvh; } + /*下から上*/ @keyframes SlideUp { 0% { opacity: 0; transform: translate(-50%, -1%); } + 100% { opacity: 1; transform: translate(-50%, -40%); } } + /*上から下*/ @keyframes SlideDown { 0% { opacity: 1; transform: translate(-50%, -40%); } + 100% { opacity: 0; transform: translate(-50%, -1%); } } - .Image_modal{ + .Image_modal { -moz-box-sizing: border-box; box-sizing: border-box; height: 100dvh; } + .Image_modal .modal-content { padding: 0px; border-radius: 15px; @@ -7044,51 +7638,58 @@ noscript .noscript_modal .inner .center_text p{ margin: auto; margin-top: 0px; margin-bottom: 0px; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .15); overflow: hidden; } - .Image_modal .modal-content img{ + + .Image_modal .modal-content img { background: linear-gradient(45deg, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%), - 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; width: 100%; height: auto; margin: 0px; - vertical-align:top; + vertical-align: top; object-fit: contain; } + .Image_modal .modal-content.slideUp { animation: I-SlideUp .3s ease-out forwards; } + .Image_modal .modal-content.slideDown { animation: I-SlideDown .15s ease-in-out forwards; } + /*下から上*/ @keyframes I-SlideUp { 0% { opacity: 0; transform: translate(-50%, -1%); } + 100% { opacity: 1; transform: translate(-50%, calc(-50% - 6dvh)); } } + /*上から下*/ @keyframes I-SlideDown { 0% { opacity: 1; transform: translate(-50%, calc(-50% - 6dvh)); } + 100% { opacity: 0; transform: translate(-50%, -1%); } } - .tlchange{ + .tlchange { border-radius: 0px; margin: 0px; margin-top: 0px; @@ -7097,106 +7698,116 @@ noscript .noscript_modal .inner .center_text p{ text-align: center; display: flex; } - .tlchange .off{ + + .tlchange .off { width: 30%; line-height: 24px; margin-left: auto; margin-right: auto; - overflow-wrap: break-word; - margin-top: 12px; - margin-bottom: 12px; - } - .tlchange .on{ - width: 30%; - line-height: 24px; - margin-left: auto; - margin-right: auto; - overflow-wrap: break-word; + overflow-wrap: break-word; margin-top: 12px; margin-bottom: 12px; } - .hny{ + .tlchange .on { + width: 30%; + line-height: 24px; + margin-left: auto; + margin-right: auto; + overflow-wrap: break-word; + margin-top: 12px; + margin-bottom: 12px; + } + + .hny { border-radius: 10px; overflow: hidden; margin: 12px; border: 1px solid var(--border-color); } - .hny .top{ + + .hny .top { background-color: #CB4042; padding-left: 24px; padding-right: 24px; padding-top: 8px; padding-bottom: 8px; - color:#FCFAF2; + color: #FCFAF2; font-family: var(--Text-fonts), sans-serif; font-weight: bold; } - .hny .textmain{ + + .hny .textmain { background-color: #f5f4f0; padding-top: 8px; padding-bottom: 24px; padding-left: 24px; padding-right: 24px; } - .hny .textmain h1{ + + .hny .textmain h1 { background-color: transparent; text-align: left; - color:var(--text-color); + color: var(--text-color); font-family: var(--Text-fonts), sans-serif; - overflow-wrap:break-word; + overflow-wrap: break-word; font-size: 22px; line-height: 32px; padding: 0px; border-radius: 7px; } - .hny .textmain p{ + + .hny .textmain p { margin: 0px; text-align: left; - color:var(--text-color); + color: var(--text-color); font-family: var(--Text-fonts), sans-serif; - overflow-wrap:break-word; + overflow-wrap: break-word; font-size: 16px; line-height: 22px; font-weight: bold; } - .hny .textmain .rp{ + + .hny .textmain .rp { margin-top: 6px; text-align: right; - color:var(--text-color); + color: var(--text-color); font-family: var(--Text-fonts), sans-serif; - overflow-wrap:break-word; + overflow-wrap: break-word; font-size: 14px; line-height: 22px; font-weight: normal; margin-bottom: 6px; } - - .formarea{ + + .formarea { padding-top: 16px; padding-bottom: 16px; padding-left: 32px; padding-right: 32px; border-radius: 0px; - box-shadow:none; + box-shadow: none; text-align: left; } - .admin_settings{ + .admin_settings { display: block; } - .admin_settings .admin_right{ + + .admin_settings .admin_right { width: 100%; } - .admin_settings .admin_left{ + + .admin_settings .admin_left { background-color: var(--background-color); - position:relative; + position: relative; width: 100%; height: auto; padding: 0px; border-right: 1px solid var(--border-color); } - .admin_leftbtn{ + + .admin_leftbtn { cursor: pointer; border: none; display: block; @@ -7205,58 +7816,63 @@ noscript .noscript_modal .inner .center_text p{ padding: 8px auto; margin-left: auto; margin-right: auto; - + padding-left: 12px; padding-top: 4px; padding-bottom: 4px; - - + + background-color: var(--background-color); - + border-radius: 50px; - color:var(--main-color); + color: var(--main-color); font-size: 18px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + text-decoration: none; text-align: left; transition: box-shadow 250ms ease-in-out; transition: width 250ms ease-out; transition: all 250ms ease-out; } - .admin_leftbtn:hover{ + + .admin_leftbtn:hover { background-color: var(--main-color); color: var(--sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); width: calc(100% - 24px); } - .admin_leftbtn:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + + .admin_leftbtn:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); width: calc(100% - 64px); } - .bot_menu_area{ + .bot_menu_area { margin-bottom: 16px; display: flex; - flex-wrap : wrap; + flex-wrap: wrap; width: 100%; } - .menubutton{ + + .menubutton { display: block; background-color: var(--background-color); color: var(--main-color); border-radius: 10px; width: 25%; height: 10dvh; - padding:0px; + padding: 0px; text-align: center; transition: all 250ms ease-out; text-decoration: none; } - .menubutton:hover{ + + .menubutton:hover { background-color: var(--sub-color); color: var(--main-color); } + .menubutton svg { width: 40%; height: 40%; @@ -7267,7 +7883,8 @@ noscript .noscript_modal .inner .center_text p{ vertical-align: middle; fill: currentColor; } - .menubutton div{ + + .menubutton div { font-family: var(--Text-fonts), sans-serif; word-wrap: break-word; font-size: 12px; @@ -7276,42 +7893,49 @@ noscript .noscript_modal .inner .center_text p{ text-align: center; margin-bottom: 15%; } - .offline{ - margin-top: 12px; - } - .online{ + + .offline { margin-top: 12px; } - .servericon{ + .online { + margin-top: 12px; + } + + .servericon { text-align: center; } - .servericon .up{ + + .servericon .up { margin-top: -74px; } - .servericon img{ + + .servericon img { object-fit: cover; width: 100px; height: 100px; border-radius: 15px; - box-shadow:0 0px 0px 0 rgba(0, 0, 0, .0); + box-shadow: 0 0px 0px 0 rgba(0, 0, 0, .0); margin: 0px; } - .serverhead{ + .serverhead { text-align: center; } - .serverhead img{ + + .serverhead img { object-fit: cover; width: 100%; height: 140px; border-radius: 10px; margin: 0px; } - .serverhead_set{ + + .serverhead_set { text-align: center; } - .serverhead_set img{ + + .serverhead_set img { object-fit: cover; width: 100%; height: 160px; @@ -7319,43 +7943,50 @@ noscript .noscript_modal .inner .center_text p{ margin: 0px; } - noscript .noscript_modal{ + noscript .noscript_modal { border-radius: 15px; max-width: 90%; max-height: 90dvh; overflow: scroll; } - noscript .noscript_modal .inner{ + + noscript .noscript_modal .inner { margin: 24px; } - noscript .noscript_modal .inner .oops_icon{ + + noscript .noscript_modal .inner .oops_icon { margin-top: 12px; font-size: 48px; } - noscript .noscript_modal .inner h1{ + + noscript .noscript_modal .inner h1 { line-height: 24px; font-size: 24px; } - noscript .noscript_modal .inner p{ + + noscript .noscript_modal .inner p { line-height: 16px; font-size: 14px; text-align: left; } - noscript .noscript_modal .inner .center_text{ + + noscript .noscript_modal .inner .center_text { margin-top: 12px; display: block; } - noscript .noscript_modal .inner .center_text p{ + + noscript .noscript_modal .inner .center_text p { line-height: 14px; font-size: 12px; } - .emojizone{ + .emojizone { display: block; padding: 0px; } - .emjtex{ + + .emjtex { width: auto; margin: 0px; border: none; @@ -7363,15 +7994,17 @@ noscript .noscript_modal .inner .center_text p{ box-shadow: 0 1px 0 var(--border-color); border-radius: 0px; } - .emjtex .fx{ + + .emjtex .fx { display: block; } - .emojizone .tokonone{ + + .emojizone .tokonone { width: auto; height: fit-content; } - .tutorial_background .tutorial_modal{ + .tutorial_background .tutorial_modal { padding: 0px; border-radius: 0px; width: 100%; @@ -7383,35 +8016,42 @@ noscript .noscript_modal .inner .center_text p{ bottom: 0; left: 0; } - .tutorial_background .tutorial_modal .tutorial{ + + .tutorial_background .tutorial_modal .tutorial { margin: 64px 32px; height: calc(100% - 128px); width: calc(100% - 64px); } - .tutorial_background .tutorial_modal .tutorial .page h1{ + + .tutorial_background .tutorial_modal .tutorial .page h1 { line-height: 32px; font-size: 28px; } - .tutorial_background .tutorial_modal .tutorial .page h2{ + + .tutorial_background .tutorial_modal .tutorial .page h2 { line-height: 28px; font-size: 22px; } - .tutorial_background .tutorial_modal .tutorial .page p{ + + .tutorial_background .tutorial_modal .tutorial .page p { line-height: 20px; font-size: 18px; } - .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn{ - width:30%; + + .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn { + width: 30%; padding: 4px 8px; margin-left: 12px; margin-right: 0px; font-size: 22px; } - .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:hover{ - width:31%; + + .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:hover { + width: 31%; } - .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:active{ - width:29%; + + .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:active { + width: 29%; } } @@ -7427,374 +8067,420 @@ noscript .noscript_modal .inner .center_text p{ background: var(--main-color); } - body{ + body { background-color: var(--dark-background-color); } - - .sirobutton{ + + .sirobutton { background-color: var(--dark-background-color); - color:var(--main-color); + color: var(--main-color); border: solid 1px var(--dark-border-color); } - .errmsg{ + .errmsg { background-color: color-mix(in srgb, var(--dark-sub-color) 90%, var(--error)); - color:var(--error); + color: var(--error); border: 1px solid var(--error); } - .rolebox{ + + .rolebox { background-color: var(--dark-background-color); border: 1px solid var(--main-color); } - .userleftbox{ + .userleftbox { background-color: transparent; border: none; } - .leftbutton{ + .leftbutton { background-color: transparent; - color:var(--sub-color); - } - .leftbutton:hover{ - background-color: var(--sub-color); - color: var(--dark-background-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - } - .leftbutton:active{ - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05); + color: var(--sub-color); } - main{ + .leftbutton:hover { + background-color: var(--sub-color); + color: var(--dark-background-color); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); + } + + .leftbutton:active { + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .05); + } + + main { background-color: var(--dark-sub-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .025); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .025); border: 1px solid var(--dark-border-color); } - - main h1{ - color:var(--sub-color); + + main h1 { + color: var(--sub-color); font-size: 32px; font-family: var(--Head-fonts), sans-serif; } - .ueuse{ + .ueuse { background-color: var(--dark-sub-color); box-shadow: 0 -1px 0 var(--dark-border-color); border-bottom: 1px solid var(--dark-border-color); } - .ueuse .flebox a{ - color:var(--sub-color); + + .ueuse .flebox a { + color: var(--sub-color); } - .ueuse .flebox .idbox{ + .ueuse .flebox .idbox { background-color: #302c2c; border: none; } - .ueuse .flebox .idbox a{ - color:var(--dark-subtext-color); + + .ueuse .flebox .idbox a { + color: var(--dark-subtext-color); } - .ueuse .flebox .bot{ + .ueuse .flebox .bot { background-color: #302c2c; border: none; - color:var(--main-color); + color: var(--main-color); } - - .ueuse p{ - color:var(--background-color); + + .ueuse p { + color: var(--background-color); } - .ru a p{ - color:var(--background-color); + + .ru a p { + color: var(--background-color); } - .ueuse .inline{ + + .ueuse .inline { background-color: #323232; color: #F5F5F5; } - - .ueuse .quote{ - color:var(--dark-text-color); + + .ueuse .quote { + color: var(--dark-text-color); } - .ueuse .blur{ + + .ueuse .blur { background-color: #DDDDDD; - color: #DDDDDD; + color: transparent; } - .ueuse .blur:hover{ + + .ueuse .blur:hover { background-color: var(--dark-sub-color); color: var(--dark-text-color); } - .ueuse .unixtime{ + + .ueuse .unixtime { background-color: #323232; border: solid 1px #CCC; color: #F5F5F5; } - - - .ueuse h1{ - color:var(--background-color); + + + .ueuse h1 { + color: var(--background-color); } - - .ueuse h2{ - color:var(--background-color); + + .ueuse h2 { + color: var(--background-color); } - - .ueuse h3{ - color:var(--background-color); + + .ueuse h3 { + color: var(--background-color); } - - .ueuse center{ - color:var(--background-color); + + .ueuse center { + color: var(--background-color); } - - .ueuse a{ - color:var(--main-color); + + .ueuse a { + color: var(--main-color); } - - .ueuse .flebox .time{ - color:var(--dark-subtext-color); + + .ueuse .flebox .time { + color: var(--dark-subtext-color); } - - .ueuse .photo1 a img{ - border: 1px solid var(--dark-border-color); - } - - .ueuse .photo2 a img{ + + .ueuse .photo1 a img { border: 1px solid var(--dark-border-color); } - .ueuse .photo3 a img{ + .ueuse .photo2 a img { border: 1px solid var(--dark-border-color); } - .ueuse .photo4 a img{ + .ueuse .photo3 a img { border: 1px solid var(--dark-border-color); } - - .ueuse .video1 video{ + + .ueuse .photo4 a img { border: 1px solid var(--dark-border-color); } - - .ueuse .abi{ + + .ueuse .video1 video { + border: 1px solid var(--dark-border-color); + } + + .ueuse .abi { background-color: var(--dark-background-color); border: 1px solid var(--dark-border-color); } - .ueuse .abi p{ - color:var(--sub-color); + .ueuse .abi p { + color: var(--sub-color); } - - .ueuse .abi .back{ + + .ueuse .abi .back { background-color: var(--main-color); border: none; } - - .ueuse .abi .back h1{ - color:var(--text-color); - } - .ueuse .abi h1{ - color:var(--dark-text-color); + + .ueuse .abi .back h1 { + color: var(--text-color); } - .ueuse .abi h2{ - color:var(--dark-text-color); + + .ueuse .abi h1 { + color: var(--dark-text-color); } - .ueuse .abi h3{ - color:var(--dark-text-color); + + .ueuse .abi h2 { + color: var(--dark-text-color); } - .ueuse .abi .h3s{ - color:var(--dark-subtext-color); + + .ueuse .abi h3 { + color: var(--dark-text-color); } - .ueuse .favbox .favbtn{ + + .ueuse .abi .h3s { + color: var(--dark-subtext-color); + } + + .ueuse .favbox .favbtn { background-color: var(--dark-background-color); - color:var(--main-color); + color: var(--main-color); border: solid 1px var(--dark-border-color); } - .ueuse .favbox .favbtn:hover{ - background-color: var(--main-color); - color:var(--sub-color); - border: solid 1px var(--main-color); - } - .ueuse .favbox .favbtn_after{ - background-color: var(--main-color); - color:var(--sub-color); - border: solid 1px var(--main-color); - } - .ueuse .favbox .tuduki{ - background-color: var(--dark-background-color); - color:var(--main-color); - border: solid 1px var(--dark-border-color); - } - .ueuse .favbox .tuduki:hover{ - background-color: var(--main-color); - color:var(--sub-color); - border: solid 1px var(--main-color); - } - .ueuse .favbox .reuse{ - background-color: var(--dark-background-color); - color:var(--main-color); - border: solid 1px var(--dark-border-color); - } - .ueuse .favbox .reuse:hover{ - background-color: var(--main-color); - color:var(--sub-color); - border: solid 1px var(--main-color); - } - .ueuse .favbox .reuse_after{ - background-color: var(--main-color); - color:var(--sub-color); - border: solid 1px var(--main-color); - } - .ueuse .favbox .etcbtn{ - background-color: var(--dark-background-color); - color:var(--main-color); - border: solid 1px var(--dark-border-color); - } - - .ueuse .favbox .etcbtn:hover{ + + .ueuse .favbox .favbtn:hover { background-color: var(--main-color); color: var(--sub-color); border: solid 1px var(--main-color); } - .ueuse .favbox .delbtn{ + + .ueuse .favbox .favbtn_after { + background-color: var(--main-color); + color: var(--sub-color); + border: solid 1px var(--main-color); + } + + .ueuse .favbox .tuduki { background-color: var(--dark-background-color); - color:var(--error); + color: var(--main-color); border: solid 1px var(--dark-border-color); } - .ueuse .favbox .delbtn:hover{ + + .ueuse .favbox .tuduki:hover { + background-color: var(--main-color); + color: var(--sub-color); + border: solid 1px var(--main-color); + } + + .ueuse .favbox .reuse { + background-color: var(--dark-background-color); + color: var(--main-color); + border: solid 1px var(--dark-border-color); + } + + .ueuse .favbox .reuse:hover { + background-color: var(--main-color); + color: var(--sub-color); + border: solid 1px var(--main-color); + } + + .ueuse .favbox .reuse_after { + background-color: var(--main-color); + color: var(--sub-color); + border: solid 1px var(--main-color); + } + + .ueuse .favbox .etcbtn { + background-color: var(--dark-background-color); + color: var(--main-color); + border: solid 1px var(--dark-border-color); + } + + .ueuse .favbox .etcbtn:hover { + background-color: var(--main-color); + color: var(--sub-color); + border: solid 1px var(--main-color); + } + + .ueuse .favbox .delbtn { + background-color: var(--dark-background-color); + color: var(--error); + border: solid 1px var(--dark-border-color); + } + + .ueuse .favbox .delbtn:hover { background-color: var(--error); color: var(--background-color); border: solid 1px var(--error); } - .ueuse .favbox .addabi{ + + .ueuse .favbox .addabi { background-color: var(--dark-background-color); - color:var(--main-color); + color: var(--main-color); border: solid 1px var(--dark-border-color); } - .ueuse .favbox .addabi:hover{ + + .ueuse .favbox .addabi:hover { background-color: var(--main-color); - color: var(--sub-color);; + color: var(--sub-color); + ; border: solid 1px var(--main-color); } - .ueuse .favbox .share{ + + .ueuse .favbox .share { background-color: var(--dark-background-color); - color:var(--main-color); + color: var(--main-color); border: solid 1px var(--dark-border-color); } - .ueuse .favbox .share:hover{ + + .ueuse .favbox .share:hover { background-color: var(--main-color); - color: var(--sub-color);; + color: var(--sub-color); + ; border: solid 1px var(--main-color); } - .ueuse .favbox .bookmark{ + + .ueuse .favbox .bookmark { background-color: var(--dark-background-color); - color:var(--main-color); + color: var(--main-color); border: solid 1px var(--dark-border-color); } - .ueuse .favbox .bookmark:hover{ + + .ueuse .favbox .bookmark:hover { background-color: var(--main-color); - color: var(--sub-color);; + color: var(--sub-color); + ; border: solid 1px var(--main-color); } - .ueuse .favbox .bookmark_after{ + + .ueuse .favbox .bookmark_after { background-color: var(--main-color); color: var(--sub-color); border: solid 1px var(--main-color); } - .ueuse hr{ + .ueuse hr { border-top: 1px solid var(--dark-border-color); } - .ueuse .nsfw{ + + .ueuse .nsfw { border: 1px solid var(--dark-border-color); background-color: var(--dark-background-color); } - .ueuse .nsfw_main{ + + .ueuse .nsfw_main { border: 1px solid var(--dark-border-color); } - .ueuse .profilebox p{ - color:var(--dark-text-color); - } - .ueuse .flebox .user a{ - color:var(--sub-color); + .ueuse .profilebox p { + color: var(--dark-text-color); } - .ueuse .flebox .user .idbox{ + .ueuse .flebox .user a { + color: var(--sub-color); + } + + .ueuse .flebox .user .idbox { background-color: #302c2c; border: none; } - .ueuse .flebox .user .idbox a{ - color:var(--dark-subtext-color); - } - .ueuse .flebox .user .bot{ - background-color: #302c2c; - border: none; - color:var(--main-color); - } - - .ueuse .reuse_box{ - background-color: var(--dark-background-color); - border: 1px solid var(--dark-border-color); - } - .ueuse .reuse_box .reuse_flebox a { - color:var(--sub-color); - } - .ueuse .reuse_box .reuse_flebox .idbox{ - background-color: #302c2c; - border: none; - } - .ueuse .reuse_box .nsfw{ - border: none; - background-color: var(--dark-sub-color); - } - .ueuse .youtube_and_nicovideo_player iframe{ - border: 1px solid var(--dark-border-color); - } - - .userheader h2{ - color:var(--sub-color); - } - - .userheader p{ + .ueuse .flebox .user .idbox a { color: var(--dark-subtext-color); } - .userheader span{ + .ueuse .flebox .user .bot { + background-color: #302c2c; + border: none; + color: var(--main-color); + } + + .ueuse .reuse_box { + background-color: var(--dark-background-color); + border: 1px solid var(--dark-border-color); + } + + .ueuse .reuse_box .reuse_flebox a { + color: var(--sub-color); + } + + .ueuse .reuse_box .reuse_flebox .idbox { + background-color: #302c2c; + border: none; + } + + .ueuse .reuse_box .nsfw { + border: none; + background-color: var(--dark-sub-color); + } + + .ueuse .youtube_and_nicovideo_player iframe { + border: 1px solid var(--dark-border-color); + } + + .userheader h2 { + color: var(--sub-color); + } + + .userheader p { + color: var(--dark-subtext-color); + } + + .userheader span { color: var(--subtext-color); } - - .userheader .profile p{ - color:var(--sub-color); + + .userheader .profile p { + color: var(--sub-color); } - - .userheader .rolebox{ + + .userheader .rolebox { background-color: var(--dark-sub-color); border: 1px solid var(--main-color); } - - .fzone .follow .fbtn{ - background-color: var(--main-color); - color:var(--sub-color); - } - .fzone .follow .fbtn:hover{ + + .fzone .follow .fbtn { background-color: var(--main-color); color: var(--sub-color); } - .fzone .follow .fbtn_no{ + .fzone .follow .fbtn:hover { + background-color: var(--main-color); + color: var(--sub-color); + } + + .fzone .follow .fbtn_no { background-color: var(--dark-sub-color); - color:var(--main-color); + color: var(--main-color); border: 1px solid var(--main-color); } - .fzone .follow .fbtn_no:hover{ + + .fzone .follow .fbtn_no:hover { background-color: var(--dark-sub-color); color: var(--main-color); } - .fzone .follow .fbtn_un{ + + .fzone .follow .fbtn_un { cursor: pointer; border: none; display: block; - width:120px; + width: 120px; padding: 8px auto; margin-left: auto; @@ -7809,45 +8495,51 @@ noscript .noscript_modal .inner .center_text p{ background-color: var(--dark-sub-color); border-radius: 50px; - color:var(--main-color); + color: var(--main-color); border: 1px solid var(--main-color); font-size: 16px; font-family: var(--Head-fonts), sans-serif; font-weight: normal; - text-decoration:none; + 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{ + + .fzone .follow .fbtn_un:hover { background-color: var(--dark-sub-color); color: var(--dark-text-color); - width:125px; - } - .fzone .follow .fbtn_un:active{ - width:115px; + width: 125px; } - .fzone .time p{ - color:var(--dark-subtext-color); + .fzone .follow .fbtn_un:active { + width: 115px; } - .fzone .time a{ - color:var(--dark-subtext-color); + + .fzone .time p { + color: var(--dark-subtext-color); } - .fzone .follow_yes{ + + .fzone .time a { + color: var(--dark-subtext-color); + } + + .fzone .follow_yes { background-color: var(--dark-sub-color); } - .fzone .follow_yes p{ - color:var(--sub-color); + + .fzone .follow_yes p { + color: var(--sub-color); } - - .fzone .follow .report{ + + .fzone .follow .report { background-color: var(--dark-background-color); - color:var(--main-color); + color: var(--main-color); border: 1px solid var(--main-color); } - .fzone .follow .report:hover{ + + .fzone .follow .report:hover { background-color: #302c2c; color: var(--error); border: 1px solid var(--error); @@ -7855,122 +8547,134 @@ noscript .noscript_modal .inner .center_text p{ - .rightbox{ + .rightbox { background-color: var(--dark-background-color); - border:none; + border: none; } - - .rightbox h1{ + + .rightbox h1 { color: var(--dark-subtext-color); } - .rightbox .noticebox{ + .rightbox .noticebox { background-color: var(--dark-sub-color); border: none; } - - .rightbox .noticebox h4{ + + .rightbox .noticebox h4 { color: var(--background-color); } - - .rightbox .noticebox p{ - color: var(--background-color); - } - .rightbox .noticebox a{ - color:var(--main-color); - } - .rightbox .noticebox .makeup p{ - color:var(--sub-color);; - } - - .rightbox .noticebox .makeup a{ - color:var(--main-color); - } - .rightbox .noticebox .time p{ - color:var(--dark-subtext-color); - } - .rightbox .btmbox h2{ - color: var(--dark-subtext-color); - } - - .rightbox .btmbox h3{ - color: var(--dark-subtext-color); - } - - .rightbox .btmbox p{ + .rightbox .noticebox p { color: var(--background-color); } - - .rightbox .btmbox a{ - color:var(--main-color); + + .rightbox .noticebox a { + color: var(--main-color); } - .send_progress{ + .rightbox .noticebox .makeup p { + color: var(--sub-color); + ; + } + + .rightbox .noticebox .makeup a { + color: var(--main-color); + } + + .rightbox .noticebox .time p { + color: var(--dark-subtext-color); + } + + .rightbox .btmbox h2 { + color: var(--dark-subtext-color); + } + + .rightbox .btmbox h3 { + color: var(--dark-subtext-color); + } + + .rightbox .btmbox p { + color: var(--background-color); + } + + .rightbox .btmbox a { + color: var(--main-color); + } + + .send_progress { box-shadow: 0 -1px 0 var(--dark-border-color); } - .sendbox{ + .sendbox { border-top: solid 1px var(--dark-border-color); background-color: var(--dark-sub-color); box-shadow: 0 1px 0 var(--dark-border-color); } - - .sendbox p{ - color: var(--background-color);; - } - - .sendbox textarea{ - background-color: var(--dark-sub-color); - color:var(--dark-subtext-color); - } - .sendbox .fxbox p{ - color:var(--sub-color); + + .sendbox p { + color: var(--background-color); + ; } - .sendbox .emoji_picker{ + .sendbox textarea { + background-color: var(--dark-sub-color); + color: var(--dark-subtext-color); + } + + .sendbox .fxbox p { + color: var(--sub-color); + } + + .sendbox .emoji_picker { background-color: var(--dark-background-color); border: solid 1px var(--dark-border-color); } - .sendbox .emoji_picker p{ + + .sendbox .emoji_picker p { color: var(--dark-subtext-color); } - .sendbox .emoji_picker .emoji_picker_flex .one_emoji{ + + .sendbox .emoji_picker .emoji_picker_flex .one_emoji { background-color: var(--dark-background-color); } - .sendbox .emoji_picker .emoji_picker_flex .one_emoji:hover{ + + .sendbox .emoji_picker .emoji_picker_flex .one_emoji:hover { background-color: color-mix(in srgb, var(--dark-background-color) 95%, #FFF); } - .sendbox .emoji_picker .tokonone p{ - color:var(--dark-text-color); - } - .sendbox .harmful_notice{ - background-color: color-mix(in srgb, var(--dark-sub-color) 90%, var(--warn)); - border: 1px solid var(--warn); - } - .sendbox .harmful_notice p{ + .sendbox .emoji_picker .tokonone p { color: var(--dark-text-color); } - .emjtex{ + .sendbox .harmful_notice { + background-color: color-mix(in srgb, var(--dark-sub-color) 90%, var(--warn)); + border: 1px solid var(--warn); + } + + .sendbox .harmful_notice p { + color: var(--dark-text-color); + } + + .emjtex { background-color: var(--dark-sub-color); border-color: var(--dark-border-color); box-shadow: var(--dark-border-color); } - .emjtex:hover{ + + .emjtex:hover { background-color: color-mix(in srgb, var(--dark-sub-color) 95%, #FFF); } - - .emjtex h3{ - color:var(--background-color); - } - - .emjtex p{ - color:var(--dark-subtext-color); + + .emjtex h3 { + color: var(--background-color); } - .rp .totop{ + .emjtex p { + color: var(--dark-subtext-color); + } + + .rp .totop { width: 14px; height: 8px; border-left: 2px solid var(--dark-text-color); @@ -7978,216 +8682,235 @@ noscript .noscript_modal .inner .center_text p{ border-bottom-left-radius: 6px; } - .formarea{ + .formarea { background-color: var(--dark-sub-color); } - - .formarea p{ - color:var(--dark-text-color); - } - .formarea li{ - color:var(--dark-text-color); + + .formarea p { + color: var(--dark-text-color); } - .formarea .update_box{ + .formarea li { + color: var(--dark-text-color); + } + + .formarea .update_box { background-color: var(--dark-background-color); border: none; } - .formarea .update_box h1{ - color:var(--dark-text-color); + + .formarea .update_box h1 { + color: var(--dark-text-color); } - .formarea .update_box h2{ - color:var(--dark-text-color); + + .formarea .update_box h2 { + color: var(--dark-text-color); } - .formarea .update_box .update_text{ + + .formarea .update_box .update_text { background-color: var(--dark-sub-color); border: none; } - .formarea .update_box .update_text p{ - color:var(--dark-text-color); + + .formarea .update_box .update_text p { + color: var(--dark-text-color); } - .formarea table{ - color:var(--dark-text-color); + .formarea table { + color: var(--dark-text-color); } - + .modal-content { background-color: var(--dark-sub-color); } - - .modal-content textarea{ + + .modal-content textarea { background-color: var(--dark-sub-color); - color:var(--dark-subtext-color); - } - .modal-content p{ - color:var(--dark-subtext-color); - } - - .modal-content h1{ - color:var(--background-color); + color: var(--dark-subtext-color); } - .modal-content .fbtn_no{ + .modal-content p { + color: var(--dark-subtext-color); + } + + .modal-content h1 { + color: var(--background-color); + } + + .modal-content .fbtn_no { background-color: var(--dark-sub-color); - color:var(--main-color); + color: var(--main-color); border: 1px solid var(--main-color); } - .modal-content .fbtn_no:hover{ + + .modal-content .fbtn_no:hover { background-color: var(--dark-sub-color); color: var(--main-color); } - - .modal-content .action_userlist{ + + .modal-content .action_userlist { background-color: var(--dark-background-color); - border:none; + border: none; } - .modal-content .action_userlist .userabout .username a{ - color:var(--dark-text-color); + + .modal-content .action_userlist .userabout .username a { + color: var(--dark-text-color); } - .modal-content .action_userlist .userabout .userid a{ - color:var(--dark-subtext-color); + + .modal-content .action_userlist .userabout .userid a { + color: var(--dark-subtext-color); + } + + .modal-content .scope_desc{ + color: var(--dark-text-color); } .inbox { background: var(--dark-background-color); color: var(--background-color); border: 1px solid var(--dark-border-color); - } - + } + .inbox::placeholder { color: var(--subtext-color); } - + .inbox:hover { outline: none; border: 1px solid var(--main-color); } - + .inbox:focus { outline: none; border: 1px solid var(--main-color); border-bottom: 3px solid var(--main-color); } - .botbox{ + + .botbox { border-top: 1px solid var(--dark-sub-color); } - .btmbutton{ + .btmbutton { background-color: var(--dark-background-color); - color:var(--background-color); + color: var(--background-color); border: none; } - .btmbutton:hover{ + + .btmbutton:hover { background-color: var(--main-color); color: var(--background-color); } - - .btmbutton_on{ + + .btmbutton_on { background-color: var(--main-color); - color:#FF4444; + color: #FF4444; } - - .server_code{ + + .server_code { background-color: var(--dark-background-color); border: 1px solid var(--dark-border-color); } - .server_code details{ + + .server_code details { color: var(--dark-subtext-color); } - .server_code p{ + + .server_code p { color: var(--dark-subtext-color); } - .terms{ + .terms { background-color: var(--dark-sub-color); border: solid 1px var(--dark-border-color); } - - .terms h1{ - color: var(--dark-text-color); - } - - .terms h2{ - color: var(--dark-text-color); - } - - .terms h3{ - color: var(--dark-text-color); - } - - .terms h4{ - color: var(--dark-text-color); - } - - .terms p{ - color: var(--dark-text-color); - } - - .terms .code{ - background-color: var(--dark-subtext-color); - } - - .terms .code p{ - color: var(--text-color); - } - - .terms ul{ - color: var(--background-color); - } - - .terms .p2c{ - color: var(--dark-text-color); - } - - .terms .p3{ - color: var(--dark-text-color); - } - .terms .sp2c{ - color: var(--dark-text-color); - } - - .terms .sp3{ - color: var(--dark-text-color); - } - - .terms .err404 h1{ - color: var(--dark-text-color); - } - - .terms .err404 p{ + + .terms h1 { color: var(--dark-text-color); } - .this{ - background-color: color-mix(in srgb, var(--link-color) 30%, var(--dark-background-color))!important; + .terms h2 { + color: var(--dark-text-color); + } + + .terms h3 { + color: var(--dark-text-color); + } + + .terms h4 { + color: var(--dark-text-color); + } + + .terms p { + color: var(--dark-text-color); + } + + .terms .code { + background-color: var(--dark-subtext-color); + } + + .terms .code p { + color: var(--text-color); + } + + .terms ul { + color: var(--background-color); + } + + .terms .p2c { + color: var(--dark-text-color); + } + + .terms .p3 { + color: var(--dark-text-color); + } + + .terms .sp2c { + color: var(--dark-text-color); + } + + .terms .sp3 { + color: var(--dark-text-color); + } + + .terms .err404 h1 { + color: var(--dark-text-color); + } + + .terms .err404 p { + color: var(--dark-text-color); + } + + .this { + background-color: color-mix(in srgb, var(--link-color) 30%, var(--dark-background-color)) !important; border-top: solid 1px var(--dark-border-color); } - .notification{ + .notification { background-color: var(--dark-sub-color); border-bottom: solid 1px var(--dark-border-color); } + .notification:first-child { border-top: solid 1px var(--dark-border-color); } - .notification .flebox a{ - color:var(--dark-subtext-color)5; - } - - .notification p{ - color:var(--background-color); - } - - .notification h3{ - color:var(--dark-subtext-color); + .notification .flebox a { + color: var(--dark-subtext-color)5; } - .notification .inline{ + .notification p { + color: var(--background-color); + } + + .notification h3 { + color: var(--dark-subtext-color); + } + + .notification .inline { width: fit-content; margin-left: 4px; margin-right: 4px; @@ -8205,17 +8928,19 @@ noscript .noscript_modal .inner .center_text p{ vertical-align: top; } - .notification h1{ - color:var(--dark-text-color); + .notification h1 { + color: var(--dark-text-color); } - .notification h2{ - color:var(--dark-text-color); + + .notification h2 { + color: var(--dark-text-color); } - .notification h3{ - color:var(--dark-text-color); + + .notification h3 { + color: var(--dark-text-color); } - - .notification .quote{ + + .notification .quote { width: fit-content; border-left: 5px solid; border-radius: 5px; @@ -8225,253 +8950,296 @@ noscript .noscript_modal .inner .center_text p{ padding-right: 6px; padding-top: 4px; padding-bottom: 4px; - color:var(--dark-text-color); + color: var(--dark-text-color); text-decoration: none; font-family: var(--Text-fonts), sans-serif; font-weight: normal; } - - .notification .blur{ + + .notification .blur { background-color: #F5F5F5; color: #F5F5F5; } - .notification .blur:hover{ + + .notification .blur:hover { background-color: var(--notification-color); color: var(--dark-text-color); } - - - .notification .flebox .time{ - color:var(--dark-subtext-color); + + + .notification .flebox .time { + color: var(--dark-subtext-color); } - .notification .mta{ + .notification .mta { background-color: #302c2c; } - .notification .mta:hover{ + + .notification .mta:hover { font-size: 14px; background-color: var(--main-color); - color:var(--dark-background-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); - } - - .notification a{ - color:var(--main-color); - } - .tokonone p{ - color:var(--dark-subtext-color); + color: var(--dark-background-color); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); } - .ueuse .mta{ + .notification a { + color: var(--main-color); + } + + .tokonone p { + color: var(--dark-subtext-color); + } + + .ueuse .mta { background-color: #302c2c; } - .ueuse .mta:hover{ + + .ueuse .mta:hover { font-size: 14px; background-color: var(--main-color); - color:var(--dark-background-color); - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .2); + color: var(--dark-background-color); + box-shadow: 0 0px 48px 0 rgba(0, 0, 0, .2); } - .ueuse .unixtime{ + .ueuse .unixtime { padding-left: 6px; padding-right: 6px; padding-top: 2px; padding-bottom: 2px; } - - .tlchange{ + + .tlchange { background-color: var(--dark-sub-color); box-shadow: 0 1px 0 var(--dark-border-color); } - .tlchange .btn{ + + .tlchange .btn { background: var(--dark-sub-color); color: var(--background-color); } - .tlchange .on{ - color:var(--main-color); - border-bottom: 1px solid var(--main-color); - } - - .select_utl{ - background-color: var(--dark-sub-color); - } - - .select_utl .btn{ - background: var(--dark-sub-color); - color: var(--border-color); - } - .select_utl .btmline{ + .tlchange .on { color: var(--main-color); border-bottom: 1px solid var(--main-color); } - .admin_settings .admin_left{ + + .select_utl { + background-color: var(--dark-sub-color); + } + + .select_utl .btn { + background: var(--dark-sub-color); + color: var(--border-color); + } + + .select_utl .btmline { + color: var(--main-color); + border-bottom: 1px solid var(--main-color); + } + + .admin_settings .admin_left { background-color: var(--dark-sub-color); border-right: solid 1px var(--dark-border-color); } - .admin_leftbtn{ + + .admin_leftbtn { background-color: var(--dark-sub-color); - color:var(--main-color); + color: var(--main-color); } - .admin_leftbtn:hover{ + + .admin_leftbtn:hover { background-color: var(--main-color); color: var(--dark-background-color); } - .admin_userinfo .icon .tatext h2{ - color:var(--background-color); + .admin_userinfo .icon .tatext h2 { + color: var(--background-color); } - .admin_userinfo .icon .tatext p{ + + .admin_userinfo .icon .tatext p { color: var(--dark-subtext-color); } - .admin_userinfo .profile p{ - color:var(--dark-subtext-color); + + .admin_userinfo .profile p { + color: var(--dark-subtext-color); } - .admin_userinfo .rolebox{ + + .admin_userinfo .rolebox { background-color: var(--dark-background-color); border: 1px solid var(--main-color); } - .admin_userinfo .rolebox p{ - color:var(--main-color); + + .admin_userinfo .rolebox p { + color: var(--main-color); } - .admin_userinfo .p2{ + + .admin_userinfo .p2 { color: var(--dark-subtext-color); } - .admin_userinfo .about p{ + + .admin_userinfo .about p { color: var(--background-color); } - .delbox .delbtn{ + + .delbox .delbtn { background-color: #302c2c; - color:var(--error); + color: var(--error); } - - .delbox .delbtn:hover{ + + .delbox .delbtn:hover { background-color: var(--error); color: var(--background-color); } - .error{ + .error { background-color: var(--dark-sub-color); border: 1px solid var(--main-color); } - .error h1{ + + .error h1 { background-color: var(--main-color); color: var(--dark-background-color); } - .error p{ + + .error p { color: var(--background-color); } - .menubutton{ + .menubutton { background-color: var(--dark-sub-color); color: var(--main-color); } - .menubutton:hover{ + + .menubutton:hover { background-color: var(--dark-background-color); color: var(--main-color); } - .mini_irobtn{ + + .mini_irobtn { background-color: var(--dark-background-color); color: var(--main-color); } - .mini_irobtn:hover{ + + .mini_irobtn:hover { background-color: var(--main-color); - color: var(--dark-background-color);; + color: var(--dark-background-color); + ; } - .overview_cnt_l{ + + .overview_cnt_l { background-color: var(--dark-background-color); border: solid 1px var(--dark-border-color); } - .overview_cnt_r{ + + .overview_cnt_r { background-color: var(--dark-background-color); border: solid 1px var(--dark-border-color); } - .overview p{ + + .overview p { color: var(--dark-text-color); font-size: 32px; font-family: var(--Mono-fonts), sans-serif; font-weight: bold; } - .overview .p2{ + + .overview .p2 { color: var(--dark-subtext-color); font-size: 12px; font-family: var(--Mono-fonts), sans-serif; font-weight: normal; } - .servericon img{ - box-shadow:none; + + .servericon img { + box-shadow: none; } - .f_c_area{ + + .f_c_area { background-color: var(--dark-sub-color); } - .f_c_area .fcnt p{ + + .f_c_area .fcnt p { color: var(--dark-text-color); } - .userheader .profile p a{ - color:var(--main-color); + .userheader .profile p a { + color: var(--main-color); } - .emojibox_button{ + .emojibox_button { background-color: var(--dark-sub-color); - color:var(--main-color); + color: var(--main-color); } - .emojibox_button:hover{ + + .emojibox_button:hover { background-color: color-mix(in srgb, var(--dark-sub-color) 90%, var(--error)); color: var(--error); } - .graph{ + + .graph { background-color: var(--dark-background-color); border: solid 1px var(--dark-background-color); } - .graph .per{ + + .graph .per { background-color: var(--main-color); } - noscript .noscript_modal{ + + noscript .noscript_modal { background-color: var(--dark-background-color); } - noscript .noscript_modal .inner h1{ - color:var(--dark-text-color); + + noscript .noscript_modal .inner h1 { + color: var(--dark-text-color); } - noscript .noscript_modal .inner p{ - color:var(--dark-text-color); + + noscript .noscript_modal .inner p { + color: var(--dark-text-color); } - noscript .noscript_modal .inner .center_text p{ + + noscript .noscript_modal .inner .center_text p { line-height: 16px; margin: 0px; text-align: center; - color:#CCC; + color: #CCC; font-size: 14px; font-family: var(--Mono-fonts), 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; font-weight: normal; } - .tutorial_background .tutorial_modal{ + .tutorial_background .tutorial_modal { background-color: var(--dark-background-color); } - .tutorial_background .tutorial_modal .tutorial .page h1{ - color:var(--dark-text-color); + + .tutorial_background .tutorial_modal .tutorial .page h1 { + color: var(--dark-text-color); } - .tutorial_background .tutorial_modal .tutorial .page h2{ - color:var(--dark-text-color); + + .tutorial_background .tutorial_modal .tutorial .page h2 { + color: var(--dark-text-color); } - .tutorial_background .tutorial_modal .tutorial .page p{ - color:var(--dark-text-color); + + .tutorial_background .tutorial_modal .tutorial .page p { + color: var(--dark-text-color); } - .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn{ + + .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn { background-color: var(--main-color); - color:var(--dark-sub-color); + color: var(--dark-sub-color); } - .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:hover{ + + .tutorial_background .tutorial_modal .tutorial .page .btm_area .iro_btn:hover { background-color: var(--main-color); - color:var(--dark-sub-color); + color: var(--dark-sub-color); } - .tutorial_background .tutorial_modal .tutorial .page .btm_area .backcolor{ + + .tutorial_background .tutorial_modal .tutorial .page .btm_area .backcolor { background-color: var(--dark-background-color); color: var(--dark-text-color); } - .tutorial_background .tutorial_modal .tutorial .page .btm_area .backcolor:hover{ + + .tutorial_background .tutorial_modal .tutorial .page .btm_area .backcolor:hover { background-color: var(--dark-background-color); color: var(--dark-text-color); } @@ -8480,56 +9248,87 @@ noscript .noscript_modal .inner .center_text p{ background-color: var(--dark-background-color); border: solid 1px var(--dark-sub-color); } + .ueuse_popup_back .ueuse_popup_menu button { background-color: var(--dark-background-color); color: var(--dark-text-color); } + .ueuse_popup_back .ueuse_popup_menu button:hover { background-color: var(--dark-sub-color); color: var(--main-color); } - - .emoji_admin{ + + .emoji_admin { background-color: var(--dark-background-color); border: none; } + .emoji_admin details { - color:var(--dark-text-color); + color: var(--dark-text-color); } + .emoji_admin summary { - color:var(--dark-text-color); + color: var(--dark-text-color); } - .emoji_admin p{ - color:var(--dark-text-color); + + .emoji_admin p { + color: var(--dark-text-color); } - + .actionlog { background-color: var(--dark-background-color); border: solid 1px var(--dark-border-color); } + .actionlog details { color: var(--dark-text-color); } + .actionlog details .INFO { background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--success)); } + .actionlog details .NOTICE { background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--good)); } + .actionlog details .WARNING { background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--warn)); } + .actionlog details .ERROR { background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--danger)); } + .actionlog details .CRITICAL { background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--error)); } + .actionlog p { color: var(--dark-text-color); } + .switch_label { background: var(--dark-background-color); border: solid 1px var(--dark-border-color); } + + .auth_clientbox{ + background-color: var(--dark-background-color); + border: solid 1px var(--dark-border-color); + } + .auth_clientbox .flexbox p{ + color: var(--dark-text-color); + } + .auth_clientbox .about .scopebox{ + border: solid 1px var(--dark-border-color); + background-color: var(--dark-sub-color); + } + .auth_clientbox .accountbox .flexbox p{ + color: var(--dark-text-color); + } + .auth_clientbox .callbackbox p{ + color: var(--dark-text-color); + } } \ No newline at end of file diff --git a/css/style.css b/css/style.css index ffb62e3..1657775 100644 --- a/css/style.css +++ b/css/style.css @@ -106,7 +106,7 @@ body{ margin-top: 64px; margin-bottom: 100px; border-radius: 25px; - background-color: var(--background-color); + background-color: var(--tl-color); box-shadow:0 0px 48px 0 rgba(0, 0, 0, .15); } @@ -205,7 +205,7 @@ body{ width: calc(50% - 52px); height: 5dvh; border-radius: 15px; - background-color: var(--sub-color); + background-color: var(--background-color); border: solid 1px var(--border-color); padding: 18px; } @@ -229,8 +229,8 @@ body{ word-wrap: break-word; line-height: 24px; color: var(--text-color); - font-size: 20px; - font-family: var(--Text-fonts), sans-serif; + font-size: 24px; + font-family: var(--Mono-fonts), sans-serif; font-weight: bold; } diff --git a/errorpage/httperror.php b/errorpage/httperror.php index ac8accc..dc0eef1 100644 --- a/errorpage/httperror.php +++ b/errorpage/httperror.php @@ -100,13 +100,13 @@ switch ($error_code) {
+ if(!(empty(file_get_contents($custom503file)))){?> PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); + } catch (PDOException $e) { + // 接続エラーのときエラー内容を取得する + actionLog($userid, "error", "ueuse", null, $e, 4); + } + + $userid = safetext($_POST['userid']); + + $uniqid = safetext($_POST['uniqid']); + $loginid = safetext($_POST['account_id']); + $loginkey = safetext($_COOKIE['loginkey']); + + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user"); + if ($is_login === false) { + echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']); + exit; + } + + if(DelAPIToken($pdo, $uniqid)){ + echo json_encode(['success' => true, 'message' => 'アクセストークンが削除されました。']); + exit; + } else { + echo json_encode(['success' => false, 'error' => 'アクセストークンの削除に失敗しました。']); + exit; + } +} else { + echo json_encode(['success' => false, 'error' => '必要なパラメータが提供されていません。']); + exit; +} + +?> \ No newline at end of file diff --git a/function/function.php b/function/function.php index bad9237..7888ce2 100644 --- a/function/function.php +++ b/function/function.php @@ -61,8 +61,11 @@ function blockedIP($ip_addr) { foreach ($blocked_ips as $blocked_ip) { if (isIpInCIDR($ip_addr, $blocked_ip)) { - $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . "/unsupported.php?errcode=IP_BANNED"; + $fron_uwuzu_errcode = "IP_BANNED"; + $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . "/unsupported.php?errcode=" . $fron_uwuzu_errcode; header("Location: " . $url); + + require(__DIR__ . '/../unsupported.php'); exit; } } @@ -259,8 +262,6 @@ function uwuzuUserLogin($session, $cookie, $ip_addr, $operation_permission = "us //APIなどのログイン処理(loginidとloginkeyが有効かを確かめる) function uwuzuUserLoginCheck($loginid, $loginkey, $operation_permission = "user") { //セッション,クッキー,IPアドレス,閲覧権限(userかadminかの二種類)を受け取る - $serversettings_file = $_SERVER['DOCUMENT_ROOT']."/server/serversettings.ini"; - $serversettings = parse_ini_file($serversettings_file, true); // データベースに接続 try { $option = array( @@ -317,13 +318,26 @@ function uwuzuUserLoginCheck($loginid, $loginkey, $operation_permission = "user" } } //---------UNIQID-MAKER--------- -function createUniqId(){ - list($msec, $sec) = explode(" ", microtime()); - $hashCreateTime = $sec.floor($msec*1000000); - - $hashCreateTime = strrev($hashCreateTime); - - return base_convert($hashCreateTime,10,36); +function Legacy_createUniqId(){ + list($msec, $sec) = explode(" ", microtime()); + $hashCreateTime = $sec.floor($msec*1000000); + + $hashCreateTime = strrev($hashCreateTime); + + return base_convert($hashCreateTime,10,36); +} +function createUniqId($randDigits = 6) { + $msec_time = (int)(microtime(true) * 1000); + $randMax = pow(10, $randDigits) - 1; + $rand_num = str_pad(random_int(0, $randMax), $randDigits, '0', STR_PAD_LEFT); + $combined = $msec_time . $rand_num; + return base_convert(strrev($combined), 10, 36); +} +function parseUniqId($id, $randDigits = 6) { + $reversed_num_str = base_convert($id, 36, 10); + $combined_num_str = strrev($reversed_num_str); + $msec_time_str = substr($combined_num_str, 0, -$randDigits); + return date("Y-m-d H:i:s.v", (int)($msec_time_str / 1000)); } //----------EXIF_Delete---------- //EXIFを削除するやつです。 @@ -1123,12 +1137,16 @@ function get_mentions_userid($postText) { $mention_userData = $mention_userQuery->fetch(); if (!empty($mention_userData)) { - $mentionedUsers[] = $mention_username; + $mentionedUsers[] = strtolower($mention_username); } }, $postText); return $mentionedUsers; } +function GenNotificationId($to, $from, $title, $message, $url, $category) { + $data = "" . $to . ":" . $from . ":" . $title . ":" . $message . ":" . $url . ":" . $category; + return hash('sha3-512', $data); +} function send_notification($to,$from,$title,$message,$url,$category){ // データベースに接続 @@ -1143,10 +1161,10 @@ function send_notification($to,$from,$title,$message,$url,$category){ return false; } - if(!($to == $from) || $category === "system" || $category === "other"){ + if(!(strtolower($to) == strtolower($from)) || $category === "system" || $category === "other"){ $to_result = getUserData($pdo, $to); - $category_list = ["system","favorite","reply","reuse","ueuse","follow","mention","other"]; + $category_list = ["system","favorite","reply","reuse","ueuse","follow","mention","other", "login"]; if(in_array($category, $category_list)){ if(in_array($category, explode(',', $to_result["notification_settings"])) || empty($to_result["notification_settings"]) || $category === "system" || $category === "other"){ //ブロックされてたら送らない @@ -1162,9 +1180,10 @@ function send_notification($to,$from,$title,$message,$url,$category){ $url = safetext($url); $userchk = 'none'; $notification_category = safetext($category); + $notification_id = GenNotificationId($touserid, $fromuserid, $title, $msg, $url, $notification_category); // 通知用SQL作成 - $stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title, category) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title, :category)"); + $stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title, category, notificationid) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title, :category, :notificationid)"); $stmt->bindParam(':fromuserid', $fromuserid, PDO::PARAM_STR); $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); @@ -1173,6 +1192,7 @@ function send_notification($to,$from,$title,$message,$url,$category){ $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); $stmt->bindParam(':title', $title, PDO::PARAM_STR); $stmt->bindParam(':category', $notification_category, PDO::PARAM_STR); + $stmt->bindParam(':notificationid', $notification_id, PDO::PARAM_STR); $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); @@ -1211,6 +1231,69 @@ function send_notification($to,$from,$title,$message,$url,$category){ return true; } } + +function delete_notification($to,$from,$title,$message,$url,$category){ + // データベースに接続 + try { + $option = array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::MYSQL_ATTR_MULTI_STATEMENTS => false + ); + $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); + } catch(PDOException $e) { + actionLog($from, "error", "send_notification", $to, $e, 4); + return false; + } + + if(!(strtolower($to) == strtolower($from)) || $category === "system" || $category === "other"){ + $to_result = getUserData($pdo, $to); + + $category_list = ["system","favorite","reply","reuse","ueuse","follow","mention","other", "login"]; + if(in_array($category, $category_list)){ + if(in_array($category, explode(',', $to_result["notification_settings"])) || empty($to_result["notification_settings"]) || $category === "system" || $category === "other"){ + if(!(empty($pdo))){ + $fromuserid = safetext($from); + $touserid = safetext($to); + $msg = safetext($message); + $title = safetext($title); + $url = safetext($url); + $notification_category = safetext($category); + $notification_id = GenNotificationId($touserid, $fromuserid, $title, $msg, $url, $notification_category); + $pdo->beginTransaction(); + try { + // 削除クエリを実行 + $deleteQuery = $pdo->prepare("DELETE FROM notification WHERE notificationid = :notificationid"); + $deleteQuery->bindValue(':notificationid', $notification_id, PDO::PARAM_STR); + $res = $deleteQuery->execute(); + + if ($res) { + $res = $pdo->commit(); + return true; + } else { + $pdo->rollBack(); + actionLog($from, "error", "delete_notification", $to, "通知の削除に失敗しました(rollBack)", 3); + return false; + } + } catch(PDOException $e) { + $pdo->rollBack(); + actionLog($from, "error", "delete_notification", $to, $e, 4); + return false; + } + }else{ + return false; + } + }else{ + // 受信しない設定なのでtrue + return true; + } + }else{ + return false; + } + }else{ + // 送信元と送信先が同じなら送信しない + return true; + } +} // ユーズするとき全部この関数 function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw,$aibwm){ // AIBlockWaterMark-------------------------------------------- @@ -1269,511 +1352,518 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$ } if(!(empty($pdo))){ - $userData = getUserData($pdo, $userid); - $username = safetext($userData["username"]); - $userRoleList = explode(',', safetext($userData["role"])); - if(in_array("ice", $userRoleList)){ - $error_message[] = 'アカウントが凍結されています。(ACCOUNT_HAS_BEEN_FROZEN)'; - } - $ueuse = safetext($ueuse); - if(safetext($nsfw) === "true"){ - $save_nsfw = "true"; - }else{ - $save_nsfw = "false"; - } - if(empty($ueuse) && empty($ruUniqid)) { - $error_message[] = '内容を入力してください。(INPUT_PLEASE)'; - } else { - // 文字数を確認 - if((int)safetext(file_get_contents($mojisizefile)) < mb_strlen($ueuse, 'UTF-8')) { - $error_message[] = '内容は'.safetext(file_get_contents($mojisizefile)).'文字以内で入力してください。(INPUT_OVER_MAX_COUNT)'; - } + $uniqid = createUniqId();//最初に決めちゃう + if(empty(getUeuseData($pdo, $uniqid))){ - // 禁止url確認 - if(!(empty($banurl))){ - for($i = 0; $i < count($banurl); $i++) { - if(!($banurl[$i] == "")){ - if (false !== strpos($ueuse, 'https://'.$banurl[$i])) { - $error_message[] = '投稿が禁止されているURLが含まれています。(INPUT_CONTAINS_PROHIBITED_URL)'; - } - } - } + $userData = getUserData($pdo, $userid); + $username = safetext($userData["username"]); + $userRoleList = explode(',', safetext($userData["role"])); + if(in_array("ice", $userRoleList)){ + $error_message[] = 'アカウントが凍結されています。(ACCOUNT_HAS_BEEN_FROZEN)'; } - - // 改行ユーズ確認 - if(preg_match('/^[\n\r]+$/', $ueuse) === 1){ + $ueuse = safetext($ueuse); + if(safetext($nsfw) === "true"){ + $save_nsfw = "true"; + }else{ + $save_nsfw = "false"; + } + if(empty($ueuse) && empty($ruUniqid)) { $error_message[] = '内容を入力してください。(INPUT_PLEASE)'; + } else { + // 文字数を確認 + if((int)safetext(file_get_contents($mojisizefile)) < mb_strlen($ueuse, 'UTF-8')) { + $error_message[] = '内容は'.safetext(file_get_contents($mojisizefile)).'文字以内で入力してください。(INPUT_OVER_MAX_COUNT)'; + } + + // 禁止url確認 + if(!(empty($banurl))){ + for($i = 0; $i < count($banurl); $i++) { + if(!($banurl[$i] == "")){ + if (false !== strpos($ueuse, 'https://'.$banurl[$i])) { + $error_message[] = '投稿が禁止されているURLが含まれています。(INPUT_CONTAINS_PROHIBITED_URL)'; + } + } + } + } + + // 改行ユーズ確認 + if(preg_match('/^[\n\r]+$/', $ueuse) === 1){ + $error_message[] = '内容を入力してください。(INPUT_PLEASE)'; + } } - } - $old_datetime = date("Y-m-d H:i:00"); - $now_datetime = date("Y-m-d H:i:00",strtotime("+1 minute")); - $rate_Query = $pdo->prepare("SELECT * FROM ueuse WHERE account = :userid AND TIME(datetime) BETWEEN :old_datetime AND :now_datetime"); - $rate_Query->bindValue(':userid', $userid); - $rate_Query->bindValue(':old_datetime', $old_datetime); - $rate_Query->bindValue(':now_datetime', $now_datetime); - $rate_Query->execute(); - $rate_count = $rate_Query->rowCount(); - if(!($rate_count > $max_ueuse_rate_limit-1)){ - if(empty($error_message)) { - if (empty($photo1['name'])) { - $save_photo1 = "none"; - } else { - // アップロードされたファイル情報 - $uploadedFile = $photo1; - - if(!(empty($uploadedFile['tmp_name']))){ - if(check_mime($uploadedFile['tmp_name'])){ - // アップロードされたファイルの拡張子を取得 - $extension = convert_mime(check_mime($uploadedFile['tmp_name'])); - delete_exif($extension, $uploadedFile['tmp_name']); - if($aibwm === true){ - AIBlockWaterMark($uploadedFile['tmp_name'], $userid); - } - if(AMS3_CHKS == "true"){ - $s3result = uploadAmazonS3($uploadedFile['tmp_name']); - }else{ - // 新しいファイル名を生成(uniqid + 拡張子) - $newFilename = createUniqId() . '-'.$userid.'.' . $extension; - // 保存先のパスを生成 - $uploadedPath = '../ueuseimages/' . $newFilename; - // ファイルを移動 - $result = move_uploaded_file($uploadedFile['tmp_name'], __DIR__."/".$uploadedPath); - - if ($result) { - $save_photo1 = $uploadedPath; // 保存されたファイルのパスを使用 - } else { - $errnum = $uploadedFile['error']; - if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} - if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} - if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} - if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} - if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} - if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} - if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} - $error_message[] = 'アップロード失敗!(1)エラーコード:' .$errcode.''; - } - } - if(isset($s3result)){ - if($s3result == false){ - $error_message[] = 'アップロード失敗!(1)エラーコード: S3ERROR'; - }else{ - $save_photo1 = $s3result; // S3に保存されたファイルのパスを使用 - } - } - }else{ - $error_message[] = "使用できない画像形式です。(SORRY_FILE_HITAIOU)"; - } - }else{ - $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; - } - } - - if (empty($photo2['name'])) { - $save_photo2 = "none"; - } else { - if (empty($photo1['name'])){ - $error_message[] = '画像1から画像を選択してください!!!(PHOTO_SELECT_PLEASE)'; - } - // アップロードされたファイル情報 - $uploadedFile2 = $photo2; - - if(!(empty($uploadedFile2['tmp_name']))){ - if(check_mime($uploadedFile2['tmp_name'])){ - // アップロードされたファイルの拡張子を取得 - $extension2 = convert_mime(check_mime($uploadedFile2['tmp_name'])); - delete_exif($extension2, $uploadedFile2['tmp_name']); - if($aibwm === true){ - AIBlockWaterMark($uploadedFile2['tmp_name'], $userid); - } - if(AMS3_CHKS == "true"){ - $s3result = uploadAmazonS3($uploadedFile2['tmp_name']); - }else{ - // 新しいファイル名を生成(uniqid + 拡張子) - $newFilename2 = createUniqId() . '-'.$userid.'.' . $extension2; - // 保存先のパスを生成 - $uploadedPath2 = '../ueuseimages/' . $newFilename2; - // ファイルを移動 - $result2 = move_uploaded_file($uploadedFile2['tmp_name'], __DIR__."/".$uploadedPath2); - if ($result2) { - $save_photo2 = $uploadedPath2; // 保存されたファイルのパスを使用 - } else { - $errnum = $uploadedFile2['error']; - if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} - if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} - if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} - if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} - if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} - if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} - if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} - $error_message[] = 'アップロード失敗!(2)エラーコード:' .$errcode.''; - } - } - if(isset($s3result)){ - if($s3result == false){ - $error_message[] = 'アップロード失敗!(2)エラーコード: S3ERROR'; - }else{ - $save_photo2 = $s3result; // S3に保存されたファイルのパスを使用 - } - } - }else{ - $error_message[] = "使用できない画像形式です。(SORRY_FILE_HITAIOU)"; - } - }else{ - $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; - } - } - - if (empty($photo3['name'])) { - $save_photo3 = "none"; - } else { - if (empty($photo2['name'])){ - $error_message[] = '画像2から画像を選択してください!!!(PHOTO_SELECT_PLEASE)'; - } - // アップロードされたファイル情報 - $uploadedFile3 = $photo3; - - if(!(empty($uploadedFile3['tmp_name']))){ - if(check_mime($uploadedFile3['tmp_name'])){ - // アップロードされたファイルの拡張子を取得 - $extension3 = convert_mime(check_mime($uploadedFile3['tmp_name'])); - delete_exif($extension3, $uploadedFile3['tmp_name']); - if($aibwm === true){ - AIBlockWaterMark($uploadedFile3['tmp_name'], $userid); - } - if(AMS3_CHKS == "true"){ - $s3result = uploadAmazonS3($uploadedFile3['tmp_name']); - }else{ - // 新しいファイル名を生成(uniqid + 拡張子) - $newFilename3 = createUniqId() . '-'.$userid.'.' . $extension3; - // 保存先のパスを生成 - $uploadedPath3 = '../ueuseimages/' . $newFilename3; - // ファイルを移動 - $result3 = move_uploaded_file($uploadedFile3['tmp_name'], __DIR__."/".$uploadedPath3); - if ($result3) { - $save_photo3 = $uploadedPath3; // 保存されたファイルのパスを使用 - } else { - $errnum = $uploadedFile3['error']; - if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} - if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} - if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} - if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} - if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} - if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} - if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} - $error_message[] = 'アップロード失敗!(3)エラーコード:' .$errcode.''; - } - } - if(isset($s3result)){ - if($s3result == false){ - $error_message[] = 'アップロード失敗!(3)エラーコード: S3ERROR'; - }else{ - $save_photo3 = $s3result; // S3に保存されたファイルのパスを使用 - } - } - }else{ - $error_message[] = "使用できない画像形式です。(SORRY_FILE_HITAIOU)"; - } - }else{ - $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; - } - } - - if (empty($photo4['name'])) { - $save_photo4 = "none"; - } else { - if (empty($photo3['name'])){ - $error_message[] = '画像3から画像を選択してください!!!(PHOTO_SELECT_PLEASE)'; - } - // アップロードされたファイル情報 - $uploadedFile4 = $photo4; - if(!(empty($uploadedFile4['tmp_name']))){ - if(check_mime($uploadedFile4['tmp_name'])){ - // アップロードされたファイルの拡張子を取得 - $extension4 = convert_mime(check_mime($uploadedFile4['tmp_name'])); - delete_exif($extension4, $uploadedFile4['tmp_name']); - if($aibwm === true){ - AIBlockWaterMark($uploadedFile4['tmp_name'], $userid); - } - if(AMS3_CHKS == "true"){ - $s3result = uploadAmazonS3($uploadedFile4['tmp_name']); - }else{ - // 新しいファイル名を生成(uniqid + 拡張子) - $newFilename4 = createUniqId() . '-'.$userid.'.' . $extension4; - // 保存先のパスを生成 - $uploadedPath4 = '../ueuseimages/' . $newFilename4; - // ファイルを移動 - $result4 = move_uploaded_file($uploadedFile4['tmp_name'], __DIR__."/".$uploadedPath4); - if ($result4) { - $save_photo4 = $uploadedPath4; // 保存されたファイルのパスを使用 - } else { - $errnum = $uploadedFile4['error']; - if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} - if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} - if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} - if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} - if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} - if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} - if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} - $error_message[] = 'アップロード失敗!(4)エラーコード:' .$errcode.''; - } - } - if(isset($s3result)){ - if($s3result == false){ - $error_message[] = 'アップロード失敗!(1)エラーコード: S3ERROR'; - }else{ - $save_photo4 = $s3result; // S3に保存されたファイルのパスを使用 - } - } - }else{ - $error_message[] = "使用できない画像形式です。(SORRY_FILE_HITAIOU)"; - } - }else{ - $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; - } - } - - if (empty($video1['name'])) { - $save_video1 = "none"; - } else { - // アップロードされたファイル情報 - $uploadedVideo = $video1; - - if(!(empty($uploadedVideo['tmp_name']))){ - if(check_mime_video($uploadedVideo['tmp_name'])){ - if(AMS3_CHKS == "true"){ - $s3result = uploadAmazonS3($uploadedVideo['tmp_name']); - }else{ - // アップロードされたファイルの拡張子を取得 - $extensionVideo = convert_mime(check_mime_video($uploadedVideo['tmp_name'])); - // 正しい拡張子の場合、新しいファイル名を生成 - $newFilenameVideo = createUniqId() . '-'.$userid.'.' . $extensionVideo; - // 保存先のパスを生成 - $uploadedPathVideo = '../ueusevideos/' . $newFilenameVideo; - // ファイルを移動 - $resultVideo = move_uploaded_file($uploadedVideo['tmp_name'], __DIR__."/".$uploadedPathVideo); - if ($resultVideo) { - $save_video1 = $uploadedPathVideo; // 保存されたファイルのパスを使用 - } else { - $errnum = $uploadedVideo['error']; - if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} - if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} - if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} - if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} - if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} - if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} - if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} - $error_message[] = 'アップロード失敗!(5)エラーコード:' .$errcode.''; - } - } - if(isset($s3result)){ - if($s3result == false){ - $error_message[] = 'アップロード失敗!(5)エラーコード: S3ERROR'; - }else{ - $save_video1 = $s3result; // S3に保存されたファイルのパスを使用 - } - } - } else { - $error_message[] = '対応していないファイル形式です!(SORRY_FILE_HITAIOU)'; - } - }else{ - $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; - } - } - - if(empty($error_message)) { - // 書き込み日時を取得 - $datetime = date("Y-m-d H:i:s"); - $uniqid = createUniqId(); - $abi = "none"; - $popularity = 0; - - if(empty($rpUniqid) && empty($ruUniqid)){ - //-----------通常ユーズ----------- - // トランザクション開始 - $pdo->beginTransaction(); - - try { - - // SQL作成 - $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ueuse, photo1, photo2, photo3, photo4, video1, datetime, abi, nsfw, popularity) VALUES (:username, :account, :uniqid, :ueuse, :photo1, :photo2, :photo3, :photo4, :video1, :datetime, :abi, :nsfw, :popularity)"); - - $stmt->bindParam(':username', $username, PDO::PARAM_STR); - $stmt->bindParam(':account', $userid, PDO::PARAM_STR); - $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); - $stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR); - - $stmt->bindParam(':photo1', $save_photo1, PDO::PARAM_STR); - $stmt->bindParam(':photo2', $save_photo2, PDO::PARAM_STR); - $stmt->bindParam(':photo3', $save_photo3, PDO::PARAM_STR); - $stmt->bindParam(':photo4', $save_photo4, PDO::PARAM_STR); - $stmt->bindParam(':video1', $save_video1, PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); - - $stmt->bindParam(':nsfw', $save_nsfw, PDO::PARAM_STR); - $stmt->bindParam(':popularity', $popularity, PDO::PARAM_INT); - - $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); - - // SQLクエリの実行 - $res = $stmt->execute(); - - // コミット - $res = $pdo->commit(); - - $mentionedUsers = array_unique(get_mentions_userid($ueuse)); - - foreach ($mentionedUsers as $mentionedUser) { - send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention"); - } - - } catch(Exception $e) { - // エラーが発生した時はロールバック - $pdo->rollBack(); - actionLog($userid, "error", "send_ueuse", null, $e, 4); - } - }elseif((!empty($rpUniqid)) && empty($ruUniqid)){ - //-----------リプライ----------- - $toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1"); - $toUserIdQuery->bindValue(':ueuseid', $rpUniqid, PDO::PARAM_STR); - $toUserIdQuery->execute(); - $toUserId_res = $toUserIdQuery->fetch(); - - if(!(empty($toUserId_res))){ - $touserid = $toUserId_res["account"]; - }else{ - $touserid = null; - } - - changePopularity($pdo, $rpUniqid, $userid, 3); - // トランザクション開始 - $pdo->beginTransaction(); - - try { - // SQL作成 - $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, rpuniqid, ueuse, photo1, photo2, photo3, photo4, video1, datetime, abi, nsfw, popularity) VALUES (:username, :account, :uniqid, :rpuniqid, :ueuse, :photo1, :photo2, :photo3, :photo4, :video1, :datetime, :abi, :nsfw, :popularity)"); - - $stmt->bindParam(':username', $username, PDO::PARAM_STR); - $stmt->bindParam(':account', $userid, PDO::PARAM_STR); - $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); - $stmt->bindParam(':rpuniqid', $rpUniqid, PDO::PARAM_STR); - $stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR); - - $stmt->bindParam(':photo1', $save_photo1, PDO::PARAM_STR); - $stmt->bindParam(':photo2', $save_photo2, PDO::PARAM_STR); - $stmt->bindParam(':photo3', $save_photo3, PDO::PARAM_STR); - $stmt->bindParam(':photo4', $save_photo4, PDO::PARAM_STR); - $stmt->bindParam(':video1', $save_video1, PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); - - $stmt->bindParam(':nsfw', $save_nsfw, PDO::PARAM_STR); - - $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); - $stmt->bindParam(':popularity', $popularity, PDO::PARAM_INT); - - // SQLクエリの実行 - $res = $stmt->execute(); - - // コミット - $res = $pdo->commit(); - - $mentionedUsers = array_unique(get_mentions_userid($ueuse)); - - foreach ($mentionedUsers as $mentionedUser) { - send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention"); - } - - send_notification($touserid,$userid,"".$userid."さんが返信しました!",$ueuse,"/!".$uniqid."", "reply"); - } catch(Exception $e) { - // エラーが発生した時はロールバック - $pdo->rollBack(); - actionLog($userid, "error", "send_ueuse", null, $e, 4); - } - }elseif(empty($rpUniqid) && (!empty($ruUniqid))){ - //-----------リユーズ----------- - $toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1"); - $toUserIdQuery->bindValue(':ueuseid', $ruUniqid, PDO::PARAM_STR); - $toUserIdQuery->execute(); - $toUserId_res = $toUserIdQuery->fetch(); - - if(!(empty($toUserId_res))){ - $touserid = $toUserId_res["account"]; - }else{ - $touserid = null; - } - - changePopularity($pdo, $ruUniqid, $userid, 2); - - // トランザクション開始 - $pdo->beginTransaction(); - - try { - // SQL作成 - $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ruuniqid, ueuse, photo1, photo2, photo3, photo4, video1, datetime, abi, nsfw, popularity) VALUES (:username, :account, :uniqid, :ruuniqid, :ueuse, :photo1, :photo2, :photo3, :photo4, :video1, :datetime, :abi, :nsfw, :popularity)"); - - $stmt->bindParam(':username', $username, PDO::PARAM_STR); - $stmt->bindParam(':account', $userid, PDO::PARAM_STR); - $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); - $stmt->bindParam(':ruuniqid', $ruUniqid, PDO::PARAM_STR); - $stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR); - - $stmt->bindParam(':photo1', $save_photo1, PDO::PARAM_STR); - $stmt->bindParam(':photo2', $save_photo2, PDO::PARAM_STR); - $stmt->bindParam(':photo3', $save_photo3, PDO::PARAM_STR); - $stmt->bindParam(':photo4', $save_photo4, PDO::PARAM_STR); - $stmt->bindParam(':video1', $save_video1, PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); - - $stmt->bindParam(':nsfw', $save_nsfw, PDO::PARAM_STR); - - $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); - $stmt->bindParam(':popularity', $popularity, PDO::PARAM_INT); - - - // SQLクエリの実行 - $res = $stmt->execute(); - - // コミット - $res = $pdo->commit(); - - $mentionedUsers = array_unique(get_mentions_userid($ueuse)); - - foreach ($mentionedUsers as $mentionedUser) { - send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention"); - } - - send_notification($touserid,$userid,"".$userid."さんがリユーズしました!",$ueuse,"/!".$uniqid."", "reuse"); - - } catch(Exception $e) { - // エラーが発生した時はロールバック - $pdo->rollBack(); - actionLog($userid, "error", "send_ueuse", null, $e, 4); - } - }else{ - $error_message[] = '返信とリユーズを同時に行うことはできません。(ERROR)'; - return [false, $error_message]; - } - - if( $res ) { - return [true, $uniqid]; + $old_datetime = date("Y-m-d H:i:00"); + $now_datetime = date("Y-m-d H:i:00",strtotime("+1 minute")); + $rate_Query = $pdo->prepare("SELECT * FROM ueuse WHERE account = :userid AND TIME(datetime) BETWEEN :old_datetime AND :now_datetime"); + $rate_Query->bindValue(':userid', $userid); + $rate_Query->bindValue(':old_datetime', $old_datetime); + $rate_Query->bindValue(':now_datetime', $now_datetime); + $rate_Query->execute(); + $rate_count = $rate_Query->rowCount(); + if(!($rate_count > $max_ueuse_rate_limit-1)){ + if(empty($error_message)) { + if (empty($photo1['name'])) { + $save_photo1 = "none"; } else { - $error_message[] = "ユーズに失敗しました。(REGISTERED_DAME)"; - return [false, $error_message]; + // アップロードされたファイル情報 + $uploadedFile = $photo1; + + if(!(empty($uploadedFile['tmp_name']))){ + if(check_mime($uploadedFile['tmp_name'])){ + // アップロードされたファイルの拡張子を取得 + $extension = convert_mime(check_mime($uploadedFile['tmp_name'])); + delete_exif($extension, $uploadedFile['tmp_name']); + if($aibwm === true){ + AIBlockWaterMark($uploadedFile['tmp_name'], $userid); + } + if(AMS3_CHKS == "true"){ + $s3result = uploadAmazonS3($uploadedFile['tmp_name']); + }else{ + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename = createUniqId() . '-'.$userid.'.' . $extension; + // 保存先のパスを生成 + $uploadedPath = '../ueuseimages/' . $newFilename; + // ファイルを移動 + $result = move_uploaded_file($uploadedFile['tmp_name'], __DIR__."/".$uploadedPath); + + if ($result) { + $save_photo1 = $uploadedPath; // 保存されたファイルのパスを使用 + } else { + $errnum = $uploadedFile['error']; + if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} + if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} + if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} + if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} + if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} + if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} + if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} + $error_message[] = 'アップロード失敗!(1)エラーコード:' .$errcode.''; + } + } + if(isset($s3result)){ + if($s3result == false){ + $error_message[] = 'アップロード失敗!(1)エラーコード: S3ERROR'; + }else{ + $save_photo1 = $s3result; // S3に保存されたファイルのパスを使用 + } + } + }else{ + $error_message[] = "使用できない画像形式です。(SORRY_FILE_HITAIOU)"; + } + }else{ + $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; + } } - // プリペアドステートメントを削除 - $stmt = null; + if (empty($photo2['name'])) { + $save_photo2 = "none"; + } else { + if (empty($photo1['name'])){ + $error_message[] = '画像1から画像を選択してください!!!(PHOTO_SELECT_PLEASE)'; + } + // アップロードされたファイル情報 + $uploadedFile2 = $photo2; + + if(!(empty($uploadedFile2['tmp_name']))){ + if(check_mime($uploadedFile2['tmp_name'])){ + // アップロードされたファイルの拡張子を取得 + $extension2 = convert_mime(check_mime($uploadedFile2['tmp_name'])); + delete_exif($extension2, $uploadedFile2['tmp_name']); + if($aibwm === true){ + AIBlockWaterMark($uploadedFile2['tmp_name'], $userid); + } + if(AMS3_CHKS == "true"){ + $s3result = uploadAmazonS3($uploadedFile2['tmp_name']); + }else{ + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename2 = createUniqId() . '-'.$userid.'.' . $extension2; + // 保存先のパスを生成 + $uploadedPath2 = '../ueuseimages/' . $newFilename2; + // ファイルを移動 + $result2 = move_uploaded_file($uploadedFile2['tmp_name'], __DIR__."/".$uploadedPath2); + if ($result2) { + $save_photo2 = $uploadedPath2; // 保存されたファイルのパスを使用 + } else { + $errnum = $uploadedFile2['error']; + if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} + if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} + if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} + if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} + if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} + if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} + if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} + $error_message[] = 'アップロード失敗!(2)エラーコード:' .$errcode.''; + } + } + if(isset($s3result)){ + if($s3result == false){ + $error_message[] = 'アップロード失敗!(2)エラーコード: S3ERROR'; + }else{ + $save_photo2 = $s3result; // S3に保存されたファイルのパスを使用 + } + } + }else{ + $error_message[] = "使用できない画像形式です。(SORRY_FILE_HITAIOU)"; + } + }else{ + $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; + } + } + + if (empty($photo3['name'])) { + $save_photo3 = "none"; + } else { + if (empty($photo2['name'])){ + $error_message[] = '画像2から画像を選択してください!!!(PHOTO_SELECT_PLEASE)'; + } + // アップロードされたファイル情報 + $uploadedFile3 = $photo3; + + if(!(empty($uploadedFile3['tmp_name']))){ + if(check_mime($uploadedFile3['tmp_name'])){ + // アップロードされたファイルの拡張子を取得 + $extension3 = convert_mime(check_mime($uploadedFile3['tmp_name'])); + delete_exif($extension3, $uploadedFile3['tmp_name']); + if($aibwm === true){ + AIBlockWaterMark($uploadedFile3['tmp_name'], $userid); + } + if(AMS3_CHKS == "true"){ + $s3result = uploadAmazonS3($uploadedFile3['tmp_name']); + }else{ + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename3 = createUniqId() . '-'.$userid.'.' . $extension3; + // 保存先のパスを生成 + $uploadedPath3 = '../ueuseimages/' . $newFilename3; + // ファイルを移動 + $result3 = move_uploaded_file($uploadedFile3['tmp_name'], __DIR__."/".$uploadedPath3); + if ($result3) { + $save_photo3 = $uploadedPath3; // 保存されたファイルのパスを使用 + } else { + $errnum = $uploadedFile3['error']; + if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} + if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} + if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} + if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} + if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} + if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} + if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} + $error_message[] = 'アップロード失敗!(3)エラーコード:' .$errcode.''; + } + } + if(isset($s3result)){ + if($s3result == false){ + $error_message[] = 'アップロード失敗!(3)エラーコード: S3ERROR'; + }else{ + $save_photo3 = $s3result; // S3に保存されたファイルのパスを使用 + } + } + }else{ + $error_message[] = "使用できない画像形式です。(SORRY_FILE_HITAIOU)"; + } + }else{ + $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; + } + } + + if (empty($photo4['name'])) { + $save_photo4 = "none"; + } else { + if (empty($photo3['name'])){ + $error_message[] = '画像3から画像を選択してください!!!(PHOTO_SELECT_PLEASE)'; + } + // アップロードされたファイル情報 + $uploadedFile4 = $photo4; + if(!(empty($uploadedFile4['tmp_name']))){ + if(check_mime($uploadedFile4['tmp_name'])){ + // アップロードされたファイルの拡張子を取得 + $extension4 = convert_mime(check_mime($uploadedFile4['tmp_name'])); + delete_exif($extension4, $uploadedFile4['tmp_name']); + if($aibwm === true){ + AIBlockWaterMark($uploadedFile4['tmp_name'], $userid); + } + if(AMS3_CHKS == "true"){ + $s3result = uploadAmazonS3($uploadedFile4['tmp_name']); + }else{ + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename4 = createUniqId() . '-'.$userid.'.' . $extension4; + // 保存先のパスを生成 + $uploadedPath4 = '../ueuseimages/' . $newFilename4; + // ファイルを移動 + $result4 = move_uploaded_file($uploadedFile4['tmp_name'], __DIR__."/".$uploadedPath4); + if ($result4) { + $save_photo4 = $uploadedPath4; // 保存されたファイルのパスを使用 + } else { + $errnum = $uploadedFile4['error']; + if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} + if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} + if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} + if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} + if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} + if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} + if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} + $error_message[] = 'アップロード失敗!(4)エラーコード:' .$errcode.''; + } + } + if(isset($s3result)){ + if($s3result == false){ + $error_message[] = 'アップロード失敗!(1)エラーコード: S3ERROR'; + }else{ + $save_photo4 = $s3result; // S3に保存されたファイルのパスを使用 + } + } + }else{ + $error_message[] = "使用できない画像形式です。(SORRY_FILE_HITAIOU)"; + } + }else{ + $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; + } + } + + if (empty($video1['name'])) { + $save_video1 = "none"; + } else { + // アップロードされたファイル情報 + $uploadedVideo = $video1; + + if(!(empty($uploadedVideo['tmp_name']))){ + if(check_mime_video($uploadedVideo['tmp_name'])){ + if(AMS3_CHKS == "true"){ + $s3result = uploadAmazonS3($uploadedVideo['tmp_name']); + }else{ + // アップロードされたファイルの拡張子を取得 + $extensionVideo = convert_mime(check_mime_video($uploadedVideo['tmp_name'])); + // 正しい拡張子の場合、新しいファイル名を生成 + $newFilenameVideo = createUniqId() . '-'.$userid.'.' . $extensionVideo; + // 保存先のパスを生成 + $uploadedPathVideo = '../ueusevideos/' . $newFilenameVideo; + // ファイルを移動 + $resultVideo = move_uploaded_file($uploadedVideo['tmp_name'], __DIR__."/".$uploadedPathVideo); + if ($resultVideo) { + $save_video1 = $uploadedPathVideo; // 保存されたファイルのパスを使用 + } else { + $errnum = $uploadedVideo['error']; + if($errnum === 1){$errcode = "FILE_DEKASUGUI_PHP_INI_KAKUNIN";} + if($errnum === 2){$errcode = "FILE_DEKASUGUI_HTML_KAKUNIN";} + if($errnum === 3){$errcode = "FILE_SUKOSHIDAKE_UPLOAD";} + if($errnum === 4){$errcode = "FILE_UPLOAD_DEKINAKATTA";} + if($errnum === 6){$errcode = "TMP_FOLDER_NAI";} + if($errnum === 7){$errcode = "FILE_KAKIKOMI_SIPPAI";} + if($errnum === 8){$errcode = "PHPINFO()_KAKUNIN";} + $error_message[] = 'アップロード失敗!(5)エラーコード:' .$errcode.''; + } + } + if(isset($s3result)){ + if($s3result == false){ + $error_message[] = 'アップロード失敗!(5)エラーコード: S3ERROR'; + }else{ + $save_video1 = $s3result; // S3に保存されたファイルのパスを使用 + } + } + } else { + $error_message[] = '対応していないファイル形式です!(SORRY_FILE_HITAIOU)'; + } + }else{ + $error_message[] = "ファイルがアップロードできませんでした。(FILE_UPLOAD_DEKINAKATTA)"; + } + } + + if(empty($error_message)) { + // 書き込み日時を取得 + $datetime = date("Y-m-d H:i:s"); + $abi = "none"; + $popularity = 0; + $mentionedUsers = array_unique(get_mentions_userid($ueuse)); + $mentions = implode(",", $mentionedUsers); + + if(empty($rpUniqid) && empty($ruUniqid)){ + //-----------通常ユーズ----------- + // トランザクション開始 + $pdo->beginTransaction(); + + try { + + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ueuse, photo1, photo2, photo3, photo4, video1, datetime, abi, nsfw, popularity, mentions) VALUES (:username, :account, :uniqid, :ueuse, :photo1, :photo2, :photo3, :photo4, :video1, :datetime, :abi, :nsfw, :popularity, :mentions)"); + + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->bindParam(':account', $userid, PDO::PARAM_STR); + $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); + $stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR); + + $stmt->bindParam(':photo1', $save_photo1, PDO::PARAM_STR); + $stmt->bindParam(':photo2', $save_photo2, PDO::PARAM_STR); + $stmt->bindParam(':photo3', $save_photo3, PDO::PARAM_STR); + $stmt->bindParam(':photo4', $save_photo4, PDO::PARAM_STR); + $stmt->bindParam(':video1', $save_video1, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $stmt->bindParam(':nsfw', $save_nsfw, PDO::PARAM_STR); + $stmt->bindParam(':popularity', $popularity, PDO::PARAM_INT); + + $stmt->bindParam(':mentions', $mentions, PDO::PARAM_STR); + + $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + foreach ($mentionedUsers as $mentionedUser) { + send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention"); + } + + } catch(Exception $e) { + // エラーが発生した時はロールバック + $pdo->rollBack(); + actionLog($userid, "error", "send_ueuse", null, $e, 4); + } + }elseif((!empty($rpUniqid)) && empty($ruUniqid)){ + //-----------リプライ----------- + $toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1"); + $toUserIdQuery->bindValue(':ueuseid', $rpUniqid, PDO::PARAM_STR); + $toUserIdQuery->execute(); + $toUserId_res = $toUserIdQuery->fetch(); + + if(!(empty($toUserId_res))){ + $touserid = $toUserId_res["account"]; + }else{ + $touserid = null; + } + + changePopularity($pdo, $rpUniqid, $userid, 3); + // トランザクション開始 + $pdo->beginTransaction(); + + try { + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, rpuniqid, ueuse, photo1, photo2, photo3, photo4, video1, datetime, abi, nsfw, popularity, mentions) VALUES (:username, :account, :uniqid, :rpuniqid, :ueuse, :photo1, :photo2, :photo3, :photo4, :video1, :datetime, :abi, :nsfw, :popularity, :mentions)"); + + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->bindParam(':account', $userid, PDO::PARAM_STR); + $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); + $stmt->bindParam(':rpuniqid', $rpUniqid, PDO::PARAM_STR); + $stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR); + + $stmt->bindParam(':photo1', $save_photo1, PDO::PARAM_STR); + $stmt->bindParam(':photo2', $save_photo2, PDO::PARAM_STR); + $stmt->bindParam(':photo3', $save_photo3, PDO::PARAM_STR); + $stmt->bindParam(':photo4', $save_photo4, PDO::PARAM_STR); + $stmt->bindParam(':video1', $save_video1, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $stmt->bindParam(':nsfw', $save_nsfw, PDO::PARAM_STR); + + $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); + $stmt->bindParam(':popularity', $popularity, PDO::PARAM_INT); + $stmt->bindParam(':mentions', $mentions, PDO::PARAM_STR); + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + foreach ($mentionedUsers as $mentionedUser) { + send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention"); + } + + send_notification($touserid,$userid,"".$userid."さんが返信しました!",$ueuse,"/!".$uniqid."", "reply"); + } catch(Exception $e) { + // エラーが発生した時はロールバック + $pdo->rollBack(); + actionLog($userid, "error", "send_ueuse", null, $e, 4); + } + }elseif(empty($rpUniqid) && (!empty($ruUniqid))){ + //-----------リユーズ----------- + $toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1"); + $toUserIdQuery->bindValue(':ueuseid', $ruUniqid, PDO::PARAM_STR); + $toUserIdQuery->execute(); + $toUserId_res = $toUserIdQuery->fetch(); + + if(!(empty($toUserId_res))){ + $touserid = $toUserId_res["account"]; + }else{ + $touserid = null; + } + + changePopularity($pdo, $ruUniqid, $userid, 2); + + // トランザクション開始 + $pdo->beginTransaction(); + + try { + // SQL作成 + $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ruuniqid, ueuse, photo1, photo2, photo3, photo4, video1, datetime, abi, nsfw, popularity, mentions) VALUES (:username, :account, :uniqid, :ruuniqid, :ueuse, :photo1, :photo2, :photo3, :photo4, :video1, :datetime, :abi, :nsfw, :popularity, :mentions)"); + + $stmt->bindParam(':username', $username, PDO::PARAM_STR); + $stmt->bindParam(':account', $userid, PDO::PARAM_STR); + $stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR); + $stmt->bindParam(':ruuniqid', $ruUniqid, PDO::PARAM_STR); + $stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR); + + $stmt->bindParam(':photo1', $save_photo1, PDO::PARAM_STR); + $stmt->bindParam(':photo2', $save_photo2, PDO::PARAM_STR); + $stmt->bindParam(':photo3', $save_photo3, PDO::PARAM_STR); + $stmt->bindParam(':photo4', $save_photo4, PDO::PARAM_STR); + $stmt->bindParam(':video1', $save_video1, PDO::PARAM_STR); + $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + + $stmt->bindParam(':nsfw', $save_nsfw, PDO::PARAM_STR); + + $stmt->bindParam(':abi', $abi, PDO::PARAM_STR); + $stmt->bindParam(':popularity', $popularity, PDO::PARAM_INT); + $stmt->bindParam(':mentions', $mentions, PDO::PARAM_STR); + + + // SQLクエリの実行 + $res = $stmt->execute(); + + // コミット + $res = $pdo->commit(); + + foreach ($mentionedUsers as $mentionedUser) { + send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention"); + } + + send_notification($touserid,$userid,"".$userid."さんがリユーズしました!",$ueuse,"/!".$uniqid."", "reuse"); + + } catch(Exception $e) { + // エラーが発生した時はロールバック + $pdo->rollBack(); + actionLog($userid, "error", "send_ueuse", null, $e, 4); + } + }else{ + $error_message[] = '返信とリユーズを同時に行うことはできません。(ERROR)'; + return [false, $error_message]; + } + + if( $res ) { + return [true, $uniqid]; + } else { + $error_message[] = "ユーズに失敗しました。(REGISTERED_DAME)"; + return [false, $error_message]; + } + + // プリペアドステートメントを削除 + $stmt = null; + }else{ + actionLog($userid, "error", "send_ueuse", null, $error_message, 0); + return [false, $error_message]; + } }else{ actionLog($userid, "error", "send_ueuse", null, $error_message, 0); return [false, $error_message]; } }else{ + $error_message[] = "投稿回数のレート制限を超過しています。(OVER_RATE_LIMIT)"; actionLog($userid, "error", "send_ueuse", null, $error_message, 0); return [false, $error_message]; } }else{ - $error_message[] = "投稿回数のレート制限を超過しています。(OVER_RATE_LIMIT)"; - actionLog($userid, "error", "send_ueuse", null, $error_message, 0); + $error_message[] = "ユーズのIDに問題が発生しました。(ERROR)"; + actionLog($userid, "error", "send_ueuse", null, $error_message, 4); return [false, $error_message]; } } @@ -1981,6 +2071,15 @@ function follow_user($pdo, $to_userid, $userid){ return false; } + if ($myData["userid"] == $userData["userid"]) { + return false; + } + + if($myData["role"] == "ice" || $userData["role"] == "ice"){ + actionLog($userid, "error", "follow_user", $to_userid, "凍結されているユーザーはフォローできません。", 3); + return false; + } + $other_settings_me = is_OtherSettings($pdo, $userid); $other_settings_user = is_OtherSettings($pdo, $to_userid); if($other_settings_me === true && $other_settings_user === true){ @@ -2043,10 +2142,6 @@ function unfollow_user($pdo, $to_userid, $userid){ $myData = getUserData($pdo, $userid); $userData = getUserData($pdo, $to_userid); - if (empty($myData) || empty($userData)) { - return false; - } - $other_settings_me = is_OtherSettings($pdo, $userid); $other_settings_user = is_OtherSettings($pdo, $to_userid); if($other_settings_me === true && $other_settings_user === true){ @@ -2114,6 +2209,10 @@ function block_user($pdo, $to_userid, $userid){ return false; } + if ($myData["userid"] == $userData["userid"]) { + return false; + } + $other_settings_me = is_OtherSettings($pdo, $userid); $other_settings_user = is_OtherSettings($pdo, $to_userid); if($other_settings_me === true && $other_settings_user === true){ @@ -2453,6 +2552,11 @@ function deleteUser($pdo, $userid, $step, $job_uniqid){ $deleteQuery->bindValue(':fromuserid', $userid, PDO::PARAM_STR); $res = $deleteQuery->execute(); + // APIキー削除クエリを実行 + $deleteQuery = $pdo->prepare("DELETE FROM api WHERE userid = :userid"); + $deleteQuery->bindValue(':userid', $userid, PDO::PARAM_STR); + $res = $deleteQuery->execute(); + // アカウント削除クエリを実行 $deleteQuery = $pdo->prepare("DELETE FROM account WHERE userid = :userid"); $deleteQuery->bindValue(':userid', $userid, PDO::PARAM_STR); @@ -2555,6 +2659,8 @@ function addFavorite($pdo, $uniqid, $userid){ //1いいね解除でスコアが1減る changePopularity($pdo, $uniqid, $userid, -1); + + delete_notification(safetext($post['account']),$userid,"".$userid."さんがいいねしました!",safetext($post['ueuse']),"/!".$uniqid."","favorite"); } $pdo->beginTransaction(); @@ -2579,7 +2685,6 @@ function addFavorite($pdo, $uniqid, $userid){ return [false, "データベースエラー", null]; } } else { - $pdo->rollBack(); return [false, "投稿が見つかりませんでした", null]; } } @@ -2611,6 +2716,13 @@ function getUserData($pdo, $userid) { $query->execute(); return $query->fetch(); } +function getUserDataForUpdate($pdo, $userid) { + $query = $pdo->prepare("SELECT * FROM account WHERE userid = :userid FOR UPDATE"); + $query->bindValue(':userid', $userid, PDO::PARAM_STR); + $query->execute(); + return $query->fetch(); +} + function getUeuseData($pdo, $uniqid) { $query = $pdo->prepare("SELECT * FROM ueuse WHERE uniqid = :uniqid"); $query->bindValue(':uniqid', $uniqid, PDO::PARAM_STR); @@ -3075,4 +3187,398 @@ function is_OtherSettings($pdo, $userid, $add = true){ return true; } } + +function GetActivityPubJson($url) { + $ch = curl_init($url); + curl_setopt_array($ch, [ + CURLOPT_RETURNTRANSFER => true, + CURLOPT_FOLLOWLOCATION => true, // リダイレクトを追跡 + CURLOPT_MAXREDIRS => 10, // 最大リダイレクト回数 + CURLOPT_CONNECTTIMEOUT => 5, + CURLOPT_TIMEOUT => 10, + CURLOPT_USERAGENT => 'uwuzu-ActivityPubClient/1.0', + CURLOPT_HTTPHEADER => [ + 'Accept: application/activity+json, application/ld+json, application/json' + ] + ]); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); + $err = curl_error($ch); + curl_close($ch); + + if ($response === false || $httpCode >= 400) { + return null; + } + + $json = json_decode($response, true); + if (json_last_error() !== JSON_ERROR_NONE) { + return null; + } + + return $json; +} + +function GetActivityPubUser($userid, $domain) { + $webfingerUrl = "https://$domain/.well-known/webfinger?resource=acct:$userid@$domain"; + + $webfingerJson = GetActivityPubJson($webfingerUrl); + + if (!$webfingerJson || empty($webfingerJson['links'])) { + return ['error' => 'Failed to fetch WebFinger']; + } + + $actorUrl = null; + foreach ($webfingerJson['links'] as $link) { + if ($link['rel'] === 'self' && $link['type'] === 'application/activity+json') { + $actorUrl = $link['href']; + break; + } + } + + if (!$actorUrl) { + return ['error' => 'Actor URL not found']; + } + + $actorJson = GetActivityPubJson($actorUrl); + if (!$actorJson) { + return ['error' => 'Failed to fetch actor']; + } + + $summaryHtml = $actorJson['summary'] ?? ''; + $withNewlines = preg_replace('//i', "\n", $summaryHtml); + $plainText = strip_tags($withNewlines); + + + return [ + 'userid' => $actorJson['preferredUsername'] ?? null, + 'username' => $actorJson['name'] ?? null, + 'profile' => $plainText ?? null, + 'id' => $actorJson['id'] ?? null, + 'inbox' => $actorJson['inbox'] ?? null, + 'outbox' => $actorJson['outbox'] ?? null, + 'followers' => $actorJson['followers'] ?? null, + 'iconname' => $actorJson['icon']['url'] ?? "../img/deficon/icon.png", + 'headname' => $actorJson['image']['url'] ?? "../img/defhead/head.png", + 'datetime' => $actorJson['published'] ?? null, + 'role' => 'user', + 'other_settings' => '{}', + 'follow' => '', + 'follower' => '', + 'raw' => $actorJson + ]; +} + +function FormatUeuseItem(array $value, string $myblocklist, string $mybookmark, $pdo, string $userId): ?array { + if (in_array(safetext($value['account']), explode(",", $myblocklist))) return null; + if ($value["role"] === "ice") return null; + + $value['iconname'] = filter_var($value['iconname'], FILTER_VALIDATE_URL) + ? $value['iconname'] + : "../" . $value['iconname']; + + $value = to_null($value); + $value = to_array_safetext($value); + $value["role"] = explode(',', $value["role"]); + + if(isset($value["activitypub"]) && $value["activitypub"] == true) { + $value["activitypub"] = true; + } else { + $value["activitypub"] = false; + } + + if(isset($value["sacinfo"]) && $value["sacinfo"] == "bot") { + $value["is_bot"] = true; + } else { + $value["is_bot"] = false; + } + + if (!empty($value['rpuniqid'])) { + $value["type"] = "Reply"; + } elseif (!empty($value['ruuniqid'])) { + $value["type"] = "Reuse"; + + $reused = getUeuseData($pdo, $value['ruuniqid']); + if ($reused) { + $reusedUserData = getUserData($pdo, $reused['account']); + $reusedUserData["role"] = explode(',', $reusedUserData["role"]); + + $reused = to_null($reused); + $reused = to_array_safetext($reused); + + if(isset($reusedUserData["sacinfo"]) && $reusedUserData["sacinfo"] == "bot") { + $reusedUserData["is_bot"] = true; + } else { + $reusedUserData["is_bot"] = false; + } + + $value["reuse"] = [ + "type" => "Reuse", + "uniqid" => $reused["uniqid"], + "datetime" => $reused["datetime"], + "userid" => $reused["account"], + "userdata" => [ + "userid" => $reusedUserData["userid"], + "username" => $reusedUserData["username"], + "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) + ? $reusedUserData['iconname'] + : "../" . $reusedUserData['iconname'], + "role" => $reusedUserData["role"], + "is_bot" => $reusedUserData["is_bot"], + ], + "ueuse" => $reused["ueuse"], + "photo1" => $reused["photo1"], + "photo2" => $reused["photo2"], + "photo3" => $reused["photo3"], + "photo4" => $reused["photo4"], + "video1" => $reused["video1"], + "rpuniqid" => $reused["rpuniqid"], + "ruuniqid" => $reused["ruuniqid"], + "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), + "favoritecount" => $reused["favorite_conut"], + "replycount" => $reused["reply_count"], + "reusecount" => $reused["reuse_count"], + "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), + "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), + "abi" => [ + "abi_text" => $reused["abi"], + "abi_date" => $reused["abidate"], + ], + "is_activitypub" => $value["activitypub"], + ]; + } else { + $value["reuse"] = null; + } + } else { + $value["type"] = "Ueuse"; + } + + $ueuse = [ + "type" => $value["type"], + "uniqid" => $value["uniqid"], + "datetime" => $value["datetime"], + "userid" => $value["account"], + "userdata" => [ + "userid" => $value["account"], + "username" => $value["username"], + "iconurl" => $value['iconname'], + "role" => $value["role"], + "is_bot" => $value["is_bot"], + ], + "ueuse" => $value["ueuse"], + "photo1" => $value["photo1"], + "photo2" => $value["photo2"], + "photo3" => $value["photo3"], + "photo4" => $value["photo4"], + "video1" => $value["video1"], + "rpuniqid" => $value["rpuniqid"], + "ruuniqid" => $value["ruuniqid"], + "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), + "favoritecount" => $value["favorite_conut"], + "replycount" => $value["reply_count"], + "reusecount" => $value["reuse_count"], + "is_favorite" => in_array($userId, explode(',', $value['favorite'])), + "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), + "abi" => [ + "abi_text" => $value["abi"], + "abi_date" => $value["abidate"], + ], + "is_activitypub" => $value["activitypub"], + ]; + + if ($value["type"] === "Reuse") { + $ueuse["reuse"] = $value["reuse"]; + } + + return $ueuse; +} + +function GetAPIScopes($scope){ + $scopelist = [ + "read:me" => "重要な情報以外の自分のアカウントの情報を見る", + "write:me" => "重要な情報以外の自分のアカウントの情報を変更する", + "read:users" => "他のユーザーのアカウント情報を見る", + "read:ueuse" => "ユーズを見る", + "write:ueuse" => "ユーズの作成・削除をする", + "write:follow" => "フォロー・フォロー解除をする", + "write:favorite" => "いいねをする・解除をする", + "read:notifications" => "通知を見る", + "write:notifications" => "通知を既読にする", + "write:bookmark" => "ブックマークにユーズを追加・削除する", + "read:bookmark" => "ブックマークを見る" + ]; + if(empty($scope)){ + return $scopelist; + }else{ + if(array_key_exists($scope, $scopelist)){ + return $scopelist[$scope]; + }else{ + return false; + } + } +} + +function MinimumHash($text) { + $hash = hash('sha3-512', $text); + + for ($i = 0; $i < 5; $i++) { + $parts = str_split($hash, 2); + $new = []; + foreach ($parts as $index => $part) { + $new[] = ($index % 2 === 0) ? substr($part, 0, -1) : substr($part, 1); + } + $hash = implode('', $new); + } + + $baseChars = preg_replace('/[^a-zA-Z0-9]/', '', $text); + if ($baseChars === '') { + $baseChars = 'fallback'; + } + $baseChars = str_split($baseChars); + + $alphabet = array_merge(range('a', 'z'), range('0', '9')); + $map = []; + foreach ($alphabet as $i => $char) { + $map[$char] = $baseChars[$i % count($baseChars)]; + } + + $encoded = ''; + foreach (str_split($hash) as $char) { + if ($char === '.') continue; // ドット除外 + if (isset($map[$char])) { + $encoded .= $map[$char]; + if (strlen($encoded) === 4) break; + } + } + + return (strlen($encoded) === 4) ? $encoded : null; +} + +function GenAPIToken(int $totalLength = 64){ + $prefix = strtoupper(MinimumHash($_SERVER['HTTP_HOST'])); + $length = $totalLength - strlen($prefix); + + $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + $charLen = strlen($chars); + + $token = ''; + while (strlen($token) < $length) { + $byte = random_bytes(1); + $val = ord($byte); + if ($val < 62 * floor(256 / 62)) { + $token .= $chars[$val % $charLen]; + } + } + + return $prefix . $token; +} +function DelAPIToken($pdo, $uniqid){ + if(!(empty($uniqid))){ + $tokenQuery = $pdo->prepare("SELECT token FROM api WHERE uniqid = :uniqid"); + $tokenQuery->bindValue(':uniqid', $uniqid); + $tokenQuery->execute(); + $tokenData = $tokenQuery->fetch(); + if(!(empty($tokenData["token"]))){ + $pdo->beginTransaction(); + try { + // 削除クエリを実行 + $deleteQuery = $pdo->prepare("DELETE FROM api WHERE uniqid = :uniqid"); + $deleteQuery->bindValue(':uniqid', $uniqid, PDO::PARAM_STR); + $res = $deleteQuery->execute(); + + if ($res) { + $res = $pdo->commit(); + return true; + } else { + $pdo->rollBack(); + actionLog($uniqid, "error", "delete_api_token", null, "APIトークンの削除に失敗しました(rollBack)", 3); + return false; + } + } catch(PDOException $e) { + $pdo->rollBack(); + actionLog($uniqid, "error", "delete_api_token", null, $e, 4); + return false; + } + }else{ + actionLog($uniqid, "error", "delete_api_token", null, "カラムは存在しますがAPIトークンが存在しません", 3); + return false; + } + }else{ + return false; + } +} +function DelSessionidAPIToken($pdo, $session){ + $tokenQuery = $pdo->prepare("SELECT uniqid, userid, token FROM api WHERE sessionid = :sessionid"); + $tokenQuery->bindValue(':sessionid', $session); + $tokenQuery->execute(); + $tokenData = $tokenQuery->fetch(); + + $none = ""; + if(!(empty($tokenData["userid"]))){ + $pdo->beginTransaction(); + try { + $updateQuery = $pdo->prepare("UPDATE api SET sessionid = :sessionid WHERE uniqid = :uniqid"); + $updateQuery->bindValue(':sessionid', $none, PDO::PARAM_STR); + $updateQuery->bindValue(':uniqid', $tokenData["uniqid"], PDO::PARAM_STR); + $res = $updateQuery->execute(); + + if($res){ + $pdo->commit(); + return true; + }else{ + // ロールバック + $pdo->rollBack(); + actionLog($tokenData["userid"], "error", "DelSessionidAPIToken", $tokenData["uniqid"], "セッションIDの無効化に失敗しました!", 3); + return false; + } + } catch (Exception $e) { + // ロールバック + $pdo->rollBack(); + actionLog($tokenData["userid"], "error", "DelSessionidAPIToken", $tokenData["uniqid"], $e, 4); + return false; + } + }else{ + actionLog($tokenData["userid"], "error", "DelSessionidAPIToken", $tokenData["uniqid"], "セッションIDが存在しません。", 3); + return false; + } +} +function APIAuth($pdo, $token, $scope){ + $tokenQuery = $pdo->prepare("SELECT userid, scope FROM api WHERE token = :token"); + $tokenQuery->bindValue(':token', $token); + $tokenQuery->execute(); + $tokenData = $tokenQuery->fetch(); + + if(!(empty($tokenData["userid"]))){ + $allow_scope = array_unique(array_map('trim', explode(",", $tokenData["scope"]))); + if(in_array($scope, $allow_scope)){ + $userdata = getUserData($pdo, $tokenData["userid"]); + if(!(empty($userdata))){ + if($userdata["role"] === "ice"){ + return [false, "this_account_has_been_frozen", null]; + }else{ + return [true, "success", $userdata]; + } + }else{ + return [false, "token_invalid", null]; + } + }else{ + return [false, "not_allow_scope", null]; + } + }else{ + $userQuery = $pdo->prepare("SELECT * FROM account WHERE token = :token"); + $userQuery->bindValue(':token', $token); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if(empty($userData["userid"])){ + return [false, "token_invalid", null]; + }elseif($userData["role"] === "ice"){ + return [false, "this_account_has_been_frozen", null]; + }else{ + return [true, "success", $userData]; + } + } +} + ?> \ No newline at end of file diff --git a/home/index.php b/home/index.php index 5d52d4c..d4b976b 100644 --- a/home/index.php +++ b/home/index.php @@ -382,10 +382,15 @@ $(document).ready(function() { dataType: 'json', timeout: 300000, success: function(response) { - renderUeuses(response); - pageNumber++; - isLoading = false; - $("#loading").hide(); + if(renderUeuses(response)){ + pageNumber++; + isLoading = false; + $("#loading").hide(); + }else{ + isLoading = false; + $("#loading").hide(); + $("#error").show(); + } }, error: function(xhr, textStatus, errorThrown) { isLoading = false; @@ -401,10 +406,15 @@ $(document).ready(function() { dataType: 'json', timeout: 300000, success: function(response) { - renderUeuses(response); - pageNumber++; - isLoading = false; - $("#loading").hide(); + if(renderUeuses(response)){ + pageNumber++; + isLoading = false; + $("#loading").hide(); + }else{ + isLoading = false; + $("#loading").hide(); + $("#error").show(); + } }, error: function(xhr, textStatus, errorThrown) { isLoading = false; @@ -420,10 +430,15 @@ $(document).ready(function() { dataType: 'json', timeout: 300000, success: function(response) { - renderUeuses(response); - pageNumber++; - isLoading = false; - $("#loading").hide(); + if(renderUeuses(response)){ + pageNumber++; + isLoading = false; + $("#loading").hide(); + }else{ + isLoading = false; + $("#loading").hide(); + $("#error").show(); + } }, error: function(xhr, textStatus, errorThrown) { isLoading = false; diff --git a/img/titleimg/2.png b/img/titleimg/2.png index 525a3ea..6b85a81 100644 Binary files a/img/titleimg/2.png and b/img/titleimg/2.png differ diff --git a/img/uwuzucolorlogo.svg b/img/uwuzucolorlogo.svg index e2f3880..0679437 100644 --- a/img/uwuzucolorlogo.svg +++ b/img/uwuzucolorlogo.svg @@ -1,151 +1,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/img/uwuzuicon.png b/img/uwuzuicon.png index 75777f7..ec29a92 100644 Binary files a/img/uwuzuicon.png and b/img/uwuzuicon.png differ diff --git a/img/uwuzulogo.svg b/img/uwuzulogo.svg index e9cd4cb..5f6a036 100644 --- a/img/uwuzulogo.svg +++ b/img/uwuzulogo.svg @@ -1,195 +1,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/js/view_function.js b/js/view_function.js index 8a6c34d..49f12c3 100644 --- a/js/view_function.js +++ b/js/view_function.js @@ -2,7 +2,7 @@ var global_userid; var account_id; -function view_ueuse_init(user_id, loginid){ +function view_ueuse_init(user_id, loginid) { global_userid = user_id; global_account_id = loginid; return true; @@ -15,6 +15,7 @@ async function replaceMentions(text) { const placeholders = []; let index = 0; + // aタグの一時置き換え text = text.replace(/]*>.*?<\/a>/gi, (match) => { const placeholder = `\u2063{{PLACEHOLDER${index}}}\u2063`; placeholders.push(match); @@ -30,7 +31,8 @@ async function replaceMentions(text) { return text; } - const uniqueMentions = [...new Set(mentionMatches.map(match => match[1]))]; + // ユーザーIDを小文字に正規化 + const uniqueMentions = [...new Set(mentionMatches.map(match => match[1].toLowerCase()))]; const mentionsToFetch = uniqueMentions.filter(userID => !mentionCache[userID]); if (mentionsToFetch.length > 0) { @@ -45,21 +47,21 @@ async function replaceMentions(text) { }, dataType: 'json', timeout: 300000, - success: function(response) { + success: function (response) { if (response.success && response.users) { for (const [name, userInfo] of Object.entries(response.users)) { if (userInfo && userInfo.userid && userInfo.username) { - mentionCache[name] = `@${userInfo.username}`; + mentionCache[name.toLowerCase()] = `@${userInfo.username}`; } else { - mentionCache[name] = `@${name}`; + mentionCache[name.toLowerCase()] = `@${name}`; } } } resolve(); }, - error: function() { + error: function () { for (const name of mentionsToFetch) { - mentionCache[name] = `@${name}`; + mentionCache[name.toLowerCase()] = `@${name}`; } resolve(); } @@ -67,8 +69,13 @@ async function replaceMentions(text) { }); } - text = text.replace(/@([a-zA-Z0-9_]+)/g, (_, id) => mentionCache[id] || `@${id}`); + // 元のtextに適用(小文字で照合) + text = text.replace(/@([a-zA-Z0-9_]+)/g, (_, id) => { + const lower = id.toLowerCase(); + return mentionCache[lower] || `@${id}`; // 表示は元の大文字小文字を保持 + }); + // aタグ戻す placeholders.forEach((original, i) => { text = text.replace(`\u2063{{PLACEHOLDER${i}}}\u2063`, original); }); @@ -176,7 +183,7 @@ async function replaceCustomEmojis(text) { return text; } -function a_link(text){ +function a_link(text) { const placeholders = {}; let placeholderIndex = 0; @@ -186,10 +193,10 @@ function a_link(text){ return key; }); - text = text.replace(/(https:\/\/[\w!?\/+\-_~;.,*&@#$%()+|https:\/\/[ぁ-んァ-ヶ一ー-龠々\w\-\/?=&%.]+)/g, function(url) { + text = text.replace(/(https:\/\/[\w!?\/+\-_~;.,*&@#$%()+|https:\/\/[ぁ-んァ-ヶ一ー-龠々\w\-\/?=&%.]+)/g, function (url) { const escapedUrl = url; const no_https_link = escapedUrl.replace("https://", ""); - if(no_https_link.length > 48) { + if (no_https_link.length > 48) { const truncatedLink = no_https_link.substring(0, 48) + '...'; return `${truncatedLink}`; } else { @@ -197,15 +204,15 @@ function a_link(text){ } }); - text = text.replace(/(^|[^a-zA-Z0-9_])#([a-zA-Z0-9ぁ-んァ-ン一-龥ー_]+)/gu, function(match, before, tag) { - const encodedTag = encodeURIComponent("#"+tag); + text = text.replace(/(^|[^a-zA-Z0-9_])#([a-zA-Z0-9ぁ-んァ-ン一-龥ー_]+)/gu, function (match, before, tag) { + const encodedTag = encodeURIComponent("#" + tag); return `${before}#${tag}`; }); for (const key in placeholders) { const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); text = text.replace(new RegExp(escapedKey, 'g'), placeholders[key]); - } + } return text; } @@ -257,19 +264,19 @@ function formatMarkdown(text) { }); // マークダウン風装飾 - text = text - .replace(/\*\*\*(.+?)\*\*\*/g, '$1') - .replace(/___(.+?)___/g, '$1') - .replace(/\*\*(.+?)\*\*/g, '$1') - .replace(/__(.+?)__/g, '$1') - .replace(/\*(.+?)\*/g, '$1') - .replace(/_(.+?)_/g, '$1') - .replace(/~~(.+?)~~/g, '$1') + text = text + .replace(/\*\*\*(.+?)\*\*\*/g, '$1') + .replace(/___(.+?)___/g, '$1') + .replace(/\*\*(.+?)\*\*/g, '$1') + .replace(/__(.+?)__/g, '$1') + .replace(/\*(.+?)\*/g, '$1') + .replace(/_(.+?)_/g, '$1') + .replace(/~~(.+?)~~/g, '$1') .replace(/^>>> ?(.*)$/gm, '$1') // ここを修正 - .replace(/\|\|(.+?)\|\|/g, '$1') - .replace(/^# (.+)/gm, '

$1

') - .replace(/^## (.+)/gm, '

$1

') - .replace(/^### (.+)/gm, '

$1

') + .replace(/\|\|(.+?)\|\|/g, '$1') + .replace(/^# (.+)/gm, '

$1

') + .replace(/^## (.+)/gm, '

$1

') + .replace(/^### (.+)/gm, '

$1

') .replace(/^- (.+)/gm, '・ $1'); // 行ごとに

タグで囲む @@ -283,7 +290,7 @@ function formatMarkdown(text) { for (const key in placeholders) { const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); final = final.replace(new RegExp(escapedKey, 'g'), placeholders[key]); - } + } return final; } @@ -347,7 +354,7 @@ function YouTube_and_nicovideo_Links(postText) { embedCode = `

`; embeddedOnce = true; } - }else{ + } else { embedCode = null } } catch (e) { @@ -393,9 +400,24 @@ function formatSmartDate(datetimeStr) { return `${y}/${pad(m + 1)}/${pad(d)} ${hhmm}`; } +function getCheckIcon(userdata) { + if (userdata["role"] && userdata["role"].includes("official")) { + return `
`; + } + return ""; +} + +function getBotIcon(userdata) { + if (userdata["is_bot"] && userdata["is_bot"] == true) { + return `
Bot
`; + } + return ""; +} + async function createUeuseHtml(ueuse, selectedUniqid = null) { let html = ""; let check = ""; + let bot = ""; var reuse = ""; let contentHtml = ""; @@ -426,51 +448,49 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { var nsfw_start_html = ""; var nsfw_end_html = ""; - if (ueuse["userdata"]["role"].includes("official")) { - check = ` -
-
-
`; - } + if (ueuse["type"] == "Reuse") { + if (ueuse["reuse"]) { + check = getCheckIcon(ueuse["reuse"]["userdata"]); + bot = getBotIcon(ueuse["reuse"]["userdata"]); + } - if(ueuse["type"] == "Reuse"){ - if(ueuse["ueuse"].length > 0){ + if (ueuse["ueuse"].length > 0) { reuse = ``; - if(!(ueuse["reuse"] == null)){ + if (!(ueuse["reuse"] == null)) { // カスタム絵文字を非同期に差し替え var inyoreuseHtml = formatMarkdown(a_link(ueuse["reuse"]["ueuse"])); inyoreuseHtml = await replaceMentions(inyoreuseHtml); inyoreuseHtml = await replaceCustomEmojis(inyoreuseHtml); - inyo = `
+ inyo = ``; - }else{ + } else { inyo = `

リユーズ元のユーズは削除されました。

`; } - + contentHtml = formatMarkdown(a_link(ueuse["ueuse"])); uniqid = ueuse["uniqid"]; @@ -494,12 +514,12 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { abi = ueuse["abi"]["abi_text"]; abi_date = ueuse["abi"]["abi_date"]; - }else{ - if(!(ueuse["reuse"] == null)){ + } else { + if (!(ueuse["reuse"] == null)) { reuse = ``; inyo = ``; @@ -526,11 +546,11 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { abi = ueuse["reuse"]["abi"]["abi_text"]; abi_date = ueuse["reuse"]["abi"]["abi_date"]; - }else{ + } else { reuse = ``; inyo = ``; @@ -559,14 +579,17 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { abi_date = ueuse["abi"]["abi_date"]; } } - - }else if(ueuse["type"] == "Reply"){ - if(selectedUniqid != null && selectedUniqid == ueuse["uniqid"]){ + + } else if (ueuse["type"] == "Reply") { + check = getCheckIcon(ueuse["userdata"]); + bot = getBotIcon(ueuse["userdata"]); + + if (selectedUniqid != null && selectedUniqid == ueuse["uniqid"]) { reuse = `

一番上のユーズに返信

`; - }else{ + } else { reuse = `

一番上のユーズに返信

`; } - + inyo = ``; contentHtml = formatMarkdown(a_link(ueuse["ueuse"])); @@ -591,37 +614,40 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { abi = ueuse["abi"]["abi_text"]; abi_date = ueuse["abi"]["abi_date"]; - }else if(ueuse["type"] == "User"){ + } else if (ueuse["type"] == "User") { html = ` `; return html; - }else{ + } else { + check = getCheckIcon(ueuse["userdata"]); + bot = getBotIcon(ueuse["userdata"]); + reuse = ``; inyo = ``; contentHtml = formatMarkdown(a_link(ueuse["ueuse"])); @@ -649,23 +675,23 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { abi_date = ueuse["abi"]["abi_date"]; } - if(abi != "" && typeof abi === "string") { + if (abi != "" && typeof abi === "string") { abi = formatMarkdown(a_link(abi)); abi = await replaceMentions(abi); abi = await replaceCustomEmojis(abi); - + abi_html = `
-

`+await replaceCustomEmojis(username)+`さんが追記しました

-

`+abi+`

-
`+formatSmartDate(abi_date)+`
+

`+ await replaceCustomEmojis(username) + `さんが追記しました

+

`+ abi + `

+
`+ formatSmartDate(abi_date) + `
`; addabi = ``; - }else{ + } else { abi_html = ``; - if(global_userid == userid){ - addabi = ``; - }else{ + if (global_userid == userid) { + addabi = ``; + } else { addabi = ``; } } @@ -684,8 +710,8 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { let is_reu = { "class": "reuse" }; - if(ueuse["type"] == "Reuse"){ - if(!(ueuse["ueuse"].length > 0)){ + if (ueuse["type"] == "Reuse") { + if (!(ueuse["ueuse"].length > 0)) { if (global_userid == ueuse["userdata"]["userid"]) { is_reu = { "class": "reuse reuse_after" @@ -705,74 +731,74 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { }; } - if(is_nsfw == true){ - nsfw_html = `
+ if (is_nsfw == true) { + nsfw_html = `

NSFW指定がされている投稿です!
職場や公共の場での表示には適さない場合があります。
表示ボタンを押すと表示されます。

` - nsfw_start_html = `
` + nsfw_start_html = `
` nsfw_end_html = `
` } - if(img1.length > 0){ - if(img2.length > 0){ - if(img3.length > 0){ - if(img4.length > 0){ + if (img1.length > 0) { + if (img2.length > 0) { + if (img3.length > 0) { + if (img4.length > 0) { img_html = ``; - }else{ + } else { img_html = ``; } - }else{ + } else { img_html = ``; } - }else{ + } else { img_html = ``; } - }else{ + } else { img_html = ``; } - if(vid1.length > 0){ + if (vid1.length > 0) { vid_html = `
- +
`; } @@ -780,66 +806,74 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) { contentHtml = await replaceMentions(contentHtml); contentHtml = await replaceCustomEmojis(contentHtml); - if(ueuse["type"] == "Reuse"){ - if(ueuse["ueuse"].length > 0){ - if(YouTube_and_nicovideo_Links(ueuse["ueuse"])){ - contentHtml = contentHtml+YouTube_and_nicovideo_Links(ueuse["ueuse"]); + if (ueuse["type"] == "Reuse") { + if (ueuse["ueuse"].length > 0) { + if (YouTube_and_nicovideo_Links(ueuse["ueuse"])) { + contentHtml = contentHtml + YouTube_and_nicovideo_Links(ueuse["ueuse"]); } - }else{ - if(YouTube_and_nicovideo_Links(ueuse["reuse"]["ueuse"])){ - contentHtml = contentHtml+YouTube_and_nicovideo_Links(ueuse["reuse"]["ueuse"]); + } else { + if (YouTube_and_nicovideo_Links(ueuse["reuse"]["ueuse"])) { + contentHtml = contentHtml + YouTube_and_nicovideo_Links(ueuse["reuse"]["ueuse"]); } } - - }else{ - if(YouTube_and_nicovideo_Links(ueuse["ueuse"])){ - contentHtml = contentHtml+YouTube_and_nicovideo_Links(ueuse["ueuse"]); + + } else { + if (YouTube_and_nicovideo_Links(ueuse["ueuse"])) { + contentHtml = contentHtml + YouTube_and_nicovideo_Links(ueuse["ueuse"]); } } + var favbox = ` +
+
+ + + ` + replycount + ` + + + `+ addabi + ` + +
+ ` + + if (ueuse["is_activitypub"] == true) { + favbox = ""; + } html = ` -
- `+reuse+` +
+ `+ reuse + ` - `+nsfw_html+` - `+nsfw_start_html+` -
`+contentHtml+`
- `+img_html+` - `+vid_html+` - `+inyo+` - `+abi_html+` - `+nsfw_end_html+` -
-
- - - `+replycount+` - - - `+addabi+` - + `+ bot + ` + `+ check + ` +
`+ formatSmartDate(datetime) + `
+ `+ nsfw_html + ` + `+ nsfw_start_html + ` +
`+ contentHtml + `
+ `+ img_html + ` + `+ vid_html + ` + `+ inyo + ` + `+ abi_html + ` + `+ nsfw_end_html + ` + `+ favbox + `
`; return html; } function createAdsHtml(ads) { - if(!(ads == null || ads == "")){ + if (!(ads == null || ads == "")) { var ads_html = ``; return ads_html; - }else{ + } else { var ads_html = ``; return ads_html; } @@ -847,15 +881,16 @@ function createAdsHtml(ads) { // 投稿一覧を非同期で全部HTML化 → そのあと順番通りにappend async function renderUeuses(ueuseData, selectedUniqid = null) { - if(ueuseData["success"] == false){ + if (ueuseData["success"] == false) { var errmsg; - if(ueuseData["error"] == "no_ueuse"){ + if (ueuseData["error"] == "no_ueuse") { errmsg = "ユーズがありません"; - }else if(ueuseData["error"] == "bad_request"){ + } else if (ueuseData["error"] == "bad_request") { errmsg = "不正なリクエストが検出されました"; } - $("#postContainer").append(`

`+errmsg+`

`); - }else{ + $("#postContainer").append(`

` + errmsg + `

`); + return true; + } else { var htmlList = []; var ueuseList = ueuseData["ueuses"]; for (const ueuse of ueuseList) { @@ -871,5 +906,75 @@ async function renderUeuses(ueuseData, selectedUniqid = null) { for (const html of htmlList) { $("#postContainer").append(html); } + return true; + } +} + + +async function createNotificationHtml(notification) { + let html = ""; + let is_readclass = ""; + let datetime = notification["datetime"]; + let userid = notification["userdata"]["userid"]; + let username = notification["userdata"]["username"]; + let iconurl = notification["userdata"]["iconurl"]; + let title = notification["title"]; + let content = formatMarkdown(a_link(notification["message"])); + content = await replaceMentions(content); + content = await replaceCustomEmojis(content); + + let url = notification["url"]; + + if(notification["is_read"] == false) { + is_readclass = "this"; + } + + html = ` +
+
+
`+formatSmartDate(datetime)+`
+
+ +

`+await replaceCustomEmojis(title)+`

+

`+content+`

+ 詳細をみる +
+ `; + return html; +} + +async function renderNotifications(notificationData) { + if (notificationData["success"] == false) { + var errmsg; + if (notificationData["error"] == "no_notification") { + errmsg = "通知がありません"; + } else if (notificationData["error"] == "bad_request") { + errmsg = "不正なリクエストが検出されました"; + } + $("#postContainer").append(`

` + errmsg + `

`); + return true; + } else { + var htmlList = []; + var notificationList = notificationData["notifications"]; + + for (const notification of notificationList) { + const html = await createNotificationHtml(notification); + htmlList.push(html); + } + + // 投稿順を保ったままDOMへ追加 + for (const html of htmlList) { + $("#postContainer").append(html); + } + return true; } } \ No newline at end of file diff --git a/manifest/icon-512x512.png b/manifest/icon-512x512.png index 1b19c27..ec29a92 100644 Binary files a/manifest/icon-512x512.png and b/manifest/icon-512x512.png differ diff --git a/nextpage/bookmarktimeline.php b/nextpage/bookmarktimeline.php index 8ea0723..5b77b56 100644 --- a/nextpage/bookmarktimeline.php +++ b/nextpage/bookmarktimeline.php @@ -140,109 +140,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $ueuseItems = array(); if(!empty($messages)){ foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } diff --git a/nextpage/followtimeline.php b/nextpage/followtimeline.php index 3c73c97..739e579 100644 --- a/nextpage/followtimeline.php +++ b/nextpage/followtimeline.php @@ -137,109 +137,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $ueuseItems = array(); if(!empty($messages)){ foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } diff --git a/nextpage/foryoutimeline.php b/nextpage/foryoutimeline.php index 7f904cb..9ac4f6f 100644 --- a/nextpage/foryoutimeline.php +++ b/nextpage/foryoutimeline.php @@ -255,109 +255,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $ueuseItems = array(); if(!empty($messages)){ foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } diff --git a/nextpage/localtimeline.php b/nextpage/localtimeline.php index 21dd1ce..5eedaec 100644 --- a/nextpage/localtimeline.php +++ b/nextpage/localtimeline.php @@ -119,109 +119,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $ueuseItems = array(); if(!empty($messages)){ foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } diff --git a/nextpage/notification.php b/nextpage/notification.php index 7938454..70929fa 100644 --- a/nextpage/notification.php +++ b/nextpage/notification.php @@ -20,93 +20,125 @@ try { // 接続エラーのときエラー内容を取得する $error_message[] = $e->getMessage(); } -if (isset($_GET['userid']) && isset($_GET['account_id'])) { - $userid = safetext($_GET['userid']); - $loginid = safetext($_GET['account_id']); +if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) { + $userid = safetext($_POST['userid']); + $loginid = safetext($_POST['account_id']); + $loginkey = safetext($_COOKIE['loginkey']); - $query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1'); - - $query->execute(array(':userid' => $userid)); - - $result2 = $query->fetch(); - - if(!(empty($result2["loginid"]))){ - if($result2["loginid"] === $loginid){ - - $aduserinfoQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo,blocklist,bookmark FROM account WHERE userid = :userid"); - $aduserinfoQuery->bindValue(':userid', safetext($userid)); - $aduserinfoQuery->execute(); - $res = $aduserinfoQuery->fetch(); - $myblocklist = safetext($res["blocklist"]); - - $userid = safetext($_GET['userid']); - - $itemsPerPage = 15; // 1ページあたりの投稿数 - $pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1; - if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){ - $pageNumber = 1; - } - $offset = ($pageNumber - 1) * $itemsPerPage; - - $messages = array(); - - if (!empty($pdo)) { - $messageQuery = $pdo->prepare("SELECT fromuserid,title,msg,url,datetime,userchk FROM notification WHERE touserid = :userid ORDER BY datetime DESC LIMIT :offset, :itemsPerPage"); - $messageQuery->bindValue(':userid', $userid, PDO::PARAM_STR); - $messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT); - $messageQuery->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT); - $messageQuery->execute(); - $message_array = $messageQuery->fetchAll(); - - // トランザクション開始 - $pdo->beginTransaction(); - - // SQL作成 - $stmt = $pdo->prepare("UPDATE notification SET userchk = 'done' WHERE touserid = :userid;"); - - $stmt->bindValue(':userid', $userid, PDO::PARAM_STR); - - $res = $stmt->execute(); - $res = $pdo->commit(); - - if (!empty($message_array)) { - foreach ($message_array as $value) { - $value["servericon"] = safetext($serversettings["serverinfo"]["server_icon"]); - if(!(empty($value['fromuserid']))){ - if(!($value['fromuserid'] == "uwuzu-fromsys")){ - $userQuery = $pdo->prepare("SELECT username,iconname FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $value['fromuserid']); - $userQuery->execute(); - $user_array = $userQuery->fetch(); - if(!(empty($user_array))){ - $value['fromusericon'] = filter_var($user_array["iconname"], FILTER_VALIDATE_URL) ? $user_array["iconname"] : "../" . $user_array["iconname"]; - $value['fromusername'] = $user_array["username"]; - }else{ - $value['fromusericon'] = "../img/deficon/icon.png"; - $value['fromusername'] = "でふぉると"; - } - } - } - $messageDisplay = new MessageDisplay($value); // userid を渡さない - $messageDisplay->display(); - } - } else { - echo '

通知はありません

'; - } - - - $pdo = null; - - }else{ - echo '

取得に失敗しました。

'; - } - }else{ - echo '

取得に失敗しました。

'; - } - }else{ - echo '

取得に失敗しました。

'; + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user"); + if ($is_login === false) { + echo json_encode(['success' => false, 'error' => 'bad_request']); + exit; } -}else{ - echo '

取得に失敗しました。

'; + + $myblocklist = getUserData($pdo, $userid)["blocklist"]; + + $itemsPerPage = 15; // 1ページあたりの投稿数 + $pageNumber = safetext(isset($_POST['page'])) ? safetext(intval($_POST['page'])) : 1; + if ($pageNumber <= 0 || (!(is_numeric($pageNumber)))) { + $pageNumber = 1; + } + $offset = ($pageNumber - 1) * $itemsPerPage; + + $messages = array(); + + if (!empty($pdo)) { + $messageQuery = $pdo->prepare("SELECT fromuserid,title,msg,url,datetime,userchk FROM notification WHERE touserid = :userid ORDER BY datetime DESC LIMIT :offset, :itemsPerPage"); + $messageQuery->bindValue(':userid', $userid, PDO::PARAM_STR); + $messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT); + $messageQuery->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT); + $messageQuery->execute(); + $message_array = $messageQuery->fetchAll(); + + // トランザクション開始 + $pdo->beginTransaction(); + + // SQL作成 + $stmt = $pdo->prepare("UPDATE notification SET userchk = 'done' WHERE touserid = :userid;"); + + $stmt->bindValue(':userid', $userid, PDO::PARAM_STR); + + $res = $stmt->execute(); + $res = $pdo->commit(); + + if (!empty($message_array)) { + foreach ($message_array as $value) { + $value["servericon"] = safetext($serversettings["serverinfo"]["server_icon"]); + if (!(empty($value['fromuserid']))) { + if (!($value['fromuserid'] == "uwuzu-fromsys")) { + $userQuery = $pdo->prepare("SELECT username,iconname FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $value['fromuserid']); + $userQuery->execute(); + $user_array = $userQuery->fetch(); + if (!(empty($user_array))) { + $value['fromusericon'] = filter_var($user_array["iconname"], FILTER_VALIDATE_URL) ? $user_array["iconname"] : "../" . $user_array["iconname"]; + $value['fromusername'] = $user_array["username"]; + } else { + $value['fromusericon'] = "../img/deficon/icon.png"; + $value['fromusername'] = "でふぉると"; + } + }else{ + $value['fromusericon'] = safetext($value["servericon"]); + $value['fromusername'] = "uwuzu"; + } + } + + if($value["userchk"] === "done"){ + $value["userchk"] = true; + }else{ + $value["userchk"] = false; + } + + $formatted = [ + "type" => "notification", + "datetime" => $value["datetime"], + "userid" => $value["fromuserid"], + "userdata" => [ + "userid" => $value["fromuserid"], + "username" => $value["fromusername"], + "iconurl" => $value['fromusericon'], + ], + "message" => $value["msg"], + "url" => $value["url"], + "title" => $value["title"], + "is_read" => $value["userchk"], + ]; + + if ($formatted !== null) { + $notificationItems[] = $formatted; + } + } + + $item = array( + "success" => true, + "notifications" => $notificationItems + ); + + echo json_encode($item, JSON_UNESCAPED_UNICODE); + } else { + $item = array( + "success" => false, + "notifications" => null, + "error" => "no_notification", + ); + echo json_encode($item, JSON_UNESCAPED_UNICODE); + } + + + $pdo = null; + } else { + $item = array( + "success" => false, + "notifications" => null, + "error" => "bad_request", + ); + echo json_encode($item, JSON_UNESCAPED_UNICODE); + } +} else { + $item = array( + "success" => false, + "notifications" => null, + "error" => "bad_request", + ); + echo json_encode($item, JSON_UNESCAPED_UNICODE); } -?> diff --git a/nextpage/searchtimeline.php b/nextpage/searchtimeline.php index 8ee0cce..8d8b86b 100644 --- a/nextpage/searchtimeline.php +++ b/nextpage/searchtimeline.php @@ -149,109 +149,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $ueuseItems = array(); if(!empty($messages)){ foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } diff --git a/nextpage/ueusetimeline.php b/nextpage/ueusetimeline.php index d6e7056..9fabc8f 100644 --- a/nextpage/ueusetimeline.php +++ b/nextpage/ueusetimeline.php @@ -133,109 +133,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $ueuseItems = array(); if(!empty($messages)){ foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } diff --git a/nextpage/userliketimeline.php b/nextpage/userliketimeline.php index 17904fa..4ac781e 100644 --- a/nextpage/userliketimeline.php +++ b/nextpage/userliketimeline.php @@ -3,6 +3,9 @@ header('Content-Type: application/json'); require('../db.php'); require('../function/function.php'); blockedIP($_SERVER['REMOTE_ADDR']); +$domain = $_SERVER['HTTP_HOST']; +$serversettings_file = "../server/serversettings.ini"; +$serversettings = parse_ini_file($serversettings_file, true); if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey'])) && safetext(isset($_POST['id']))) { $page = safetext($_POST['page']); @@ -11,6 +14,36 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $loginid = safetext($_POST['account_id']); $loginkey = safetext($_COOKIE['loginkey']); + if (safetext($serversettings["serverinfo"]["server_activitypub"]) === "true") { + if (isset($_POST['activity_domain'])) { + $activity_domain = safetext($_POST['activity_domain']) ? safetext($_POST['activity_domain']) : ''; + + if (!($activity_domain == $domain)) { + $domain_response = GetActivityPubUser($uwuzuid, $activity_domain); + if (empty($domain_response) || array_key_exists("error", $domain_response)) { + $userData = null; + } else { + $userData = $domain_response; + } + //var_dump($domain_response); + $is_local = false; + $item = array( + "success" => false, + "ueuses" => null, + "ads" => null, + "error" => "no_ueuse", + ); + echo json_encode($item, JSON_UNESCAPED_UNICODE); + exit; + } else { + $is_local = true; + } + } + } else { + $activity_domain = $domain; + $is_local = true; + } + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user"); if ($is_login === false) { echo json_encode(['success' => false, 'error' => 'bad_request']); @@ -130,109 +163,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $ueuseItems = array(); if(!empty($messages)){ foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } diff --git a/nextpage/usermediatimeline.php b/nextpage/usermediatimeline.php index 666796b..c12fd5c 100644 --- a/nextpage/usermediatimeline.php +++ b/nextpage/usermediatimeline.php @@ -3,6 +3,9 @@ header('Content-Type: application/json'); require('../db.php'); require('../function/function.php'); blockedIP($_SERVER['REMOTE_ADDR']); +$domain = $_SERVER['HTTP_HOST']; +$serversettings_file = "../server/serversettings.ini"; +$serversettings = parse_ini_file($serversettings_file, true); if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey'])) && safetext(isset($_POST['id']))) { $page = safetext($_POST['page']); @@ -11,6 +14,36 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $loginid = safetext($_POST['account_id']); $loginkey = safetext($_COOKIE['loginkey']); + if (safetext($serversettings["serverinfo"]["server_activitypub"]) === "true") { + if (isset($_POST['activity_domain'])) { + $activity_domain = safetext($_POST['activity_domain']) ? safetext($_POST['activity_domain']) : ''; + + if (!($activity_domain == $domain)) { + $domain_response = GetActivityPubUser($uwuzuid, $activity_domain); + if (empty($domain_response) || array_key_exists("error", $domain_response)) { + $userData = null; + } else { + $userData = $domain_response; + } + //var_dump($domain_response); + $is_local = false; + $item = array( + "success" => false, + "ueuses" => null, + "ads" => null, + "error" => "no_ueuse", + ); + echo json_encode($item, JSON_UNESCAPED_UNICODE); + exit; + } else { + $is_local = true; + } + } + } else { + $activity_domain = $domain; + $is_local = true; + } + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user"); if ($is_login === false) { echo json_encode(['success' => false, 'error' => 'bad_request']); @@ -127,109 +160,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $ueuseItems = array(); if(!empty($messages)){ foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } diff --git a/nextpage/usertimeline.php b/nextpage/usertimeline.php index 840e9c7..8d9da4c 100644 --- a/nextpage/usertimeline.php +++ b/nextpage/usertimeline.php @@ -3,6 +3,9 @@ header('Content-Type: application/json'); require('../db.php'); require('../function/function.php'); blockedIP($_SERVER['REMOTE_ADDR']); +$domain = $_SERVER['HTTP_HOST']; +$serversettings_file = "../server/serversettings.ini"; +$serversettings = parse_ini_file($serversettings_file, true); if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey'])) && safetext(isset($_POST['id']))) { $page = safetext($_POST['page']); @@ -11,6 +14,29 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $loginid = safetext($_POST['account_id']); $loginkey = safetext($_COOKIE['loginkey']); + if (safetext($serversettings["serverinfo"]["server_activitypub"]) === "true") { + if (isset($_POST['activity_domain'])) { + $activity_domain = safetext($_POST['activity_domain']) ? safetext($_POST['activity_domain']) : ''; + + if (!($activity_domain == $domain)) { + $domain_response = GetActivityPubUser($uwuzuid, $activity_domain); + if (empty($domain_response) || array_key_exists("error", $domain_response)) { + $userData = null; + } else { + $userData = $domain_response; + } + //var_dump($domain_response); + $is_local = false; + } else { + $is_local = true; + } + } + } else { + $activity_domain = $domain; + $is_local = true; + } + + $is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user"); if ($is_login === false) { echo json_encode(['success' => false, 'error' => 'bad_request']); @@ -36,69 +62,167 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $itemsPerPage = 15; // 1ページあたりのユーズ数 $pageNumber = $page; - if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){ + if ($pageNumber <= 0 || (!(is_numeric($pageNumber)))) { $pageNumber = 1; } $offset = ($pageNumber - 1) * $itemsPerPage; $messages = array(); - - $userQuery = $pdo->prepare("SELECT username, userid, profile, role, follower FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $uwuzuid); - $userQuery->execute(); - $userData = $userQuery->fetch(); - - $messageQuery = $pdo->prepare("SELECT * FROM ueuse WHERE account = :userid AND rpuniqid = ''ORDER BY datetime DESC LIMIT :offset, :itemsPerPage"); - $messageQuery->bindValue(':userid', $uwuzuid); - $messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT); - $messageQuery->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT); - $messageQuery->execute(); - $message_array = $messageQuery->fetchAll(); - - $messages = array(); - foreach ($message_array as $row) { - $messages[] = $row; - } - // ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える - foreach ($messages as &$message) { - $userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $message["account"]); + if ($is_local === true) { + $userQuery = $pdo->prepare("SELECT username, userid, profile, role, follower FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $uwuzuid); $userQuery->execute(); $userData = $userQuery->fetch(); - if ($userData) { - $message['iconname'] = $userData['iconname']; - $message['headname'] = $userData['headname']; - $message['username'] = $userData['username']; - $message['sacinfo'] = $userData['sacinfo']; - $message['role'] = $userData['role']; + $messageQuery = $pdo->prepare("SELECT * FROM ueuse WHERE account = :userid AND rpuniqid = ''ORDER BY datetime DESC LIMIT :offset, :itemsPerPage"); + $messageQuery->bindValue(':userid', $uwuzuid); + $messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT); + $messageQuery->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT); + $messageQuery->execute(); + $message_array = $messageQuery->fetchAll(); + + foreach ($message_array as $row) { + $messages[] = $row; } - //リプライ数取得 - $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); - $rpQuery->bindValue(':rpuniqid', $message['uniqid']); - $rpQuery->execute(); - $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); - - if ($rpData){ - $message['reply_count'] = $rpData['reply_count']; - } + // ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える + foreach ($messages as &$message) { + $userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $message["account"]); + $userQuery->execute(); + $userData = $userQuery->fetch(); - //リユーズ数取得 - $ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid"); - $ruQuery->bindValue(':ruuniqid', $message['uniqid']); - $ruQuery->execute(); - $ruData = $ruQuery->fetch(PDO::FETCH_ASSOC); - - if ($ruData){ - $message['reuse_count'] = $ruData['reuse_count']; - } + if ($userData) { + $message['iconname'] = $userData['iconname']; + $message['headname'] = $userData['headname']; + $message['username'] = $userData['username']; + $message['sacinfo'] = $userData['sacinfo']; + $message['role'] = $userData['role']; + } - $fav = $message['favorite']; - $favIds = explode(',', $fav); - $message["favorite_conut"] = count($favIds)-1; + //リプライ数取得 + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $message['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData) { + $message['reply_count'] = $rpData['reply_count']; + } + + //リユーズ数取得 + $ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid"); + $ruQuery->bindValue(':ruuniqid', $message['uniqid']); + $ruQuery->execute(); + $ruData = $ruQuery->fetch(PDO::FETCH_ASSOC); + + if ($ruData) { + $message['reuse_count'] = $ruData['reuse_count']; + } + + $fav = $message['favorite']; + $favIds = explode(',', $fav); + $message["favorite_conut"] = count($favIds) - 1; + } + } elseif($userData != null) { + $activity_base = GetActivityPubJson($userData['outbox']); + $pageUrl = $activity_base['first'] ?? null; + + $pageNumber = max(1, (int)$page); // 1ページ目以上に固定 + $currentPageData = null; + + for ($i = 1; $i <= $pageNumber; $i++) { + if (!$pageUrl) break; + + $currentPageData = GetActivityPubJson($pageUrl); + + // 目的のページに達していなければ next をたどる + if ($i < $pageNumber) { + $pageUrl = $currentPageData['next'] ?? null; + } + } + $orderedItems = $currentPageData['orderedItems'] ?? []; + + $createItems = array_filter($orderedItems, function ($item) { + return isset($item['type']) && $item['type'] === 'Create'; + }); + $createItems = array_values($createItems); + + foreach ($createItems as $item) { + // object がURLなら取得 + $object = $item['object'] ?? null; + if (is_string($object)) { + $object = GetActivityPubJson($object); + } + + // nullや不正なobjectはスキップ + if (!is_array($object)) continue; + + $contentHtml = $object['content'] ?? ''; + $withNewlines = preg_replace('//i', "\n", $contentHtml); + $plainContent = strip_tags($withNewlines); + + $photos = []; + $video = null; + + if (!empty($object['attachment'])) { + $attachments = is_array($object['attachment']) ? $object['attachment'] : [$object['attachment']]; + + foreach ($attachments as $att) { + if (!is_array($att)) continue; + + $mediaType = $att['mediaType'] ?? ''; + $url = $att['url'] ?? ($att['href'] ?? null); + + if (!$url) continue; + + // 画像(mediaTypeで判定) + if (str_starts_with($mediaType, 'image/')) { + if (count($photos) < 4) { + $photos[] = $url; + } + } + + // 動画(mediaTypeで判定) + if (str_starts_with($mediaType, 'video/') && !$video) { + $video = $url; + } + } + } + + $messages[] = [ + "rpuniqid" => "", + "ruuniqid" => "", + "uniqid" => "", + "datetime" => date("Y-m-d H:i:s", strtotime($object["published"] ?? "now")), + "account" => $userData["userid"] . "@" . $activity_domain, + "username" => $userData["username"], + "iconname" => $userData["iconname"], + "headname" => $userData["headname"] ?? null, + "role" => $userData["role"] ?? "user", + "sacinfo" => "", + "ueuse" => $plainContent, + "photo1" => $photos[0] ?? null, + "photo2" => $photos[1] ?? null, + "photo3" => $photos[2] ?? null, + "photo4" => $photos[3] ?? null, + "video1" => $video, + "nsfw" => $object["sensitive"] ?? false, + "favorite" => "", + "favorite_conut" => 0, + "reply_count" => 0, + "reuse_count" => 0, + "abi" => "", + "abidate" => null, + "activitypub" => true, + ]; + } + }else{ + $message = array(); } + + //adsystem------------------ $message['ads'] = "false"; @@ -109,7 +233,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe $adsQuery->bindValue(':today', $today); $adsQuery->execute(); $adsresult = $adsQuery->fetch(); - if(!(empty($adsresult))){ + if (!(empty($adsresult))) { $message['ads'] = "true"; $message['ads_url'] = $adsresult["url"]; $message['ads_img_url'] = $adsresult["image_url"]; @@ -118,122 +242,22 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe //-------------------------- $ueuseItems = array(); - if(!empty($messages)){ + if (!empty($messages)) { foreach ($messages as $value) { - if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){ - if(!($value["role"] === "ice")){ - if(filter_var($value['iconname'], FILTER_VALIDATE_URL)){ - $value['iconname'] = $value['iconname']; - }else{ - $value['iconname'] = "../" . $value['iconname']; - } - - // ""や"none"をnullに変換 - $value = to_null($value); - $value = to_array_safetext($value); - - $value["role"] = explode(',', $value["role"]); - - if(!empty($value['rpuniqid'])){ - $value["type"] = "Reply"; - //リユーズどうするから始める - }elseif(!empty($value['ruuniqid'])){ - $value["type"] = "Reuse"; - $reused = getUeuseData($pdo, $value['ruuniqid']); // 例:ruuniqidから元投稿を取得する関数 - if ($reused) { - $reusedUserData = getUserData($pdo, $reused['account']); // 例:元投稿のユーザー情報を取得する関数 - $reusedUserData["role"] = explode(',', $reusedUserData["role"]); - // ""や"none"をnullに変換 - $reused = to_null($reused); - $reused = to_array_safetext($reused); - // Reusedataを作成 - $value["reuse"] = array( - "type" => "Reuse", - "uniqid" => $reused["uniqid"], - "datetime" => $reused["datetime"], - "userid" => $reused["account"], - "userdata" => array( - "userid" => $reusedUserData["userid"], - "username" => $reusedUserData["username"], - "iconurl" => filter_var($reusedUserData['iconname'], FILTER_VALIDATE_URL) - ? $reusedUserData['iconname'] - : "../" . $reusedUserData['iconname'], - "role" => $reusedUserData["role"], - ), - "ueuse" => $reused["ueuse"], - "photo1" => $reused["photo1"], - "photo2" => $reused["photo2"], - "photo3" => $reused["photo3"], - "photo4" => $reused["photo4"], - "video1" => $reused["video1"], - "rpuniqid" => $reused["rpuniqid"], - "ruuniqid" => $reused["ruuniqid"], - "nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $reused["favorite_conut"], - "replycount" => $reused["reply_count"], - "reusecount" => $reused["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $reused['favorite'])), - "is_bookmark" => in_array($reused["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $reused["abi"], - "abi_date" => $reused["abidate"], - ), - ); - }else{ - $value["reuse"] = null; - } - }else{ - $value["type"] = "Ueuse"; - } - - $ueuse = array( - "type" => $value["type"], - "uniqid" => $value["uniqid"], - "datetime" => $value["datetime"], - "userid" => $value["account"], - "userdata" => array( - "userid" => $value["account"], - "username" => $value["username"], - "iconurl" => $value['iconname'], - "role" => $value["role"], - ), - "ueuse" => $value["ueuse"], - "photo1" => $value["photo1"], - "photo2" => $value["photo2"], - "photo3" => $value["photo3"], - "photo4" => $value["photo4"], - "video1" => $value["video1"], - "rpuniqid" => $value["rpuniqid"], - "ruuniqid" => $value["ruuniqid"], - "nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN), - "favoritecount" => $value["favorite_conut"], - "replycount" => $value["reply_count"], - "reusecount" => $value["reuse_count"], - "is_favorite" => in_array($userId, explode(',', $value['favorite'])), - "is_bookmark" => in_array($value["uniqid"], explode(',', $mybookmark)), - "abi" => array( - "abi_text" => $value["abi"], - "abi_date" => $value["abidate"], - ), - ); - - if ($value["type"] === "Reuse") { - $ueuse["reuse"] = $value["reuse"]; - } - - $ueuseItems[] = $ueuse; - } + $formatted = FormatUeuseItem($value, $myblocklist, $mybookmark, $pdo, $userId); + if ($formatted !== null) { + $ueuseItems[] = $formatted; } } - if($message['ads'] === "true"){ + if ($message['ads'] === "true") { $adsystem = array( "type" => "Ads", "url" => $message['ads_url'], "imgurl" => $message['ads_img_url'], "memo" => $message['ads_memo'], ); - }else{ + } else { $adsystem = null; } @@ -242,9 +266,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe "ueuses" => $ueuseItems, "ads" => $adsystem, ); - + echo json_encode($item, JSON_UNESCAPED_UNICODE); - }else{ + } else { $item = array( "success" => false, "ueuses" => null, @@ -253,10 +277,10 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe ); echo json_encode($item, JSON_UNESCAPED_UNICODE); } - + $pdo = null; } -}else{ +} else { $item = array( "success" => false, "ueuses" => null, @@ -265,4 +289,3 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe ); echo json_encode($item, JSON_UNESCAPED_UNICODE); } -?> diff --git a/notification/index.php b/notification/index.php index 09d4621..53d59a8 100644 --- a/notification/index.php +++ b/notification/index.php @@ -79,6 +79,7 @@ $pdo = null; + @@ -130,29 +131,34 @@ $pdo = null; - - - - - -その他の項目 - <?php echo safetext($serversettings["serverinfo"]["server_name"]);?> + + + + + + + + + + その他の項目 - <?php echo safetext($serversettings["serverinfo"]["server_name"]); ?> - +
+ +
+
- -
    - -

    - -
- -
+ +
    + +

    + +
+ + -

セッショントークンの再生成

-

下のセッショントークン再生成ボタンを押すと全てのログイン中のデバイスからログアウトされます。
再度uwuzu使用するにはログインが必須になります。

- +

セッショントークンの再生成

+

下のセッショントークン再生成ボタンを押すと全てのログイン中のデバイスからログアウトされます。
再度uwuzu使用するにはログインが必須になります。

+ -
+
-

ログアウト

-

ログアウトです。他のログイン済みの端末からはログアウトされません。

- +

ログアウト

+

ログアウトです。他のログイン済みの端末からはログアウトされません。

+ -
+
-

キャッシュクリア

-

下のボタンを押すことでキャッシュクリアが可能です。

-
この機能は試験的なものであり、正常に動作しない可能性があります。
- +

キャッシュクリア

+

下のボタンを押すことでキャッシュクリアが可能です。

+
この機能は試験的なものであり、正常に動作しない可能性があります。
+ -
+
-

チュートリアル

-

uwuzuの基礎的なチュートリアルを行うことができます!

- +

チュートリアル

+

uwuzuの基礎的なチュートリアルを行うことができます!

+ -
-

他のサーバーへアカウント移行

-

uwuzuサーバー同士でのアカウント移行が可能になりました!

- -

このアカウントは凍結されているため移行できません。

- - アカウント移行 - +
+

他のサーバーへアカウント移行

+

uwuzuサーバー同士でのアカウント移行が可能になりました!

+ +

このアカウントは凍結されているため移行できません。

+ + アカウント移行 + -
-

アカウント削除

-

アカウント誤削除を防ぐため下の入力ボックスにご自身のユーザーIDを入力する必要があります。

- -

あなたはこのサーバーの管理者のようです。
管理者アカウントの移行は済んでいますか?
アカウントを削除しても大丈夫なのですか...?

- -
-

確認用ユーザーID

- -
- - -
-

API

-

APIの使用方法はdocs.uwuzu.xyzよりAPIドキュメントをご確認ください。

+
+

アカウント削除

+

アカウント誤削除を防ぐため下の入力ボックスにご自身のユーザーIDを入力する必要があります。

+ +

あなたはこのサーバーの管理者のようです。
管理者アカウントの移行は済んでいますか?
アカウントを削除しても大丈夫なのですか...?

+ +
+

確認用ユーザーID

+ +
+ - -

以下のボタンよりアクセストークンを取得すると使用できます。
アクセストークンは一度発行すると作り直すまで再度確認はできません。また、絶対に他人に知られないように保護してください。

- - -

アクセストークンはアカウントが凍結されているため発行できません。

- -

以下のボタンよりアクセストークンを削除できます。ボタンを押すとすぐに削除されますのでご注意ください。

- - -
-
もしものときは
+
+

API

+

APIの使用方法はdocs.uwuzu.xyzよりAPIドキュメントをご確認ください。

-
+ +

以下のボタンよりアクセストークンを取得すると使用できます。
アクセストークンは一度発行すると作り直すまで再度確認はできません。また、絶対に他人に知られないように保護してください。
+ v1.6.0より詳細な権限設定の可能なアクセストークンの生成管理システムが実装されました。
+ これにより従来のAPIアクセストークン発行機能は利用できなくなりました。
+ アクセストークン自体には互換性があるため、従来のアクセストークンも引き続きご利用いただけます。 +

+ + +

アクセストークンはアカウントが凍結されているため発行できません。

+ +

以下のボタンよりアクセストークンを削除できます。ボタンを押すとすぐに削除されますのでご注意ください。

+ + + + + +
+
+ +
+
権限
+ - " . safetext($view_scope) . "

"; + } + ?> +
+
登録日時
+

+
+
+

削除ボタンを押すとこのアクセストークンは削除されます。

+ " class="delbtn apitoken_del" value="削除"> +
+
+
+ + + +
+
もしものときは
+ + + + +
- - - - + + + + + \ No newline at end of file diff --git a/others/token.php b/others/token.php index 2e7ee86..b43b25e 100644 --- a/others/token.php +++ b/others/token.php @@ -1,4 +1,5 @@ array( + 'method'=> 'GET', + 'header'=> 'Content-type: application/json; charset=UTF-8' + ) + ); + + $context = stream_context_create($options); + + $get_data = json_decode(file_get_contents($url, false,$context), true); + if(isset($get_data["token"])){ + $API_token = $get_data["token"]; + } else { + $API_token = ""; + $error_message[] = "アクセストークンの取得に失敗しました。"; + } +} else { + $session_id = ""; +} + $notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'"); $notiQuery->bindValue(':userid', $userid); $notiQuery->execute(); @@ -85,7 +105,7 @@ require('../logout/logout.php'); -アクセストークン発行完了 - <?php echo safetext($serversettings["serverinfo"]["server_name"]);?> +アクセストークンの発行 - <?php echo safetext($serversettings["serverinfo"]["server_name"]);?> @@ -102,21 +122,17 @@ require('../logout/logout.php');
-

アクセストークン発行完了

- -
    - -

    - -
- +

アクセストークンの発行

-

発行完了!以下のアクセストークンでこのアカウント()に投稿を行えます!

-

アクセストークンは以下のものです!

-
    -

    以下のアクセストークンは絶対に他人に知られないように大切に保管してください!

    -
-

+ +

アクセストークンを取得リクエストがされていません。

+ +
    +

    以下のアクセストークンは絶対に他人に知られないように大切に保管してください!

    +
+

+ +
戻る diff --git a/search/index.php b/search/index.php index 4805622..4f1155e 100644 --- a/search/index.php +++ b/search/index.php @@ -271,10 +271,15 @@ $(document).ready(function() { dataType: 'json', timeout: 300000, success: function(response) { - renderUeuses(response); - pageNumber++; - isLoading = false; - $("#loading").hide(); + if(renderUeuses(response)){ + pageNumber++; + isLoading = false; + $("#loading").hide(); + }else{ + isLoading = false; + $("#loading").hide(); + $("#error").show(); + } }, error: function(xhr, textStatus, errorThrown) { isLoading = false; diff --git a/server/uwuzuabout.txt b/server/uwuzuabout.txt index 1c2de9c..5cda558 100644 --- a/server/uwuzuabout.txt +++ b/server/uwuzuabout.txt @@ -42,8 +42,9 @@ daichimarukanaと一緒に開発したいよ~って人は私のHPからメー (uwuzuはv1.3.0よりAGPLからUPULに変更されました。) ## 8. ロゴは誰が作ったのですか? -ロゴはまだない。 -ロゴは下記のリンクよりuwuzuに関連しているコンテンツのみDLしてご利用いただけます。(uwuzuへ飛ぶリンクボタンなどはOK) +ロゴはともき(@tomoki3192)さんよりいただいたものを使用しています! +改めまして、この場を借りてご応募いただいた皆様に感謝申し上げます。 +ロゴはUPULのもとご利用いただけます。 ### 色付き #img ../img/uwuzucolorlogo.svg @@ -97,4 +98,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## 更新情報 編集者 : daichimarukana -最終更新日 : 2024/11/06 21:54 \ No newline at end of file +最終更新日 : 2025/08/05 0:45 \ No newline at end of file diff --git a/server/uwuzuinfo.txt b/server/uwuzuinfo.txt index 5ec6b55..3749100 100644 --- a/server/uwuzuinfo.txt +++ b/server/uwuzuinfo.txt @@ -1,4 +1,4 @@ uwuzu -1.5.4 -2025/06/08 +1.6.0 +2025/08/05 daichimarukana,putonfps \ No newline at end of file diff --git a/server/uwuzurelease.txt b/server/uwuzurelease.txt index 153fcaa..386669c 100644 --- a/server/uwuzurelease.txt +++ b/server/uwuzurelease.txt @@ -1,6 +1,72 @@ ## リリースノートだぜぇぇぇぇぇぇい!!!!!!! ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...) +## Version 1.6.0 (Hapuego) +2025/08/05 +fix: ローディングに時間がかかっている際に、ユーズの表示の順番が狂ってしまう問題を修正しました。 +fix: ロールの設定が不正な際にエラー表示以外のエラーが発生する問題を修正しました。 +fix: ユーズ内のコードブロックで、テキストがはみ出してしまう問題を修正しました。 +fix: 公式アカウントによるリユーズで、公式ロールのないアカウントのユーズに公式マークが付いてしまう問題を修正しました! +fix: 自分自身をフォローできてしまうおそれのある問題を修正 +fix: 自分自身をブロックできてしまうおそれのある問題を修正 +fix: メンション機能にて、ユーザーIDの大文字・小文字の表記揺れによって、正常に通知が送信されないおそれのある問題を修正しました! +fix: メンション取得APIにて正常にメンションが取得できない問題を修正しました! + これにより、uwuzuのDB内のueuseテーブルの構造に「mentions」(mediumtext)を追加する必要があります。 + また、この修正により、このアップデート以前のメンション付きユーズに関しましては取得ができなくなります。 +fix: IPブロック機能にてブロックされているIPアドレスからアクセスがあった際に正常にブロックされないおそれがある問題を修正しました! +fix: Botであることを表示する機能がタイムライン上で正常に動作していない問題を修正しました! +fix: フォロー解除APIでフォローをしてしまう問題を修正しました! +fix: ユニークIDの生成にあたって、重複のリスクが非常に高い問題を修正しました! +fix: ユーズ時にIDが重複するおそれがある問題を修正しました! +fix: 凍結されているユーザーをフォローできる・凍結されているユーザーからフォローできてしまうことにより、フォロー・フォロワーの整合性が保てなくなる問題を修正しました! +fix: ユーズのMarkdown機能にある、`||[ここにテキスト]|| (カーソルをのせて文字を表示)`機能で、絵文字など特殊文字やURL、メンションなどが隠れない問題を修正しました! + この修正にあたってのコードはYurai(@yurai-git)さんよりいただいたものを使用させていただきました。この場を借りて感謝申し上げます。 +fix: エラーページで本来想定されない動作が起こる問題を修正しました。 +chg: 凍結されているユーザーをフォローできないように仕様変更しました。 +chg: UIを一部変更しました。 +chg: 通知の表示プログラムをサーバーサイドからクライアントサイドへ移行しました! +new: uwuzuにロゴができました! + ロゴはともき(@tomoki3192)さんにいただきました! + 応募された全員の方にこの場を借りて感謝申し上げます! +new: APIの発行システムを作成しました! + これにより、クライアントごとの詳細な権限設定と、ユーザーによるワンクリックでの認可が可能になりました! + APIトークンを求めるクライアントより、uwuzu上の/api/auth?session=[一意のセッションID]&client=[クライアント名]&scope=[要求権限一覧(,区切り)]を開くことで認証画面を表示し、 + 認可された場合にはAPIトークンが発行され、/api/token/get?session=[一意のセッションID]で認可したユーザー名、ユーザーID、APIトークンが返されます。 + /api/token/get?session=[一意のセッションID]はセキュリティの観点から一度のみAPIキーを取得できます。(二度目以降はsession_invalidエラーとなります) + クライアントによる認証画面は、最大で以下の数まで要素を追加可能です。 + - session=[一意のセッションID](必須) + - client=[クライアント名](必須) + - scope=[要求権限一覧(,区切り)](必須) + - about=[クライアントの説明] + - icon=[クライアントのアイコン画像のURL] + - callback=[認可後のコールバックURL] + 従来のAPIキーも引き続きご利用いただけます。 + + これにより、uwuzuのDBに以下の内容でのapiテーブルの追加が必要となります。 + - sysid(int):AUTO_INCREMENT:システムID + - uniqid(varchar(256)):指定なし:ユニークID + - userid(varchar(512)):指定なし:実行ユーザーID + - job(varchar(1024)):指定なし:ジョブ名 + - step(varchar(256)):指定なし:ステップ名 + - status(varchar(256)):指定なし:ステータス + - datetime(datetime):指定なし:ジョブ作成日時 +new: 通知APIを追加しました! + /api/me/notification/よりご利用いただけます。 + また、通知の既読は/api/me/notification/readよりご利用いただけます(呼び出すとすべての通知が既読になります) +new: アカウント設定変更APIを追加しました! + /api/me/settings/よりご利用いただけます。 +new: ブックマーク取得APIを追加しました! + /api/ueuse/bookmark/よりご利用いただけます。 +new: いいねなどの通知の送信のキャンセル機能を実装しました! + このアップデート後に行われたいいねに対し、いいねを外すといいね時に送信された通知が削除されます。 + 今後、この他の通知要素にも実装予定です。 + なお、このアップデートによりuwuzuのDB内のnotificationテーブルの構造に「notificationid」(varchar(512))を追加する必要があります。 +new: ActivityPubのリモートユーザーのプロフィール・投稿を見られるようになりました! + なお、フォローやいいねなど、諸々の操作は行えません。 + 閲覧は通常のユーザーページのURL(/@userid)に@domainを追加してください。 +del: 従来のAPIアクセストークンの発行機能を削除しました! +uwuzu_database.sqlは更新済みです。 + ## Version 1.5.4 (Combeny) 2025/06/08 fix: uwuzuのセットアップ時にエラーが発生して進めなくなる問題を修正しました。 diff --git a/settings/index.php b/settings/index.php index afed26f..345b9d7 100644 --- a/settings/index.php +++ b/settings/index.php @@ -113,6 +113,16 @@ if( !empty($pdo) ) { }else{ $userData['headname'] = "../" . $userData['headname']; } + + $apitokenQuery = $pdo->prepare("SELECT 1 FROM api WHERE userid = :userid LIMIT 1"); + $apitokenQuery->bindValue(':userid', $userid); + $apitokenQuery->execute(); + + if ($apitokenQuery->fetch()) { + $is_allow_bot = true; + } else { + $is_allow_bot = false; + } } @@ -548,7 +558,7 @@ $pdo = null;
- +

このアカウントがBotであることを公開する

diff --git a/ueuse/activity/index.php b/ueuse/activity/index.php index d115ade..dab97b8 100644 --- a/ueuse/activity/index.php +++ b/ueuse/activity/index.php @@ -23,7 +23,12 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) == "true"){ $error_message[] = $e->getMessage(); } - $ueuse = safetext($_GET['ueuse']); + if(isset($_GET['id']) && !empty($_GET['id'])){ + $ueuse = safetext($_GET['id']); + } else { + header("HTTP/1.1 400 Bad Request"); + exit; + } if( !empty($pdo) ) { @@ -54,32 +59,21 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) == "true"){ $value["sensitive"] = false; } $orderedItem = array( + "type" => "Note", "@context" => "https://www.w3.org/ns/activitystreams", - "id" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"], - "actor" => "https://" . $domain . "/actor/?actor=@" . $value["account"], - "type" => "Create", + "id" => "https://" . $domain . "/ueuse/activity/?id=" . $value["uniqid"], + "url" => "https://" . $domain . "/ueuse/activity/?id=" . $value["uniqid"], "published" => date(DATE_ATOM, strtotime($value["datetime"])), "to" => [ "https://" . $domain . "/followers", "https://www.w3.org/ns/activitystreams#Public", ], - "object" => array( - "type" => "Note", - "@context" => "https://www.w3.org/ns/activitystreams", - "id" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"], - "url" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"], - "published" => date(DATE_ATOM, strtotime($value["datetime"])), - "to" => [ - "https://" . $domain . "/followers", - "https://www.w3.org/ns/activitystreams#Public", - ], - "attributedTo" => "https://" . $domain . "/@" . $value["account"], - "content" => nl2br($value["ueuse"]), - "inReplyTo" => null, - "attachment" => [], - "sensitive" => $value["sensitive"], - "tag" => [], - ), + "attributedTo" => "https://" . $domain . "/@" . $value["account"], + "content" => nl2br($value["ueuse"]), + "inReplyTo" => null, + "attachment" => [], + "sensitive" => $value["sensitive"], + "tag" => [], ); $orderedItems[] = $orderedItem; diff --git a/ueuse/index.php b/ueuse/index.php index 6b02922..2cfa67d 100644 --- a/ueuse/index.php +++ b/ueuse/index.php @@ -344,10 +344,15 @@ $(document).ready(function() { dataType: 'json', timeout: 300000, success: function(response) { - renderUeuses(response, ueuseid); - pageNumber++; - isLoading = false; - $("#loading").hide(); + if(renderUeuses(response)){ + pageNumber++; + isLoading = false; + $("#loading").hide(); + }else{ + isLoading = false; + $("#loading").hide(); + $("#error").show(); + } }, error: function(xhr, textStatus, errorThrown) { isLoading = false; diff --git a/unsupported.php b/unsupported.php index a3c8e93..b011bba 100644 --- a/unsupported.php +++ b/unsupported.php @@ -1,13 +1,12 @@ - + diff --git a/update.json b/update.json index 3375da1..97cfb25 100644 --- a/update.json +++ b/update.json @@ -1,21 +1,28 @@ { "software": "uwuzu", - "version": "1.5.4", - "release_date": "2025/06/08", - "release_notes": "このアップデートにはユーズのMarkdownの解析に失敗する問題の修正やuwuzuのセットアップが行えなくなってしまう問題の修正が含まれます!詳細はリリースノートをご覧ください。", - "notices": "アップデート前にデータのバックアップを行うことをおすすめします!\nまた、アップデート後はキャッシュクリアをお忘れなく!", + "version": "1.6.0", + "release_date": "2025/08/05", + "release_notes": "このアップデートにはAPIの大幅強化や様々なバグの修正が含まれます!詳細はリリースノートをご覧ください。", + "notices": "このアップデートには実行前にSQL構造の更新が必要です。\nまた、このアップデート前にデータのバックアップを行うことをおすすめします!\nアップデート後はキャッシュクリアをお忘れなく!", "files": { "overwrite": [ + "/.htaccess", + "/.well-known/host-meta/index.php", + "/.well-known/nodeinfo/index.php", "/.well-known/webfinger/index.php", + "/.well-known/webfinger.php", + "/.well-known/host-meta.php", + "/.well-known/nodeinfo.php", "/actor/index.php", - "/admin/addadmin.php", - "/admin/index.php", - "/admin/setup_db_php.php", - "/admin/setup_uwuzu_db.php", - "/admin/success.php", + "/api/auth.php", "/api/favorite/change.php", "/api/favorite/get.php", "/api/me/index.php", + "/api/me/notification/index.php", + "/api/me/notification/read.php", + "/api/me/settings/index.php", + "/api/token/get.php", + "/api/ueuse/bookmark/index.php", "/api/ueuse/create.php", "/api/ueuse/delete.php", "/api/ueuse/get.php", @@ -26,17 +33,48 @@ "/api/users/follow.php", "/api/users/index.php", "/api/users/unfollow.php", + "/api/v1/instance.php", + "/bookmark/bookmark.php", + "/css/home.css", + "/css/style.css", + "/errorpage/httperror.php", + "/function/delete_apitoken.php", "/function/function.php", - "/js/nsfw_event.js", - "/js/unsupported.js", + "/home/index.php", + "/img/titleimg/2.png", + "/img/uwuzucolorlogo.svg", + "/img/uwuzuicon.png", + "/img/uwuzulogo.svg", "/js/view_function.js", - "/others/cache_clear.php", + "/nextpage/bookmarktimeline.php", + "/nextpage/followtimeline.php", + "/nextpage/foryoutimeline.php", + "/nextpage/localtimeline.php", + "/nextpage/notification.php", + "/nextpage/searchtimeline.php", + "/nextpage/ueusetimeline.php", + "/nextpage/userliketimeline.php", + "/nextpage/usermediatimeline.php", + "/nextpage/usertimeline.php", + "/notification/index.php", "/others/index.php", + "/others/token.php", + "/search/index.php", + "/settings/index.php", + "/ueuse/index.php", + "/ueuse/activity/index.php", + "/user/index.php", + "/user/outbox/index.php", + "/uwuzu_error_code.txt", + "/unsupported.php", + "/check.php", + "/authlogin.php", "/server/uwuzuabout.txt", "/server/uwuzuinfo.txt", "/server/uwuzurelease.txt" ], - "delete": [] + "delete": [ + ] } } diff --git a/user/index.php b/user/index.php index 16603b1..70c039b 100644 --- a/user/index.php +++ b/user/index.php @@ -72,126 +72,167 @@ $notificationcount = $notiData['notification_count']; if (!empty($pdo)) { - $uwuzuid2 = safetext(str_replace('@', '', $_GET['uwuzuid'])); + $uwuzuid = safetext(str_replace('@', '', $_GET['userid'])); + $is_local = true; - $uwuzuid = safetext(str_replace('@' . $domain, '', $uwuzuid2)); - - $userQuery = $pdo->prepare("SELECT username, userid, profile, role, follower, blocklist FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $uwuzuid); - $userQuery->execute(); - $userData = $userQuery->fetch(); + if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){ + if(isset($_GET['domain'])){ + $activity_domain = safetext(str_replace('@', '', $_GET['domain'])); + if(!($activity_domain == $domain)){ + $domain_response = GetActivityPubUser($uwuzuid, $activity_domain); + if (empty($domain_response) || array_key_exists("error", $domain_response)) { + $userData = null; + } else { + $userData = $domain_response; + } + //var_dump($domain_response); + $is_local = false; + }else{ + $activity_domain = $domain; + $is_local = true; + } + }else{ + $activity_domain = $domain; + } + }else{ + $activity_domain = $domain; + $is_local = true; + } + if($is_local == true){ + $userQuery = $pdo->prepare("SELECT username, userid, profile, role, follower, blocklist FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $uwuzuid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + } + if (!empty($userData["userid"])) { + if($is_local == true){ + $roles = array_filter(explode(',', $userData["role"])); // カンマで区切られたロールを配列に分割 + $rerole = $pdo->prepare("SELECT follow, follower,blocklist, username, userid, password, mailadds, profile, iconname, headname, role, datetime, other_settings FROM account WHERE userid = :userid"); - $roles = array_filter(explode(',', $userData["role"])); // カンマで区切られたロールを配列に分割 - - $rerole = $pdo->prepare("SELECT follow, follower,blocklist, username, userid, password, mailadds, profile, iconname, headname, role, datetime, other_settings FROM account WHERE userid = :userid"); - - $rerole->bindValue(':userid', $uwuzuid); - // SQL実行 - $rerole->execute(); - - $userdata = $rerole->fetch(); - - $roleDataArray = array(); - - foreach ($roles as $roleId) { - $rerole = $pdo->prepare("SELECT rolename, roleauth, rolecolor, roleeffect FROM role WHERE roleidname = :role"); - $rerole->bindValue(':role', $roleId); + $rerole->bindValue(':userid', $uwuzuid); + // SQL実行 $rerole->execute(); - $roleDataArray[$roleId] = $rerole->fetch(); - } - $isAIBlock = val_OtherSettings("isAIBlock", $userdata["other_settings"]); + $userdata = $rerole->fetch(); - //-------フォロー数--------- - $follow = $userdata['follow']; // コンマで区切られたユーザーIDを含む変数 + $roleDataArray = array(); - // コンマで区切って配列に分割し、要素数を数える - $followIds = array_reverse(array_values(array_filter(explode(',', $follow)))); - $followCount = count($followIds); - - $follow_on_me = array_search($userid, $followIds); - - if ($follow_on_me !== false) { - $follow_yes = "フォローされています"; // worldを含む:6 - } else { - $follow_yes = ""; // worldを含む:6 - } - - //-------フォロワー数--------- - $follower = $userdata['follower']; // コンマで区切られたユーザーIDを含む変数 - - // コンマで区切って配列に分割し、要素数を数える - $followerIds = array_reverse(array_values(array_filter(explode(',', $follower)))); - $followerCount = count($followerIds); - - $profileText = safetext($userData['profile']); - - - $allueuse = $pdo->prepare("SELECT account FROM ueuse WHERE account = :userid"); - $allueuse->bindValue(':userid', $uwuzuid); - $allueuse->execute(); - $ueuse_cnt = $allueuse->rowCount(); - - //-------フォロワー取得--------- - - $follower_userdata = array(); - if(!(empty($followerIds))){ - // フォロワーのユーザーIDを $follower_userids 配列に追加 - foreach ($followerIds as $follower_userid) { - $follower_userids[] = $follower_userid; + foreach ($roles as $roleId) { + $rerole = $pdo->prepare("SELECT rolename, roleauth, rolecolor, roleeffect FROM role WHERE roleidname = :role"); + $rerole->bindValue(':role', $roleId); + $rerole->execute(); + $roleDataArray[$roleId] = $rerole->fetch(); } - // フォロワーのユーザー情報を取得 + $isAIBlock = val_OtherSettings("isAIBlock", $userdata["other_settings"]); - 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(); + //-------フォロー数--------- + $follow = $userdata['follow']; // コンマで区切られたユーザーIDを含む変数 - if ($follower_userinfo) { - // フォロワーのユーザー情報を $follower_userdata 配列に追加 - $follower_userdata[] = $follower_userinfo; + // コンマで区切って配列に分割し、要素数を数える + $followIds = array_reverse(array_values(array_filter(explode(',', $follow)))); + $followCount = count($followIds); + + $follow_on_me = array_search($userid, $followIds); + + if ($follow_on_me !== false) { + $follow_yes = "フォローされています"; // worldを含む:6 + } else { + $follow_yes = ""; // worldを含む:6 + } + + //-------フォロワー数--------- + $follower = $userdata['follower']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $followerIds = array_reverse(array_values(array_filter(explode(',', $follower)))); + $followerCount = count($followerIds); + + $profileText = safetext($userData['profile']); + + + $allueuse = $pdo->prepare("SELECT account FROM ueuse WHERE account = :userid"); + $allueuse->bindValue(':userid', $uwuzuid); + $allueuse->execute(); + $ueuse_cnt = $allueuse->rowCount(); + + //-------フォロワー取得--------- + + $follower_userdata = array(); + if(!(empty($followerIds))){ + // フォロワーのユーザーIDを $follower_userids 配列に追加 + foreach ($followerIds as $follower_userid) { + $follower_userids[] = $follower_userid; + } + + // フォロワーのユーザー情報を取得 + + 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; + } } } - } - //-------フォロー取得--------- + //-------フォロー取得--------- - $follow_userdata = array(); + $follow_userdata = array(); - if(!(empty($followIds))){ - foreach ($followIds as $follow_userid) { - $follow_userids[] = $follow_userid; - } + if(!(empty($followIds))){ + foreach ($followIds as $follow_userid) { + $follow_userids[] = $follow_userid; + } - 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(); + 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; + if ($follow_userinfo) { + // フォロワーのユーザー情報を $follower_userdata 配列に追加 + $follow_userdata[] = $follow_userinfo; + } } } - } - if(filter_var($userdata['iconname'], FILTER_VALIDATE_URL)){ - $userdata['iconname'] = $userdata['iconname']; - }else{ - $userdata['iconname'] = "../" . $userdata['iconname']; - } - if(filter_var($userdata['headname'], FILTER_VALIDATE_URL)){ - $userdata['headname'] = $userdata['headname']; - }else{ - $userdata['headname'] = "../" . $userdata['headname']; + if(filter_var($userdata['iconname'], FILTER_VALIDATE_URL)){ + $userdata['iconname'] = $userdata['iconname']; + }else{ + $userdata['iconname'] = "../" . $userdata['iconname']; + } + if(filter_var($userdata['headname'], FILTER_VALIDATE_URL)){ + $userdata['headname'] = $userdata['headname']; + }else{ + $userdata['headname'] = "../" . $userdata['headname']; + } + }elseif($userData != null){ + $userdata = $userData; + $roles = array("user"); + foreach ($roles as $roleId) { + $rerole = $pdo->prepare("SELECT rolename, roleauth, rolecolor, roleeffect FROM role WHERE roleidname = :role"); + $rerole->bindValue(':role', $roleId); + $rerole->execute(); + $roleDataArray[$roleId] = $rerole->fetch(); + } + $isAIBlock = false; + $profileText = $userData["profile"]; + + $ueuse_cnt = "zero"; + $followCount = "zero"; + $followerCount = "zero"; } + } else { $userData["userid"] = "none"; $userData['username'] = "でふぉると"; @@ -345,7 +386,7 @@ $pdo = null;

-

@

+

@@".safetext($activity_domain)."";} ?>

@@ -389,6 +430,7 @@ $pdo = null;
+

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

@@ -430,7 +472,7 @@ $pdo = null;
- +
+ + @@ -679,18 +725,24 @@ $pdo = null; $("#loading").show(); $("#error").hide(); var uwuzuid = ''; + var activity_domain = ''; if (mode == 'allueuse') { $.ajax({ url: '../nextpage/usertimeline.php', method: 'POST', - data: { page: pageNumber, userid: userid, account_id: account_id, id: uwuzuid,}, + data: { page: pageNumber, userid: userid, account_id: account_id, id: uwuzuid, activity_domain: activity_domain}, dataType: 'json', timeout: 300000, success: function(response) { - renderUeuses(response); - pageNumber++; - isLoading = false; - $("#loading").hide(); + if(renderUeuses(response)){ + pageNumber++; + isLoading = false; + $("#loading").hide(); + }else{ + isLoading = false; + $("#loading").hide(); + $("#error").show(); + } }, error: function(xhr, textStatus, errorThrown) { isLoading = false; @@ -702,14 +754,19 @@ $pdo = null; $.ajax({ url: '../nextpage/usermediatimeline.php', method: 'POST', - data: { page: pageNumber, userid: userid, account_id: account_id, id: uwuzuid,}, + data: { page: pageNumber, userid: userid, account_id: account_id, id: uwuzuid, activity_domain: activity_domain}, dataType: 'json', timeout: 300000, success: function(response) { - renderUeuses(response); - pageNumber++; - isLoading = false; - $("#loading").hide(); + if(renderUeuses(response)){ + pageNumber++; + isLoading = false; + $("#loading").hide(); + }else{ + isLoading = false; + $("#loading").hide(); + $("#error").show(); + } }, error: function(xhr, textStatus, errorThrown) { isLoading = false; @@ -721,14 +778,19 @@ $pdo = null; $.ajax({ url: '../nextpage/userliketimeline.php', method: 'POST', - data: { page: pageNumber, userid: userid, account_id: account_id, id: uwuzuid,}, + data: { page: pageNumber, userid: userid, account_id: account_id, id: uwuzuid, activity_domain: activity_domain}, dataType: 'json', timeout: 300000, success: function(response) { - renderUeuses(response); - pageNumber++; - isLoading = false; - $("#loading").hide(); + if(renderUeuses(response)){ + pageNumber++; + isLoading = false; + $("#loading").hide(); + }else{ + isLoading = false; + $("#loading").hide(); + $("#error").show(); + } }, error: function(xhr, textStatus, errorThrown) { isLoading = false; diff --git a/user/outbox/index.php b/user/outbox/index.php index 9190f4b..a37fe9a 100644 --- a/user/outbox/index.php +++ b/user/outbox/index.php @@ -5,107 +5,114 @@ blockedIP($_SERVER['REMOTE_ADDR']); $serversettings_file = "../../server/serversettings.ini"; $serversettings = parse_ini_file($serversettings_file, true); -if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){ +if (safetext($serversettings["serverinfo"]["server_activitypub"]) === "true") { header("Content-Type: application/activity+json; charset=utf-8"); header("Access-Control-Allow-Origin: *"); $domain = $_SERVER['HTTP_HOST']; - require('../../db.php'); - - // データベースに接続 try { - $option = array( + $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_MULTI_STATEMENTS => false - ); - $pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option); + ]); } catch (PDOException $e) { - // 接続エラーのときエラー内容を取得する - $error_message[] = $e->getMessage(); + http_response_code(500); + echo json_encode(['error' => $e->getMessage()]); + exit; } - $user = safetext($_GET['actor']); + $user = safetext($_GET['actor'] ?? ''); + $userid = str_replace('@', '', str_replace('@' . $domain, '', $user)); + $page = isset($_GET['page']) ? (int)$_GET['page'] : 0; + $itemsPerPage = 10; + $offset = ($page > 0 ? ($page - 1) : 0) * $itemsPerPage; - $userid = str_replace('@','', str_replace('@'.$domain.'', '', $user)); - if( !empty($pdo) ) { - - $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, - PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, - )); - $userQuery = $dbh->prepare("SELECT username, userid, profile, follower, iconname FROM account WHERE userid = :userid"); - $userQuery->bindValue(':userid', $userid); - $userQuery->execute(); - $userData = $userQuery->fetch(); + $dbh = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, [ + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + ]); - $messageQuery = $dbh->prepare("SELECT * FROM ueuse WHERE account = :userid AND rpuniqid = '' ORDER BY datetime DESC"); - $messageQuery->bindValue(':userid', $userid); - $messageQuery->execute(); - $message_array = $messageQuery->fetchAll(); - - $messages = array(); - foreach ($message_array as $row) { - $messages[] = $row; - } + $userQuery = $dbh->prepare("SELECT * FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $userid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if (!$userData) { + echo json_encode(["type" => "user_not_found"]); + exit; } - if (!empty($userData)) { - if (!empty($messages)) { - $orderedItems = array(); - - foreach ($messages as $value) { - $activity = array( - "type" => "Create", - "id" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"], - "url" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"], - "published" => date(DATE_ATOM, strtotime($value["datetime"])), - "to" => [ - "https://www.w3.org/ns/activitystreams#Public", - ], - "actor" => "https://" . $domain . "/actor/?actor=@" . $userid, - "object" => array( - "type" => "Note", - "@context" => "https://www.w3.org/ns/activitystreams", - "id" => "https://" . $domain . "/!" . $value["uniqid"], - "url" => "https://" . $domain . "/!" . $value["uniqid"], - "published" => date(DATE_ATOM, strtotime($value["datetime"])), - "to" => [ - "https://www.w3.org/ns/activitystreams#Public", - ], - "attributedTo" => "https://" . $domain . "/@" . $value["account"], - "content" => "".nl2br($value["ueuse"])."", - ), - ); - - $orderedItems[] = $activity; - } - - $item = array( - "type" => "OrderedCollection", + // 全投稿数取得 + $countQuery = $dbh->prepare("SELECT COUNT(*) as cnt FROM ueuse WHERE account = :userid AND rpuniqid = ''"); + $countQuery->bindValue(':userid', $userid); + $countQuery->execute(); + $totalItems = (int)$countQuery->fetch()['cnt']; + + if ($page === 0) { + // OrderedCollection(firstのみ) + echo json_encode([ + "@context" => "https://www.w3.org/ns/activitystreams", + "id" => "https://{$domain}/user/outbox/?actor=@{$userid}", + "type" => "OrderedCollection", + "totalItems" => $totalItems, + "first" => "https://{$domain}/user/outbox/?actor=@{$userid}&page=1" + ], JSON_UNESCAPED_UNICODE); + exit; + } + + // ページ投稿取得 + $messageQuery = $dbh->prepare("SELECT * FROM ueuse WHERE account = :userid AND rpuniqid = '' ORDER BY datetime DESC LIMIT :offset, :limit"); + $messageQuery->bindValue(':userid', $userid); + $messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT); + $messageQuery->bindValue(':limit', $itemsPerPage, PDO::PARAM_INT); + $messageQuery->execute(); + $messages = $messageQuery->fetchAll(); + + $orderedItems = []; + foreach ($messages as $value) { + $id = $value["uniqid"]; + $url = "https://{$domain}/ueuse/activity/?id={$id}"; + $orderedItems[] = [ + "type" => "Create", + "id" => $url, + "url" => $url, + "published" => date(DATE_ATOM, strtotime($value["datetime"])), + "to" => ["https://www.w3.org/ns/activitystreams#Public"], + "actor" => "https://{$domain}/actor/?actor=@{$userid}", + "object" => [ + "type" => "Note", "@context" => "https://www.w3.org/ns/activitystreams", - "id" => "https://" . $domain . "/user/outbox/?actor=@" . $userid . "&page=true", - "summary" => "outbox of " . $userid, - "totalItems" => count($messages), - "orderedItems" => $orderedItems, - ); - - echo json_encode($item, JSON_UNESCAPED_UNICODE); - } else { - $item = array( - "type" => "item_not_found", - ); - echo json_encode($item, JSON_UNESCAPED_UNICODE); - } - } else { - $item = array( - "type" => "user_not_found", - ); - echo json_encode($item, JSON_UNESCAPED_UNICODE); - } + "id" => $url, + "url" => $url, + "published" => date(DATE_ATOM, strtotime($value["datetime"])), + "to" => ["https://www.w3.org/ns/activitystreams#Public"], + "attributedTo" => "https://{$domain}/@{$value["account"]}", + "content" => preg_replace('/\r\n/i', "", nl2br($value["ueuse"])), + ] + ]; + } -}else{ + // prev/next リンク + $base_url = "https://{$domain}/user/outbox/?actor=@{$userid}"; + $prev_page = $page > 1 ? $base_url . "&page=" . ($page - 1) : null; + $next_page = ($offset + $itemsPerPage < $totalItems) ? $base_url . "&page=" . ($page + 1) : null; + + $response = [ + "@context" => "https://www.w3.org/ns/activitystreams", + "id" => "{$base_url}&page={$page}", + "type" => "OrderedCollectionPage", + "partOf" => $base_url, + "totalItems" => $totalItems, + "orderedItems" => $orderedItems, + ]; + + if ($prev_page) $response["prev"] = $prev_page; + if ($next_page) $response["next"] = $next_page; + + echo json_encode($response, JSON_UNESCAPED_UNICODE); +} else { header("HTTP/1.1 410 Gone"); } -?> \ No newline at end of file +?> diff --git a/uwuzu_database.sql b/uwuzu_database.sql index b12db01..c4a762b 100644 --- a/uwuzu_database.sql +++ b/uwuzu_database.sql @@ -3,7 +3,7 @@ -- https://www.phpmyadmin.net/ -- -- ホスト: 127.0.0.1 --- 生成日時: 2025-05-03 15:26:28 +-- 生成日時: 2025-08-05 05:53:23 -- サーバのバージョン: 10.4.32-MariaDB -- PHP のバージョン: 8.2.12 @@ -92,6 +92,23 @@ CREATE TABLE `ads` ( -- -------------------------------------------------------- +-- +-- テーブルの構造 `api` +-- + +CREATE TABLE `api` ( + `sysid` int(11) NOT NULL, + `uniqid` varchar(256) NOT NULL, + `userid` varchar(512) NOT NULL, + `token` varchar(1024) NOT NULL, + `scope` mediumtext NOT NULL, + `datetime` datetime NOT NULL, + `clientname` mediumtext NOT NULL, + `sessionid` varchar(512) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + -- -- テーブルの構造 `emoji` -- @@ -193,7 +210,8 @@ CREATE TABLE `notification` ( `datetime` datetime NOT NULL, `userchk` varchar(32) NOT NULL, `title` varchar(1024) NOT NULL, - `category` varchar(256) NOT NULL + `category` varchar(256) NOT NULL, + `notificationid` varchar(512) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -------------------------------------------------------- @@ -251,7 +269,8 @@ CREATE TABLE `ueuse` ( `abi` mediumtext NOT NULL, `abidate` datetime NOT NULL, `nsfw` varchar(32) NOT NULL, - `popularity` int(11) NOT NULL + `popularity` int(11) NOT NULL, + `mentions` mediumtext NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- @@ -276,6 +295,12 @@ ALTER TABLE `actionlog` ALTER TABLE `ads` ADD PRIMARY KEY (`sysid`); +-- +-- テーブルのインデックス `api` +-- +ALTER TABLE `api` + ADD PRIMARY KEY (`sysid`); + -- -- テーブルのインデックス `emoji` -- @@ -358,6 +383,12 @@ ALTER TABLE `actionlog` ALTER TABLE `ads` MODIFY `sysid` int(11) NOT NULL AUTO_INCREMENT; +-- +-- テーブルの AUTO_INCREMENT `api` +-- +ALTER TABLE `api` + MODIFY `sysid` int(11) NOT NULL AUTO_INCREMENT; + -- -- テーブルの AUTO_INCREMENT `emoji` -- diff --git a/uwuzu_error_code.txt b/uwuzu_error_code.txt index c5fc07e..e05ddce 100644 --- a/uwuzu_error_code.txt +++ b/uwuzu_error_code.txt @@ -28,6 +28,7 @@ migration_bad_success - アカウントの移行後に移行の完了処理が already_been_completed - 処理が既に完了している場合に表示されます。 you_cant_it_to_yourself - 自分に対して行えない処理を行おうとした際に表示されます。 could_not_complete - 処理を完了できなかった場合に表示されます。 +this_API_is_ws_only - WebsocketAPIがWebsocket以外の方法でアクセスされた場合に表示されます。 ----------(UWUZU ERR CODE)---------- FILE_DEKASUGUI_PHP_INI_KAKUNIN - php.iniで設定されているファイルサイズ上限を上回っている時に表示されます。 @@ -144,6 +145,7 @@ DELETE_FILE_NOT_FOUND - アップデート作業時に、zipファイル内で UPDATE_FILE_NOT_FOUND - アップデート作業時に、zipファイル内にあるはずの更新用のファイルが存在しなかった際に表示されます。 BAD_REQUEST - 不正なリクエストが送信されてきた際に表示されます。 +AUTH_INVALID - アカウントの認証に失敗した際に表示されます。 DON'T_TOUCH_SYSTEM_ROLE - システムロールをべたべた触ったり削除しようとしたりすると表示されます。