diff --git a/addauthcode.php b/addauthcode.php index c7361c8..d82131e 100644 --- a/addauthcode.php +++ b/addauthcode.php @@ -194,6 +194,7 @@ $pdo = null;
+ diff --git a/admin/addadmin.php b/admin/addadmin.php index 0d85c4d..877b2c3 100644 --- a/admin/addadmin.php +++ b/admin/addadmin.php @@ -436,6 +436,7 @@ $pdo = null; + diff --git a/admin/index.php b/admin/index.php index a73c984..b5b74e3 100644 --- a/admin/index.php +++ b/admin/index.php @@ -85,6 +85,7 @@ $pdo = null; + diff --git a/admin/success.php b/admin/success.php index a995c10..9970802 100644 --- a/admin/success.php +++ b/admin/success.php @@ -80,6 +80,7 @@ if(!(empty($_SESSION['backupcode']))){ + diff --git a/api/bot-api.php b/api/bot-api.php index ed518ac..367f7be 100644 --- a/api/bot-api.php +++ b/api/bot-api.php @@ -8,7 +8,7 @@ $banurldomainfile = "../server/banurldomain.txt"; $banurl_info = file_get_contents($banurldomainfile); $banurl = preg_split("/\r\n|\n|\r/", $banurl_info); -header("Content-Type: application/json; charset=utf-8"); +header("Content-Type: application/json; charset=utf-8; Access-Control-Allow-Origin: *;"); function createUniqId(){ list($msec, $sec) = explode(" ", microtime()); diff --git a/api/ltl-api.php b/api/ltl-api.php index 4a1cb97..31c0d47 100644 --- a/api/ltl-api.php +++ b/api/ltl-api.php @@ -1,5 +1,5 @@ query($sql); - + while ($row = $notice_array->fetch(PDO::FETCH_ASSOC)) { $notices[] = $row; @@ -111,6 +111,11 @@ for( $i=0;$i<$cnt;$i++ ){ "invitation_code" => $invitation_code, + "usage" => [ + "users" => $count1, + "ueuse" => $count2, + ], + ), "software" => array( diff --git a/api/ueuse-api.php b/api/ueuse-api.php index afc9a6b..9eec954 100644 --- a/api/ueuse-api.php +++ b/api/ueuse-api.php @@ -1,5 +1,5 @@ + diff --git a/authlogin.php b/authlogin.php index 5161998..ca13378 100644 --- a/authlogin.php +++ b/authlogin.php @@ -251,6 +251,7 @@ $pdo = null; + diff --git a/check.php b/check.php index bb3b913..da86e10 100644 --- a/check.php +++ b/check.php @@ -219,6 +219,7 @@ $pdo = null; + diff --git a/css/home.css b/css/home.css index 483a44d..843d659 100644 --- a/css/home.css +++ b/css/home.css @@ -281,7 +281,7 @@ body{ margin-left: 12px; margin-right: 12px; margin-bottom: 12px; - background-color: var(--background-color)FFF; + background-color: var(--background-color); width: 240px; height: 100%; margin-left: 0px; @@ -1286,6 +1286,18 @@ main h1{ height: 350px; border: 1px solid var(--border-color); } +.ueuse .youtube_and_nicovideo_player{ + margin-top: 12px; + width: 100%; + height: fit-content; +} +.ueuse .youtube_and_nicovideo_player iframe{ + border: none; + width: 100%; + aspect-ratio: 16 / 9; + border-radius: 10px; + border: 1px solid var(--border-color); +} .ueuse .abi{ margin-left:auto; @@ -3139,22 +3151,24 @@ label>input { } .emjtex .fx{ - display: flex; + display: block; + max-width: 100%; } .emjtex img{ margin-top: auto; margin-bottom: auto; - margin-left: 4px; + margin-left: 6px; margin-right: 4px; - height: 64px; + max-height: 64px; + max-width: 98%; } .emjtex h3{ overflow-wrap: break-word; margin-top: auto; margin-bottom: auto; - margin-left: 12px; + margin-left: 6px; font-size: 24px; color:var(--text-color); text-decoration: none; @@ -3166,7 +3180,7 @@ label>input { overflow-wrap: break-word; margin-top: 12px; margin-bottom: auto; - margin-left: 12px; + margin-left: 6px; font-size: 16px; color:var(--text-color); text-decoration: none; @@ -5046,13 +5060,15 @@ summary { top: 0; left: 0; - width: 90%; + width: 100%; margin-left: 0px; margin-right: 0px; height: 44px; padding-top: 0.0%; padding-bottom: 0.2%; - padding-left: 10%; + padding-left: 0; + margin-left: auto; + margin-right: auto; } .topbox .logo img{ @@ -5263,7 +5279,6 @@ summary { } - .notification .flebox a{ margin-top: auto; margin-bottom: auto; diff --git a/css/unsupported.css b/css/unsupported.css new file mode 100644 index 0000000..1bcf707 --- /dev/null +++ b/css/unsupported.css @@ -0,0 +1,121 @@ + +@import url("color.css"); +body{ + max-width: 640px; + height: auto; + margin:0px; + margin-top: 128px; + margin-left: auto; + margin-right: auto; + background-color:#f5f5f5; + display: block; +} +main{ + max-width: 640px; + margin-left: auto; + margin-right: auto; +} +main .server_icon_zone{ + margin:12px; + margin-left: auto; + margin-right: auto; + text-align: center; +} +main .server_icon_zone img{ + width: 64px; + height: 64px; + object-fit: cover; + border-radius: 12px; +} +h1{ + margin-top: 0px; + margin-bottom: 0px; + margin-left: auto; + margin-right: auto; + text-align: center; + color:#252525; + font-size: 32px; + font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; + font-weight: bold; +} +h3{ + line-height: 28px; + margin-top: 6px; + margin-bottom: 6px; + margin-left: 0px; + margin-right: auto; + text-align: left; + color:#252525; + font-size: 20px; + font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; + font-weight: bold; +} +p{ + line-height: 20px; + margin-top: 0px; + margin-bottom: 0px; + text-align: left; + color:#252525; + font-size: 16px; + font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; + font-weight: normal; +} +.maintext{ + margin-top: 16px; + margin-bottom: 16px; + +} +.infobtn{ + display: block; + width: 128px; + padding: 6px; + text-align: center; + margin-left: auto; + margin-right: auto; + display: block; + background-color:#FFC832; + color:#ffffff; + border-radius: 32px; + font-size: 20px; + font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; + font-weight: normal; + text-decoration: none; +} +.center_text{ + margin-top: 32px; + display: block; +} +.center_text p{ + line-height: 20px; + margin-top: 6px; + margin-bottom: 6px; + text-align: center; + color:#252525; + font-size: 16px; + font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; + font-weight: normal; +} +.center_text .p2{ + line-height: 20px; + margin-top: 6px; + margin-bottom: 6px; + text-align: center; + color:#777; + font-size: 16px; + font-family: 'BIZ UDGothic', 'Yu Mincho Regular', 'ヒラギノ角ゴシック', sans-serif; + font-weight: normal; +} +hr{ + height: 0; + margin-top: 12px; + margin-bottom: 12px; + padding: 0; + border: 0; + border-top: 1px solid #252525; +} +@media screen and (max-width:640px) { + body{ + margin:24px; + margin-top: 32px; + } +} \ No newline at end of file diff --git a/emoji/addemoji.php b/emoji/addemoji.php index cf2b530..feb4a6b 100644 --- a/emoji/addemoji.php +++ b/emoji/addemoji.php @@ -27,9 +27,6 @@ session_name('uwuzu_s_id'); session_start(); session_regenerate_id(true); -$userid = htmlentities($_SESSION['userid']); -$username = htmlentities($_SESSION['username']); - try { $option = array( @@ -46,7 +43,7 @@ try { if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_SESSION['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -55,11 +52,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { exit; }elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){ // セッションに値をセット - $userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット - $username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット + $userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット + $username = htmlentities($res['username']); // セッションに格納されている値をそのままセット $loginid = htmlentities($res["loginid"]); $role = htmlentities($res["role"]); $sacinfo = htmlentities($res["sacinfo"]); + $myblocklist = htmlentities($res["blocklist"]); + $myfollowlist = htmlentities($res["follow"]); $_SESSION['admin_login'] = true; $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; @@ -92,7 +91,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { } elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_COOKIE['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -101,11 +100,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { exit; }elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){ // セッションに値をセット - $userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット - $username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット + $userid = htmlentities($res['userid']); // クッキーから取得した値をセット + $username = htmlentities($res['username']); // クッキーから取得した値をセット $loginid = htmlentities($res["loginid"]); $role = htmlentities($res["role"]); $sacinfo = htmlentities($res["sacinfo"]); + $myblocklist = htmlentities($res["blocklist"]); + $myfollowlist = htmlentities($res["follow"]); $_SESSION['admin_login'] = true; $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; @@ -312,6 +313,7 @@ $pdo = null; + diff --git a/emoji/index.php b/emoji/index.php index 22841bf..cf96931 100644 --- a/emoji/index.php +++ b/emoji/index.php @@ -45,7 +45,7 @@ try { if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_SESSION['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -54,11 +54,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { exit; }elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){ // セッションに値をセット - $userid = htmlentities($_SESSION['userid']); // セッションに格納されている値をそのままセット - $username = htmlentities($_SESSION['username']); // セッションに格納されている値をそのままセット + $userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット + $username = htmlentities($res['username']); // セッションに格納されている値をそのままセット $loginid = htmlentities($res["loginid"]); $role = htmlentities($res["role"]); $sacinfo = htmlentities($res["sacinfo"]); + $myblocklist = htmlentities($res["blocklist"]); + $myfollowlist = htmlentities($res["follow"]); $_SESSION['admin_login'] = true; $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; @@ -91,7 +93,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { } elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_COOKIE['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -100,11 +102,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { exit; }elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){ // セッションに値をセット - $userid = htmlentities($_COOKIE['userid']); // クッキーから取得した値をセット - $username = htmlentities($_COOKIE['username']); // クッキーから取得した値をセット + $userid = htmlentities($res['userid']); // クッキーから取得した値をセット + $username = htmlentities($res['username']); // クッキーから取得した値をセット $loginid = htmlentities($res["loginid"]); $role = htmlentities($res["role"]); $sacinfo = htmlentities($res["sacinfo"]); + $myblocklist = htmlentities($res["blocklist"]); + $myfollowlist = htmlentities($res["follow"]); $_SESSION['admin_login'] = true; $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; @@ -177,6 +181,7 @@ $pdo = null; + diff --git a/errorpage/400.php b/errorpage/400.php index b87b30c..5a2b076 100644 --- a/errorpage/400.php +++ b/errorpage/400.php @@ -20,8 +20,12 @@ $termsdata = file_get_contents($termsfile); + + + +(/´・ヮ・`\)
現在サーバーが管理者によって停止されています...
停止の理由は以下の通りです。
現在サーバーが管理者によって停止されています...
停止の理由は以下の通りです。
'; + }?>
このサーバーには招待コードがないと登録できません。
招待コードはお手元にありますか?
$1
', $markdownText);//←ここ!!!!!!!!!!!!!! - // コード(#code)をHTMLのdiv class="code"タグに変換 - $markdownText = preg_replace('/^#code (.+)/m', '$1
・ $1
', $markdownText); // 空行の前に何もない行をHTMLのpタグに変換 $markdownText = preg_replace('/(^\s*)(?!\s)(.*)/m', '$1$2
', $markdownText); @@ -64,6 +59,9 @@ function replaceEmojisWithImages($postText) { return $postTextWithHashtags; } function replaceURLsWithLinks($postText) { + + $postText = str_replace(''', '\'', $postText); + // URLを正規表現を使って検出 $pattern = '/(https:\/\/[^\s<>\[\]\'"]+)/'; // 改良された正規表現 preg_match_all($pattern, $postText, $matches); @@ -87,6 +85,68 @@ function replaceURLsWithLinks($postText) { return $postText; } +function YouTube_and_nicovideo_Links($postText) { + // URLを正規表現を使って検出 + $pattern = '/(https:\/\/[^\s<>\[\]\'"]+)/'; // 改良された正規表現 + preg_match_all($pattern, $postText, $matches); + + if(empty($url)){ + $postText = ""; + } + + // 検出したURLごとに処理を行う + foreach ($matches[0] as $url) { + // ドメイン部分を抽出 + $parsedUrl = parse_url($url); + if($parsedUrl['host'] == "youtube.com" || $parsedUrl['host'] == "youtu.be" || $parsedUrl['host'] == "www.youtube.com"){ + + if (isset($parsedUrl['query'])) { + if(false !== strpos($parsedUrl['query'], 'v=')) { + $video_id = str_replace('v=', '', htmlentities($parsedUrl['query'])); + $iframe = true; + }else{ + $video_id = str_replace('/', '', htmlentities($parsedUrl['path'])); + $iframe = true; + } + }elseif(isset($parsedUrl['path'])){ + $video_id = str_replace('/', '', htmlentities($parsedUrl['path'])); + $iframe = true; + }else{ + $video_id = ""; + $iframe = false; + } + // 不要な文字を削除してaタグを生成 + if($iframe == true){ + $link = ''; + }else{ + $link = ""; + } + // URLをドメインのみを表示するaタグで置き換え + $postText = $link; + }elseif($parsedUrl['host'] == "nicovideo.jp" || $parsedUrl['host'] == "www.nicovideo.jp"){ + + if(isset($parsedUrl['path'])){ + $video_id = str_replace('/watch/', '', htmlentities($parsedUrl['path'])); + $iframe = true; + }else{ + $video_id = ""; + $iframe = false; + } + // 不要な文字を削除してaタグを生成 + if($iframe == true){ + $link = '