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); + + + + 400 Bad Request - <?php echo file_get_contents($servernamefile);?> @@ -29,7 +33,7 @@ $termsdata = file_get_contents($termsfile);
diff --git a/errorpage/401.php b/errorpage/401.php index 9be45b4..e7a4935 100644 --- a/errorpage/401.php +++ b/errorpage/401.php @@ -20,8 +20,12 @@ $termsdata = file_get_contents($termsfile); + + + + 401 Unauthorized - <?php echo file_get_contents($servernamefile);?> @@ -29,7 +33,7 @@ $termsdata = file_get_contents($termsfile);
diff --git a/errorpage/403.php b/errorpage/403.php index 140dea0..e6d7b5e 100644 --- a/errorpage/403.php +++ b/errorpage/403.php @@ -20,8 +20,12 @@ $termsdata = file_get_contents($termsfile); + + + + 403 Forbidden - <?php echo file_get_contents($servernamefile);?> @@ -29,7 +33,7 @@ $termsdata = file_get_contents($termsfile);
diff --git a/errorpage/404.php b/errorpage/404.php index 92b2b7a..bc025c3 100644 --- a/errorpage/404.php +++ b/errorpage/404.php @@ -19,13 +19,16 @@ $termsfile = "../server/terms.txt"; $termsdata = file_get_contents($termsfile); ?> - + + + + 404 Not found - <?php echo file_get_contents($servernamefile);?> @@ -33,7 +36,7 @@ $termsdata = file_get_contents($termsfile);
@@ -61,4 +64,60 @@ $termsdata = file_get_contents($termsfile); - \ No newline at end of file + + + \ No newline at end of file diff --git a/errorpage/500.php b/errorpage/500.php index 4d15dec..01ff9e2 100644 --- a/errorpage/500.php +++ b/errorpage/500.php @@ -20,8 +20,12 @@ $termsdata = file_get_contents($termsfile); + + + + 500 Internal Server Error - <?php echo file_get_contents($servernamefile);?> @@ -29,7 +33,7 @@ $termsdata = file_get_contents($termsfile);
diff --git a/errorpage/503.php b/errorpage/503.php index 86ca1b2..0bfd8aa 100644 --- a/errorpage/503.php +++ b/errorpage/503.php @@ -25,8 +25,12 @@ $termsdata = file_get_contents($termsfile); + + + + 503 Service Unavailable - <?php echo file_get_contents($servernamefile);?> @@ -34,7 +38,7 @@ $termsdata = file_get_contents($termsfile);
diff --git a/errorpage/serverstop.php b/errorpage/serverstop.php index 5839f48..7903eb5 100644 --- a/errorpage/serverstop.php +++ b/errorpage/serverstop.php @@ -4,6 +4,13 @@ $serverstopfile = "../server/serverstop.txt"; $servernamefile = "../server/servername.txt"; $domain = $_SERVER['HTTP_HOST']; + +if(!empty(file_get_contents($serverstopfile))){ + $serverstop = htmlspecialchars(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8'); +}else{ + $serverstop = "現在原因不明の問題によりサーバーを停止しております。"; +} + ?> @@ -11,9 +18,13 @@ $domain = $_SERVER['HTTP_HOST']; + + -サーバー停止中 - + + +サーバー停止中 - <?php echo file_get_contents($servernamefile);?> @@ -21,7 +32,7 @@ $domain = $_SERVER['HTTP_HOST'];
@@ -31,11 +42,14 @@ $domain = $_SERVER['HTTP_HOST'];

サーバー停止中

-

(/´・ヮ・`\)
現在サーバーが管理者によって停止されています...
停止の理由は以下の通りです。

+

現在サーバーが管理者によって停止されています...
停止の理由は以下の通りです。


-

- +

'; + }?>

diff --git a/home/ftl.php b/home/ftl.php index 88736a2..54fb910 100644 --- a/home/ftl.php +++ b/home/ftl.php @@ -51,7 +51,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(); @@ -60,11 +60,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; @@ -97,7 +99,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(); @@ -106,11 +108,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; @@ -188,6 +192,39 @@ function get_mentions_userid($postText) { return $mentionedUsers; } +function rotate($image, $exif) +{ + $orientation = $exif['Orientation'] ?? 1; + + switch ($orientation) { + case 1: //no rotate + break; + case 2: //FLIP_HORIZONTAL + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 3: //ROTATE 180 + $image = imagerotate($image, 180, 0); + break; + case 4: //FLIP_VERTICAL + imageflip($image, IMG_FLIP_VERTICAL); + break; + case 5: //ROTATE 270 FLIP_HORIZONTAL + $image = imagerotate($image, 270, 0); + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 6: //ROTATE 90 + $image = imagerotate($image, 270, 0); + break; + case 7: //ROTATE 90 FLIP_HORIZONTAL + $image = imagerotate($image, 90, 0); + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 8: //ROTATE 270 + $image = imagerotate($image, 90, 0); + break; + } + return $image; +} if( !empty($_POST['btn_submit']) ) { @@ -240,6 +277,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath); + + // EXIF削除 + if($extension == "jpg" || $extension == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath); + imagedestroy($gd_out); + } if ($result) { $photo1 = $uploadedPath; // 保存されたファイルのパスを使用 @@ -280,6 +330,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result2 = move_uploaded_file($uploadedFile2['tmp_name'], $uploadedPath2); + + // EXIF削除 + if($extension2 == "jpg" || $extension2 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath2); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath2); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath2); + imagedestroy($gd_out); + } if ($result2) { $photo2 = $uploadedPath2; // 保存されたファイルのパスを使用 @@ -320,6 +383,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3); + + // EXIF削除 + if($extension3 == "jpg" || $extension3 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath3); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath3); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath3); + imagedestroy($gd_out); + } if ($result3) { $photo3 = $uploadedPath3; // 保存されたファイルのパスを使用 @@ -360,6 +436,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result4 = move_uploaded_file($uploadedFile4['tmp_name'], $uploadedPath4); + + // EXIF削除 + if($extension4 == "jpg" || $extension4 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath4); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath4); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath4); + imagedestroy($gd_out); + } if ($result4) { $photo4 = $uploadedPath4; // 保存されたファイルのパスを使用 @@ -464,7 +553,7 @@ if( !empty($_POST['btn_submit']) ) { $touserid = $mentionedUser; $datetime = date("Y-m-d H:i:s"); $msg = "" . $ueuse . ""; - $title = "" . $username . "さんにメンションされました!"; + $title = "" . $userid . "さんにメンションされました!"; $url = "/!" . $uniqid . "~" . $userid . ""; $userchk = 'none'; @@ -528,6 +617,7 @@ $pdo = null; + diff --git a/home/index.php b/home/index.php index 4b982c2..bbbec03 100644 --- a/home/index.php +++ b/home/index.php @@ -1,5 +1,4 @@ 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(); @@ -59,11 +58,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; @@ -96,7 +97,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { } elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo 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(); @@ -105,11 +106,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; @@ -187,6 +190,40 @@ function get_mentions_userid($postText) { return $mentionedUsers; } +function rotate($image, $exif) +{ + $orientation = $exif['Orientation'] ?? 1; + + switch ($orientation) { + case 1: //no rotate + break; + case 2: //FLIP_HORIZONTAL + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 3: //ROTATE 180 + $image = imagerotate($image, 180, 0); + break; + case 4: //FLIP_VERTICAL + imageflip($image, IMG_FLIP_VERTICAL); + break; + case 5: //ROTATE 270 FLIP_HORIZONTAL + $image = imagerotate($image, 270, 0); + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 6: //ROTATE 90 + $image = imagerotate($image, 270, 0); + break; + case 7: //ROTATE 90 FLIP_HORIZONTAL + $image = imagerotate($image, 90, 0); + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 8: //ROTATE 270 + $image = imagerotate($image, 90, 0); + break; + } + return $image; +} + if( !empty($_POST['btn_submit']) ) { $ueuse = htmlentities($_POST['ueuse']); @@ -239,6 +276,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath); + + // EXIF削除 + if($extension == "jpg" || $extension == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath); + imagedestroy($gd_out); + } if ($result) { $photo1 = $uploadedPath; // 保存されたファイルのパスを使用 @@ -279,6 +329,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result2 = move_uploaded_file($uploadedFile2['tmp_name'], $uploadedPath2); + + // EXIF削除 + if($extension2 == "jpg" || $extension2 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath2); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath2); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath2); + imagedestroy($gd_out); + } if ($result2) { $photo2 = $uploadedPath2; // 保存されたファイルのパスを使用 @@ -319,6 +382,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3); + + // EXIF削除 + if($extension3 == "jpg" || $extension3 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath3); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath3); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath3); + imagedestroy($gd_out); + } if ($result3) { $photo3 = $uploadedPath3; // 保存されたファイルのパスを使用 @@ -359,6 +435,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result4 = move_uploaded_file($uploadedFile4['tmp_name'], $uploadedPath4); + + // EXIF削除 + if($extension4 == "jpg" || $extension4 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath4); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath4); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath4); + imagedestroy($gd_out); + } if ($result4) { $photo4 = $uploadedPath4; // 保存されたファイルのパスを使用 @@ -463,7 +552,7 @@ if( !empty($_POST['btn_submit']) ) { $touserid = $mentionedUser; $datetime = date("Y-m-d H:i:s"); $msg = "" . $ueuse . ""; - $title = "" . $username . "さんにメンションされました!"; + $title = "" . $userid . "さんにメンションされました!"; $url = "/!" . $uniqid . "~" . $userid . ""; $userchk = 'none'; @@ -527,6 +616,7 @@ $pdo = null; + diff --git a/img/sysimage/menuicon/notice.svg b/img/sysimage/menuicon/notice.svg new file mode 100644 index 0000000..d6e2525 --- /dev/null +++ b/img/sysimage/menuicon/notice.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/index.php b/index.php index 00186e3..4cd09ca 100644 --- a/index.php +++ b/index.php @@ -110,9 +110,18 @@ $count2 = $result2->num_rows; ?> - + + + + + + + + + + @@ -156,7 +165,7 @@ if ("serviceWorker" in navigator) { -

へようこそ!

+

へようこそ!

@@ -166,7 +175,7 @@ if ("serviceWorker" in navigator) {
-
+
@@ -176,7 +185,7 @@ if ("serviceWorker" in navigator) { echo $info.'
'; }?>

- お問い合わせ : + お問い合わせ :

このサーバーには招待コードがないと登録できません。
招待コードはお手元にありますか?

diff --git a/js/console_notice.js b/js/console_notice.js index 68c5917..cced145 100644 --- a/js/console_notice.js +++ b/js/console_notice.js @@ -1,3 +1,4 @@ +/*-----Console Notice-----*/ console.log( "%c警告!!!%c\nもし誰かにここに%cコピペ%cしろと言われたりCookieというものをコピーしろなどと言われているのであればその行為は%c今すぐやめて%cください。", "color:white; background-color:#FF4848; padding:4px; border-radius:4px; font-weight: bold; font-size: 16pt", @@ -26,5 +27,4 @@ console.log( "color:#000;", "", "uwuzuサーバー運営者及びuwuzu開発者がCookie情報等を要求することはありません。", -); - +); \ No newline at end of file diff --git a/js/unsupported.js b/js/unsupported.js new file mode 100644 index 0000000..ff4b2d9 --- /dev/null +++ b/js/unsupported.js @@ -0,0 +1,112 @@ +/*-----Access Check-----*/ + +const ua = window.navigator.userAgent; +/*browser*/ +if(ua.indexOf('Edge') != -1 || ua.indexOf('Edg') != -1) { + user_agent_browser = 'Microsoft_Edge'; +} else if(ua.indexOf('Trident') != -1 || ua.indexOf('MSIE') != -1) { + user_agent_browser = 'Microsoft_Internet_Explorer'; +} else if(ua.indexOf('OPR') != -1 || ua.indexOf('Opera') != -1) { + user_agent_browser = 'Opera'; +} else if(ua.indexOf('Chrome') != -1) { + user_agent_browser = 'Google_Chrome'; +} else if(ua.indexOf('Firefox') != -1) { + user_agent_browser = 'FireFox'; +} else if(ua.indexOf('Safari') != -1) { + user_agent_browser = 'Safari'; +} else if(ua.indexOf('NintendoBrowser') != -1) { + user_agent_browser = 'NintendoBrowser'; +} else { + user_agent_browser = 'Other'; +} + +/*OS*/ +const ua2 = ua.toLowerCase(); +if(ua2.indexOf("windows nt") !== -1) { + user_agent_os = "Microsoft_Windows_NT"; +} else if(ua.indexOf("Android") !== -1) { + user_agent_os = "Android"; +} else if(ua.indexOf("iPhone") !== -1){ + ua.match(/iPhone OS (\w+){1,4}/g); + var iosv=(RegExp.$1.replace(/_/g, '.')).slice(0,4); + if(iosv >= 6.0) { + user_agent_os = "iOS_6_Over"; + } else { + user_agent_os = "iOS_6_Under"; + } +} else if (ua.match(/Linux/)) { + user_agent_os = "Linux"; +} else if(ua.indexOf("ipad") !== -1 || ua.indexOf("Mac OS X") !== -1 && typeof document.ontouchstart !== 'undefined') { + user_agent_os = "iPad"; +} else if(ua.indexOf("Mac OS X") !== -1) { + user_agent_os = "mac_OS"; +} else if (ua.match(/^.*\s([A-Za-z]+BSD)/)) { + user_agent_os = RegExp.$1; +} else if (ua.match(/SunOS/)) { + user_agent_os = "Solaris"; +} else if (ua.match("Nintendo Wii")) { + user_agent_os = "Nintendo_Wii"; +} else if (ua.match("PlayStation 4")) { + user_agent_os = "SONY_PS4"; +} else if (ua.match("PlayStation 5")) { + user_agent_os = "SONY_PS5"; +} else if (ua.match("PlayStation Vita")) { + user_agent_os = "SONY_PSVita"; +} else if (ua.match("Nintendo Switch")) { + user_agent_os = "Nintendo_Switch"; +} else if (ua.match("Windows Phone")) { + user_agent_os = "Windows_Phone"; +} else { + user_agent_os = 'Other'; +} + +/*SSL*/ +if (location.protocol == 'http:') { + user_agent_ssl = "not_ssl"; +} else if (location.protocol == 'https:') { + user_agent_ssl = "ssl"; +} else { + user_agent_ssl = "Other"; +} + +/*Cookie*/ +if (navigator.cookieEnabled) { + user_agent_cookie = 'cookie_on'; +} else { + user_agent_cookie = 'cookie_off'; +} + +/*Main Access check*/ +if (user_agent_browser == 'Microsoft_Internet_Explorer' || user_agent_browser == 'NintendoBrowser') { + user_agent_access = 'bad'; + errcode = 'UNSUPPORTED_BROWSER'; +} else if (user_agent_os == 'Nintendo_Wii' || user_agent_os == 'SONY_PSVita' || user_agent_os == 'Nintendo_Switch' || user_agent_os == 'Windows_Phone' || user_agent_os == 'iOS_6_Under') { + user_agent_access = 'bad'; + errcode = 'UNSUPPORTED_OS'; +} else if (user_agent_cookie == 'cookie_off') { + user_agent_access = 'bad'; + errcode = 'PLEASE_COOKIE_ON'; +} else if (user_agent_ssl == 'Other') { + user_agent_access = 'bad'; + errcode = 'NONE_SSL'; +} else { + user_agent_access = 'ok'; + errcode = 'NONE_ERROR'; +} + +/* +console.log('browser : '+user_agent_browser); +console.log('cookie : '+user_agent_cookie); +console.log('os : '+user_agent_os); +console.log('ssl : '+user_agent_ssl); +console.log('access : '+user_agent_access); +console.log('errorcode : '+errcode); +*/ + +if (user_agent_access == 'bad'){ + setTimeout(link(), 0); + function link(){ + location.href="../unsupported.php?errcode="+errcode+"&browser="+user_agent_browser+"&os="+user_agent_os+"&cookie="+user_agent_cookie+"&ssl="+user_agent_ssl+"" + } +} + diff --git a/login.php b/login.php index 2ef80f2..178a36a 100644 --- a/login.php +++ b/login.php @@ -1,5 +1,5 @@ - + + + + + + + + + + diff --git a/new.php b/new.php index ae55578..51002b5 100644 --- a/new.php +++ b/new.php @@ -15,6 +15,7 @@ function createUniqId(){ } require('db.php'); +$servericonfile = "server/servericon.txt"; $servernamefile = "server/servername.txt"; @@ -99,6 +100,40 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true && isset } } +function rotate($image, $exif) +{ + $orientation = $exif['Orientation'] ?? 1; + + switch ($orientation) { + case 1: //no rotate + break; + case 2: //FLIP_HORIZONTAL + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 3: //ROTATE 180 + $image = imagerotate($image, 180, 0); + break; + case 4: //FLIP_VERTICAL + imageflip($image, IMG_FLIP_VERTICAL); + break; + case 5: //ROTATE 270 FLIP_HORIZONTAL + $image = imagerotate($image, 270, 0); + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 6: //ROTATE 90 + $image = imagerotate($image, 270, 0); + break; + case 7: //ROTATE 90 FLIP_HORIZONTAL + $image = imagerotate($image, 90, 0); + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 8: //ROTATE 270 + $image = imagerotate($image, 90, 0); + break; + } + return $image; +} + if( !empty($_POST['btn_submit']) ) { @@ -170,6 +205,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath); + // EXIF削除 + if($extension == "jpg" || $extension == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath); + imagedestroy($gd_out); + } + if ($result) { $iconName = $uploadedPath; // 保存されたファイルのパスを使用 } else { @@ -467,9 +515,18 @@ $pdo = null; ?> - + + + + + + + + + + diff --git a/nextpage/view.php b/nextpage/view.php index b5d5abb..fc0a34f 100644 --- a/nextpage/view.php +++ b/nextpage/view.php @@ -3,11 +3,6 @@ function processMarkdownAndWrapEmptyLines($markdownText){ $markdownText = preg_replace('/^\[\[buruburu (.+)\]\]/m', '

$1

', $markdownText);//←ここ!!!!!!!!!!!!!! - // コード(#code)をHTMLのdiv class="code"タグに変換 - $markdownText = preg_replace('/^#code (.+)/m', '

$1

', $markdownText); - - // 画像(#img)をHTMLのimgタグに変換 - $markdownText = preg_replace('/^#img (.+)/m', '', $markdownText); // タイトル(#、##、###)をHTMLのhタグに変換 $markdownText = preg_replace('/^# (.+)/m', '

$1

', $markdownText); @@ -15,7 +10,7 @@ function processMarkdownAndWrapEmptyLines($markdownText){ $markdownText = preg_replace('/^### (.+)/m', '

$1

', $markdownText); // 箇条書き(-)をHTMLのul/liタグに変換 - $markdownText = preg_replace('/^- (.+)/m', '', $markdownText); + $markdownText = preg_replace('/^- (.+)/m', '

・ $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 = ''; } if(!($this->value['abi'] == "none")){ diff --git a/notice/addnotice.php b/notice/addnotice.php index 77ba759..82f3913 100644 --- a/notice/addnotice.php +++ b/notice/addnotice.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; @@ -271,6 +272,7 @@ $pdo = null; + diff --git a/notification/index.php b/notification/index.php index 4871912..8568358 100644 --- a/notification/index.php +++ b/notification/index.php @@ -28,10 +28,6 @@ session_name('uwuzu_s_id'); session_start(); session_regenerate_id(true); -$userid = htmlentities($_SESSION['userid']); -$username = htmlentities($_SESSION['username']); - - try { $option = array( @@ -48,7 +44,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(); @@ -57,11 +53,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; @@ -94,7 +92,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(); @@ -103,11 +101,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; @@ -169,6 +169,7 @@ $pdo = null; + diff --git a/others/index.php b/others/index.php index 38c77aa..1ab9f80 100644 --- a/others/index.php +++ b/others/index.php @@ -32,9 +32,6 @@ session_name('uwuzu_s_id'); session_start(); session_regenerate_id(true); -$userid = htmlentities($_SESSION['userid']); -$username = htmlentities($_SESSION['username']); - // 管理者としてログインしているか確認 if( empty($_SESSION['admin_login']) || $_SESSION['admin_login'] !== true ) { // ログインページへリダイレクト @@ -59,7 +56,7 @@ try { if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,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(); @@ -68,11 +65,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; @@ -105,7 +104,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,follow,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(); @@ -114,11 +113,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; @@ -476,6 +477,7 @@ require('../logout/logout.php'); + @@ -554,10 +556,61 @@ require('../logout/logout.php');

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

+
+
もしものときは
+ + + - \ No newline at end of file + + + \ No newline at end of file diff --git a/others/token.php b/others/token.php index f652f96..dd7657f 100644 --- a/others/token.php +++ b/others/token.php @@ -23,8 +23,8 @@ $res = null; $option = null; -$userid = $_SESSION['userid']; -$token = $_SESSION['token']; +$userid = htmlentities($_SESSION['userid']); +$token = htmlentities($_SESSION['token']); try { @@ -43,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(); @@ -52,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; @@ -89,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(); @@ -98,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; @@ -163,6 +167,7 @@ require('../logout/logout.php'); + diff --git a/passrecovery/badrecovery.php b/passrecovery/badrecovery.php index 7392f04..21c7fd7 100644 --- a/passrecovery/badrecovery.php +++ b/passrecovery/badrecovery.php @@ -16,6 +16,7 @@ for( $i=0;$i<$cnt;$i++ ){ + diff --git a/passrecovery/donerecovery.php b/passrecovery/donerecovery.php index 1a1695b..e78983c 100644 --- a/passrecovery/donerecovery.php +++ b/passrecovery/donerecovery.php @@ -16,6 +16,7 @@ for( $i=0;$i<$cnt;$i++ ){ + diff --git a/passrecovery/index.php b/passrecovery/index.php index f49b237..9e22d9a 100644 --- a/passrecovery/index.php +++ b/passrecovery/index.php @@ -142,6 +142,7 @@ $pdo = null; + diff --git a/passrecovery/startrecovery.php b/passrecovery/startrecovery.php index 26880e3..e0cc72b 100644 --- a/passrecovery/startrecovery.php +++ b/passrecovery/startrecovery.php @@ -239,6 +239,7 @@ $pdo = null; + diff --git a/require/botbox.php b/require/botbox.php index ebb0546..05b1e92 100644 --- a/require/botbox.php +++ b/require/botbox.php @@ -16,6 +16,7 @@ diff --git a/settings_admin/settings_left_menu.php b/settings_admin/settings_left_menu.php index 1318731..b546717 100644 --- a/settings_admin/settings_left_menu.php +++ b/settings_admin/settings_left_menu.php @@ -8,5 +8,6 @@ 広告 モデレーション カスタマイズ + メンテナンス \ No newline at end of file diff --git a/settings_admin/useradmin.php b/settings_admin/useradmin.php index a0cc4ea..0fde4ea 100644 --- a/settings_admin/useradmin.php +++ b/settings_admin/useradmin.php @@ -67,7 +67,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(); @@ -76,11 +76,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; @@ -113,7 +115,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(); @@ -122,11 +124,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; @@ -290,6 +294,7 @@ if (!empty($pdo)) { + diff --git a/settings_admin/userinfo.php b/settings_admin/userinfo.php index a99c44a..20085ee 100644 --- a/settings_admin/userinfo.php +++ b/settings_admin/userinfo.php @@ -69,7 +69,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(); @@ -78,11 +78,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; @@ -115,7 +117,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(); @@ -124,11 +126,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; @@ -521,6 +525,7 @@ require('../logout/logout.php'); + diff --git a/success.php b/success.php index 8c0dda0..72d2a9b 100644 --- a/success.php +++ b/success.php @@ -22,6 +22,7 @@ if(!(empty($_SESSION['backupcode']))){ + diff --git a/ueuse/index.php b/ueuse/index.php index c103a1a..f838559 100644 --- a/ueuse/index.php +++ b/ueuse/index.php @@ -1,5 +1,9 @@ prepare("SELECT username,userid,loginid,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_SESSION['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -62,12 +63,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; @@ -100,7 +102,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { } elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); + $passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid"); $passQuery->bindValue(':userid', htmlentities($_COOKIE['userid'])); $passQuery->execute(); $res = $passQuery->fetch(); @@ -109,12 +111,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; @@ -157,7 +160,7 @@ if(empty($userid)){ if(empty($username)){ header("Location: ../login.php"); exit; -} +} $notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'"); $notiQuery->bindValue(':userid', $userid); $notiQuery->execute(); @@ -200,6 +203,39 @@ function get_mentions_userid($postText) { return $mentionedUsers; } +function rotate($image, $exif) +{ + $orientation = $exif['Orientation'] ?? 1; + + switch ($orientation) { + case 1: //no rotate + break; + case 2: //FLIP_HORIZONTAL + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 3: //ROTATE 180 + $image = imagerotate($image, 180, 0); + break; + case 4: //FLIP_VERTICAL + imageflip($image, IMG_FLIP_VERTICAL); + break; + case 5: //ROTATE 270 FLIP_HORIZONTAL + $image = imagerotate($image, 270, 0); + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 6: //ROTATE 90 + $image = imagerotate($image, 270, 0); + break; + case 7: //ROTATE 90 FLIP_HORIZONTAL + $image = imagerotate($image, 90, 0); + imageflip($image, IMG_FLIP_HORIZONTAL); + break; + case 8: //ROTATE 270 + $image = imagerotate($image, 90, 0); + break; + } + return $image; +} @@ -256,6 +292,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result = move_uploaded_file($uploadedFile['tmp_name'], $uploadedPath); + + // EXIF削除 + if($extension == "jpg" || $extension == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath); + imagedestroy($gd_out); + } if ($result) { $photo1 = $uploadedPath; // 保存されたファイルのパスを使用 @@ -296,6 +345,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result2 = move_uploaded_file($uploadedFile2['tmp_name'], $uploadedPath2); + + // EXIF削除 + if($extension2 == "jpg" || $extension2 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath2); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath2); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath2); + imagedestroy($gd_out); + } if ($result2) { $photo2 = $uploadedPath2; // 保存されたファイルのパスを使用 @@ -336,6 +398,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3); + + // EXIF削除 + if($extension3 == "jpg" || $extension3 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath3); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath3); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath3); + imagedestroy($gd_out); + } if ($result3) { $photo3 = $uploadedPath3; // 保存されたファイルのパスを使用 @@ -376,6 +451,19 @@ if( !empty($_POST['btn_submit']) ) { // ファイルを移動 $result4 = move_uploaded_file($uploadedFile4['tmp_name'], $uploadedPath4); + + // EXIF削除 + if($extension4 == "jpg" || $extension4 == "jpeg"){ + $gd = imagecreatefromjpeg($uploadedPath4); + $w = imagesx($gd); + $h = imagesy($gd); + $gd_out = imagecreatetruecolor($w,$h); + imagecopyresampled($gd_out, $gd, 0,0,0,0, $w,$h,$w,$h); + $exif = exif_read_data($uploadedPath4); + $gd_out = rotate($gd_out, $exif); + imagejpeg($gd_out, $uploadedPath4); + imagedestroy($gd_out); + } if ($result4) { $photo4 = $uploadedPath4; // 保存されたファイルのパスを使用 @@ -475,7 +563,7 @@ if( !empty($_POST['btn_submit']) ) { $pdo->beginTransaction(); $msg = ''.$ueuse.''; - $title = ''.$username.'さんが返信しました!'; + $title = ''.$userid.'さんが返信しました!'; $url = $_SERVER['REQUEST_URI']; $userchk = 'none'; // 通知用SQL作成 @@ -507,7 +595,7 @@ if( !empty($_POST['btn_submit']) ) { $touserid = $mentionedUser; $datetime = date("Y-m-d H:i:s"); $msg = "" . $ueuse . ""; - $title = "" . $username . "さんにメンションされました!"; + $title = "" . $userid . "さんにメンションされました!"; $url = "/!" . $uniqid . "~" . $userid . ""; $userchk = 'none'; @@ -587,13 +675,14 @@ $pdo = null; + -ID <?php echo htmlentities($ueuseid, ENT_QUOTES, 'UTF-8'); ?> のユーズ - uwuzu +ID <?php echo htmlentities($ueuseid, ENT_QUOTES, 'UTF-8'); ?> のユーズ - <?php echo file_get_contents($servernamefile);?> diff --git a/unsupported.php b/unsupported.php new file mode 100644 index 0000000..53fea9a --- /dev/null +++ b/unsupported.php @@ -0,0 +1,103 @@ + + + + + + + + + +<?php echo file_get_contents($servernamefile);?> + + + + +
+
+ > +
+

お使いの環境での利用はできません

+
+

申し訳ございませんが、uwuzuをお使いの環境で使用されますとバグやエラーなどの問題が発生する可能性が非常に高いためこのページにリダイレクトさせていただきました。 +
引き続きuwuzuを使用するには推奨されている環境をご利用ください。 +
詳細は下記のリンクよりご確認ください。

+
+ + 詳細 + +
+

エラー内容

+

エラーコード:

+

エラーの原因:

+
+

アクセス環境

+

ブラウザ:

+

OS:

+

Cookie:

+

通信環境:

+
+ +
+
+
+

+

+

Version
+
+ diff --git a/user/index.php b/user/index.php index ed16535..e2731e9 100644 --- a/user/index.php +++ b/user/index.php @@ -30,9 +30,6 @@ session_name('uwuzu_s_id'); session_start(); session_regenerate_id(true); -$userid = htmlentities($_SESSION['userid']); -$username = htmlentities($_SESSION['username']); - try { $option = array( @@ -58,8 +55,8 @@ 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"]); @@ -106,8 +103,8 @@ 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"]); @@ -547,6 +544,7 @@ $pdo = null; + diff --git a/user/report.php b/user/report.php index 8e7279b..71d3edf 100644 --- a/user/report.php +++ b/user/report.php @@ -47,7 +47,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(); @@ -56,11 +56,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; @@ -93,7 +95,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(); @@ -102,11 +104,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; diff --git a/user/success.php b/user/success.php index 2a4186f..8c960d5 100644 --- a/user/success.php +++ b/user/success.php @@ -38,8 +38,8 @@ try { if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { - $passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid"); - $passQuery->bindValue(':userid', $_SESSION['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(); if(empty($res["userid"])){ @@ -47,9 +47,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { exit; }elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){ // セッションに値をセット - $userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット - $username = $_SESSION['username']; // セッションに格納されている値をそのままセット - $loginid = $res["loginid"]; + $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; @@ -82,8 +86,8 @@ 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 FROM account WHERE userid = :userid"); - $passQuery->bindValue(':userid', $_COOKIE['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(); if(empty($res["userid"])){ @@ -91,9 +95,13 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) { exit; }elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){ // セッションに値をセット - $userid = $_COOKIE['userid']; // クッキーから取得した値をセット - $username = $_COOKIE['username']; // クッキーから取得した値をセット - $loginid = $res["loginid"]; + $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; @@ -137,6 +145,7 @@ if(empty($username)){ header("Location: ../login.php"); exit; } + $notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'"); $notiQuery->bindValue(':userid', $userid); $notiQuery->execute();