diff --git a/README.md b/README.md index 08fb61a..bc207ac 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,8 @@ PHP 8では事前にGDを有効化しておいてください!(QRコードの - ueuse(text) 投稿内容保存用 - photo1(varchar(512)) 投稿に添付されたファイルの保存ディレクトリ保存用 - photo2(varchar(512)) 投稿に添付されたファイルの保存ディレクトリ保存用 +- photo3(varchar(512)) 投稿に添付されたファイルの保存ディレクトリ保存用 +- photo4(varchar(512)) 投稿に添付されたファイルの保存ディレクトリ保存用 - video1(varchar(512)) 投稿に添付されたファイルの保存ディレクトリ保存用 - datetime(datetime) 投稿日時保存用 - favorite(text) いいね保存用 @@ -128,6 +130,7 @@ PHP 8では事前にGDを有効化しておいてください!(QRコードの - info.txt : サーバー登録時に表示されるメッセージ(好きな内容) - privacypolicy.txt : プライバシーポリシー(サーバーのプライバシーポリシーを記載) - servaricon.txt : サーバーアイコンのURL +- servarlogo.txt : サーバーロゴのURL - servername.txt : サーバー名(てすとさば) - serverstop.txt : サーバー停止ページで表示するメッセージ - terms.txt : 利用規約(サーバーの利用規約を記載) diff --git a/abi/addabi.php b/abi/addabi.php index 3adec74..00dcc11 100644 --- a/abi/addabi.php +++ b/abi/addabi.php @@ -131,13 +131,13 @@ if (htmlentities(isset($_POST['uniqid'])) && htmlentities(isset($_POST['abitext' $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); - $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); - $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); - $stmt->bindParam(':url', $url, PDO::PARAM_STR); - $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); - $stmt->bindParam(':title', $title, PDO::PARAM_STR); + $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); + $stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR); + $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); + $stmt->bindParam(':userchk', htmlentities($userchk), PDO::PARAM_STR); + $stmt->bindParam(':title', htmlentities($title), PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + $stmt->bindParam(':datetime', htmlentities($datetime), PDO::PARAM_STR); // SQLクエリの実行 $res2 = $stmt->execute(); diff --git a/addauthcode.php b/addauthcode.php index a588d6b..c7361c8 100644 --- a/addauthcode.php +++ b/addauthcode.php @@ -18,6 +18,14 @@ require('db.php'); $servernamefile = "server/servername.txt"; +$serverlogofile = "server/serverlogo.txt"; +$serverlogodata = file_get_contents($serverlogofile); +$serverlogodata = explode( "\n", $serverlogodata ); +$cnt = count( $serverlogodata ); +for( $i=0;$i<$cnt;$i++ ){ + $serverlogo_link[$i] = ($serverlogodata[$i]); +} + $onlyuserfile = "server/onlyuser.txt"; $onlyuser = file_get_contents($onlyuserfile); @@ -198,9 +206,15 @@ $pdo = null;
- + + + + +

二段階認証

diff --git a/api/bot-api.php b/api/bot-api.php index 301eb03..ed518ac 100644 --- a/api/bot-api.php +++ b/api/bot-api.php @@ -457,13 +457,13 @@ if(isset($_GET['token'])&&isset($_GET['type'])) { $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); - $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); - $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); - $stmt->bindParam(':url', $url, PDO::PARAM_STR); - $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); - $stmt->bindParam(':title', $title, PDO::PARAM_STR); + $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); + $stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR); + $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); + $stmt->bindParam(':userchk', htmlentities($userchk), PDO::PARAM_STR); + $stmt->bindParam(':title', htmlentities($title), PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + $stmt->bindParam(':datetime', htmlentities($datetime), PDO::PARAM_STR); // SQLクエリの実行 $res = $stmt->execute(); diff --git a/api/serverinfo-api.php b/api/serverinfo-api.php new file mode 100644 index 0000000..e6c74e6 --- /dev/null +++ b/api/serverinfo-api.php @@ -0,0 +1,129 @@ + 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(); + } + + mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); + $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); + + $result = $mysqli->query("SELECT userid FROM account ORDER BY datetime"); + + /* 結果セットの行数を取得します */ + $count1 = $result->num_rows; + + $result2 = $mysqli->query("SELECT uniqid FROM ueuse ORDER BY datetime"); + + /* 結果セットの行数を取得します */ + $count2 = $result2->num_rows; + + /*-------------------*/ + $sql = "SELECT title, note, account, datetime FROM notice ORDER BY datetime DESC"; + $notice_array = $pdo->query($sql); + + while ($row = $notice_array->fetch(PDO::FETCH_ASSOC)) { + + $notices[] = $row; + } + + if($onlyuser === "true"){ + $openregit = false; + }elseif($onlyuser === "false"){ + $openregit = true; + }else{ + $openregit = false; + } + + if($onlyuser === "true"){ + $invitation_code = true; + }else{ + $invitation_code = false; + } + + foreach ($notices as $value) { + $notices = array( + "title" => htmlentities($value['title']), + "note" => htmlentities($value['note']), + "editor" => htmlentities($value['account']), + "datetime" => htmlentities($value['datetime']), + ); + + $notice[] = $notices; + } + + $item = [ + "server_info" => array( + "server_name" => file_get_contents($servernamefile), + "server_icon" => file_get_contents($servericonfile), + "server_description" => $serverinfo, + + "adminstor" => array( + "name" => file_get_contents($adminfile), + "email" => file_get_contents($contactfile), + ), + + "terms_url" => "https://".$domain."/rule/terms", + "privacy_policy_url" => "https://".$domain."/rule/privacypolicy", + "max_ueuse_length" => (int)htmlspecialchars(file_get_contents($mojisizefile), ENT_QUOTES, 'UTF-8'), + + "invitation_code" => $invitation_code, + + ), + + "software" => array( + "name" => "uwuzu", + "version" => "".str_replace("\r", '', $uwuzuinfo[1])."", + "repository" => "https://github.com/Daichimarukana/uwuzu", + ), + + "server_notice" => $notice, + ]; + + $response = $item; // ループ内で $response にデータを追加 + + echo json_encode($response, JSON_UNESCAPED_UNICODE); + +?> \ No newline at end of file diff --git a/authcodechk.php b/authcodechk.php index b393573..2e93ff8 100644 --- a/authcodechk.php +++ b/authcodechk.php @@ -13,6 +13,14 @@ require('db.php'); $servernamefile = "server/servername.txt"; +$serverlogofile = "server/serverlogo.txt"; +$serverlogodata = file_get_contents($serverlogofile); +$serverlogodata = explode( "\n", $serverlogodata ); +$cnt = count( $serverlogodata ); +for( $i=0;$i<$cnt;$i++ ){ + $serverlogo_link[$i] = ($serverlogodata[$i]); +} + $onlyuserfile = "server/onlyuser.txt"; $onlyuser = file_get_contents($onlyuserfile); @@ -142,9 +150,15 @@ $pdo = null;
- + + + + +

二段階認証

diff --git a/authlogin.php b/authlogin.php index a54e610..5161998 100644 --- a/authlogin.php +++ b/authlogin.php @@ -2,6 +2,14 @@ $servernamefile = "server/servername.txt"; +$serverlogofile = "server/serverlogo.txt"; +$serverlogodata = file_get_contents($serverlogofile); +$serverlogodata = explode( "\n", $serverlogodata ); +$cnt = count( $serverlogodata ); +for( $i=0;$i<$cnt;$i++ ){ + $serverlogo_link[$i] = ($serverlogodata[$i]); +} + require('db.php'); @@ -122,13 +130,13 @@ if( !empty($_POST['btn_submit']) ) { // 通知用SQL作成 $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); - $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); - $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); - $stmt->bindParam(':url', $url, PDO::PARAM_STR); - $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); - $stmt->bindParam(':title', $title, PDO::PARAM_STR); + $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); + $stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR); + $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); + $stmt->bindParam(':userchk', htmlentities($userchk), PDO::PARAM_STR); + $stmt->bindParam(':title', htmlentities($title), PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + $stmt->bindParam(':datetime', htmlentities($datetime), PDO::PARAM_STR); // SQLクエリの実行 $res = $stmt->execute(); @@ -189,13 +197,13 @@ if( !empty($_POST['btn_submit']) ) { // 通知用SQL作成 $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); - $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); - $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); - $stmt->bindParam(':url', $url, PDO::PARAM_STR); - $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); - $stmt->bindParam(':title', $title, PDO::PARAM_STR); - - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); + $stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR); + $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); + $stmt->bindParam(':userchk', htmlentities($userchk), PDO::PARAM_STR); + $stmt->bindParam(':title', htmlentities($title), PDO::PARAM_STR); + + $stmt->bindParam(':datetime', htmlentities($datetime), PDO::PARAM_STR); // SQLクエリの実行 $res = $stmt->execute(); @@ -253,9 +261,15 @@ $pdo = null;
- + + + + +

二段階認証

diff --git a/check.php b/check.php index 086d0d8..bb3b913 100644 --- a/check.php +++ b/check.php @@ -2,6 +2,14 @@ $servernamefile = "server/servername.txt"; +$serverlogofile = "server/serverlogo.txt"; +$serverlogodata = file_get_contents($serverlogofile); +$serverlogodata = explode( "\n", $serverlogodata ); +$cnt = count( $serverlogodata ); +for( $i=0;$i<$cnt;$i++ ){ + $serverlogo_link[$i] = ($serverlogodata[$i]); +} + require('db.php'); @@ -149,13 +157,13 @@ if( !empty($_POST['btn_submit']) ) { // 通知用SQL作成 $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); - $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); - $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); - $stmt->bindParam(':url', $url, PDO::PARAM_STR); - $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); - $stmt->bindParam(':title', $title, PDO::PARAM_STR); + $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); + $stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR); + $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); + $stmt->bindParam(':userchk', htmlentities($userchk), PDO::PARAM_STR); + $stmt->bindParam(':title', htmlentities($title), PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + $stmt->bindParam(':datetime', htmlentities($datetime), PDO::PARAM_STR); // SQLクエリの実行 $res = $stmt->execute(); @@ -221,9 +229,15 @@ $pdo = null;
- + + + + +

確認

diff --git a/css/home.css b/css/home.css index bc9be72..483a44d 100644 --- a/css/home.css +++ b/css/home.css @@ -880,7 +880,7 @@ main h1{ } .select_utl{ margin: 0px; - background-color: var(--background-color); + background-color: var(--tl-color); border: none; width: auto; text-align: center; @@ -896,7 +896,7 @@ main h1{ margin-top: 0px; margin-bottom: 0px; font-size: 16px; - background: var(--background-color); + background: var(--tl-color); color: var(--dark-subtext-color); text-decoration: none; font-family: 'BIZ UDPGothic', sans-serif; @@ -943,7 +943,7 @@ main h1{ object-fit: cover; margin: 0px; width: 100%; - height: 10dvh; + height: auto; vertical-align:top; } .ueuse{ @@ -1192,7 +1192,21 @@ main h1{ margin-left: auto; margin-right: auto; } - +.ueuse .photo3 a{ + width: 48%; + margin-left: auto; + margin-right: auto; +} +.ueuse .photo3_btm a{ + width: 100%; + margin-left: auto; + margin-right: auto; +} +.ueuse .photo4 a{ + width: 48%; + margin-left: auto; + margin-right: auto; +} .ueuse .photo1 a img{ object-fit: cover; @@ -1220,6 +1234,48 @@ main h1{ border: 1px solid var(--border-color); } +.ueuse .photo3{ + display: flex; + flex-wrap: wrap; +} +.ueuse .photo3_btm{ + display: block; + width: 100%; +} +.ueuse .photo3 a img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 200px; + border: 1px solid var(--border-color); +} +.ueuse .photo3_btm a img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + min-width: 100%; + height: 200px; + border: 1px solid var(--border-color); +} +.ueuse .photo4{ + display: flex; + flex-wrap: wrap; +} +.ueuse .photo4 a img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 200px; + border: 1px solid var(--border-color); +} .ueuse .video1 video{ object-fit: cover; border-radius: 10px; @@ -1537,7 +1593,7 @@ main h1{ width:auto; padding: 8px auto; - margin-left: auto; + margin-left: 6px; margin-right: 6px; margin-top: 2px; margin-bottom: 2px; @@ -1569,7 +1625,7 @@ main h1{ display: block; width:auto; - margin-left: auto; + margin-left: 6px; margin-right: 6px; margin-top: 2px; margin-bottom: 2px; @@ -1602,6 +1658,78 @@ main h1{ transition: all 250ms ease-out; } +.ueuse .favbox .share{ + cursor: pointer; + border: none; + display: block; + width:auto; + padding: 8px auto; + + margin-left: auto; + margin-right: 6px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: var(--sub-color); + + border-radius: 50px; + color:var(--main-color); + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.ueuse .favbox .share:hover{ + cursor: pointer; + border: none; + display: block; + width:auto; + + margin-left: auto; + margin-right: 6px; + margin-top: 2px; + margin-bottom: 2px; + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: var(--main-color); + + border-radius: 50px; + color: var(--sub-color);; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; +} +.ueuse .favbox .share svg { + margin-top: -6px; + margin-right: 0px; + margin-left: -2px; + width: 24px; + height: 24px; + fill: currentColor; + transition: all 250ms ease-out; +} + .ueuse .favbox img{ margin-left: 0px; width: 24px; @@ -2515,7 +2643,7 @@ label>input { margin-left: 0px; margin-right: auto; margin-top: 2px; - width: 120px; + height: 44px; } .terms{ @@ -2603,7 +2731,110 @@ label>input { font-weight: normal; font-size: 16px; text-align: left; - color: var(--background-color)FFF; + color: var(--background-color); +} + +.terms .fxbx{ + display: flex; +} +.terms .fxbx .new{ + height: fit-content; + margin:0px; + margin-right: 6px; + margin-top: auto; + margin-bottom: auto; + padding:0px 8px; + border: 1px solid #00b96c; + text-align: center; + border-radius: 15px; +} +.terms .fxbx .new p{ + line-height: 12px; + margin-top: 4px; + margin-bottom: 4px; + margin-left: auto; + margin-right: auto; + color: #00b96c; + font-size: 14px; + font-family: 'BIZ UDGothic', sans-serif; + font-weight: normal; + vertical-align:middle; + align-items: center; +} +.terms .fxbx .fix{ + height: fit-content; + margin:0px; + margin-right: 6px; + margin-top: auto; + margin-bottom: auto; + padding:0px 8px; + border: 1px solid #e6890f; + text-align: center; + border-radius: 15px; +} +.terms .fxbx .fix p{ + line-height: 12px; + margin-top: 4px; + margin-bottom: 4px; + margin-left: auto; + margin-right: auto; + color: #e6890f; + font-size: 14px; + font-family: 'BIZ UDGothic', sans-serif; + font-weight: normal; + vertical-align:middle; + align-items: center; +} +.terms .fxbx .chg{ + height: fit-content; + margin:0px; + margin-right: 6px; + margin-top: auto; + margin-bottom: auto; + padding:0px 8px; + border: 1px solid #1d9bf0; + text-align: center; + border-radius: 15px; +} +.terms .fxbx .chg p{ + line-height: 12px; + margin-top: 4px; + margin-bottom: 4px; + margin-left: auto; + margin-right: auto; + color: #1d9bf0; + font-size: 14px; + font-family: 'BIZ UDGothic', sans-serif; + font-weight: normal; + vertical-align:middle; + align-items: center; +} +.terms .fxbx .del{ + height: fit-content; + margin:0px; + margin-right: 6px; + margin-top: auto; + margin-bottom: auto; + padding:0px 8px; + border: 1px solid #FF4848; + text-align: center; + border-radius: 15px; +} +.terms .fxbx .del p{ + line-height: 12px; + margin-top: 4px; + margin-bottom: 4px; + margin-left: auto; + margin-right: auto; + color: #FF4848; + font-size: 14px; + font-family: 'BIZ UDGothic', sans-serif; + font-weight: normal; + vertical-align:middle; + align-items: center; +} +.terms .space_tab{ + margin-left: 45px; } @@ -2618,7 +2849,6 @@ label>input { font-family: 'BIZ UDPGothic', sans-serif; font-weight: normal; } - .terms .p3{ margin-top: 24px; text-align: left; @@ -2759,6 +2989,15 @@ label>input { overflow-wrap:break-word; color: var(--text-color); } +.rightbox .noticebox a{ + margin-top: auto; + margin-bottom: auto; + font-size: 16px; + color:var(--link-color); + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; +} .rightbox .noticebox img{ margin-top: auto; @@ -3967,7 +4206,7 @@ summary { .f_c_area{ margin: 0px; - background-color: var(--background-color); + background-color: var(--tl-color); border: none; width: auto; text-align: center; @@ -4493,7 +4732,7 @@ summary { width:auto; padding: 8px auto; - margin-left: auto; + margin-left: 6px; margin-right: 6px; margin-top: 2px; margin-bottom: 2px; @@ -4525,7 +4764,7 @@ summary { display: block; width:auto; - margin-left: auto; + margin-left: 6px; margin-right: 6px; margin-top: 2px; margin-bottom: 2px; @@ -4560,6 +4799,70 @@ summary { transition: all 250ms ease-out; } + .ueuse .favbox .share{ + cursor: pointer; + border: none; + display: block; + width:auto; + padding: 8px auto; + + margin-left: auto; + margin-right: 6px; + margin-top: 2px; + margin-bottom: 2px; + + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: var(--sub-color); + + border-radius: 50px; + color:var(--main-color); + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + + .ueuse .favbox .share:hover{ + cursor: pointer; + border: none; + display: block; + width:auto; + + margin-left: auto; + margin-right: 6px; + margin-top: 2px; + margin-bottom: 2px; + + padding-top: 2px; + padding-bottom: 2px; + padding-left: 12px; + padding-right: 12px; + + + background-color: var(--main-color); + + border-radius: 50px; + color: var(--sub-color);; + font-size: 16px; + font-family: 'Zen Maru Gothic', sans-serif; + font-weight: normal; + text-decoration:none; + text-align: center; + transition: box-shadow 250ms ease-in-out; + transition: width 250ms ease-out; + transition: all 250ms ease-out; + } + .ueuse{ animation: slideInY 0.5s cubic-bezier(0.25, 1, 0.5, 1) 1 forwards; margin: 12px; @@ -4906,14 +5209,45 @@ summary { display: flex; } - .ueuse .photo2 img{ + .ueuse .photo2 a img{ object-fit: cover; border-radius: 10px; margin-top: 12px; margin-left: auto; margin-right: auto; - width: 47%; - height: auto; + width: 100%; + height: 25dvh; + border: 1px solid var(--border-color); + } + + .ueuse .photo3 a img{ + object-fit: cover; + border-radius: 10px; + margin-top: 12px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 20dvh; + border: 1px solid var(--border-color); + } + .ueuse .photo3_btm a img{ + object-fit: cover; + border-radius: 10px; + margin-top: 6px; + margin-left: auto; + margin-right: auto; + min-width: 100%; + height: 25dvh; + border: 1px solid var(--border-color); + } + .ueuse .photo4 a img{ + object-fit: cover; + border-radius: 10px; + margin-top: 8px; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 20dvh; border: 1px solid var(--border-color); } @@ -5128,6 +5462,7 @@ summary { margin-top: 12px; margin-left: auto; margin-right: auto; + margin-bottom: 48px } .modal-content .fbtn{ @@ -5596,6 +5931,14 @@ summary { background-color: var(--main-color); color: var(--sub-color);; } + .ueuse .favbox .share{ + background-color: var(--dark-background-color); + color:var(--main-color); + } + .ueuse .favbox .share:hover{ + background-color: var(--main-color); + color: var(--sub-color);; + } .ueuse hr{ border-top: 1px solid var(--dark-subtext-color); } @@ -5755,6 +6098,9 @@ summary { .rightbox .noticebox p{ color: var(--background-color); } + .rightbox .noticebox a{ + color:var(--main-color); + } .rightbox .noticebox .makeup p{ color:var(--sub-color);; diff --git a/home/ftl.php b/home/ftl.php index f57faef..88736a2 100644 --- a/home/ftl.php +++ b/home/ftl.php @@ -296,6 +296,87 @@ if( !empty($_POST['btn_submit']) ) { } } + if (empty($_FILES['upload_images3']['name'])) { + $photo3 = "none"; + } else { + + if (empty($_FILES['upload_images2']['name'])){ + $error_message[] = '画像2から画像を選択してください!!!'; + } + // アップロードされたファイル情報 + $uploadedFile3 = $_FILES['upload_images3']; + + if( 10000000 < $uploadedFile3["size"] ) { + $error_message[] = 'ファイルサイズが大きすぎます!'; + } + // アップロードされたファイルの拡張子を取得 + $extension3 = pathinfo($uploadedFile3['name'], PATHINFO_EXTENSION); + + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename3 = uniqid() . '-'.$userid.'.' . $extension3; + + // 保存先のパスを生成 + $uploadedPath3 = '../ueuseimages/' . $newFilename3; + + // ファイルを移動 + $result3 = move_uploaded_file($uploadedFile3['tmp_name'], $uploadedPath3); + + if ($result3) { + $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 (empty($_FILES['upload_images4']['name'])) { + $photo4 = "none"; + } else { + + if (empty($_FILES['upload_images3']['name'])){ + $error_message[] = '画像3から画像を選択してください!!!'; + } + // アップロードされたファイル情報 + $uploadedFile4 = $_FILES['upload_images4']; + + if( 10000000 < $uploadedFile4["size"] ) { + $error_message[] = 'ファイルサイズが大きすぎます!'; + } + // アップロードされたファイルの拡張子を取得 + $extension4 = pathinfo($uploadedFile4['name'], PATHINFO_EXTENSION); + + // 新しいファイル名を生成(uniqid + 拡張子) + $newFilename4 = uniqid() . '-'.$userid.'.' . $extension4; + + // 保存先のパスを生成 + $uploadedPath4 = '../ueuseimages/' . $newFilename4; + + // ファイルを移動 + $result4 = move_uploaded_file($uploadedFile4['tmp_name'], $uploadedPath4); + + if ($result4) { + $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 (empty($_FILES['upload_videos1']['name'])) { $video1 = "none"; } else { @@ -350,7 +431,7 @@ if( !empty($_POST['btn_submit']) ) { try { // SQL作成 - $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ueuse, photo1, photo2, video1, datetime, abi, nsfw) VALUES (:username, :account, :uniqid, :ueuse, :photo1, :photo2, :video1, :datetime, :abi, :nsfw)"); + $stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ueuse, photo1, photo2, photo3, photo4, video1, datetime, abi, nsfw) VALUES (:username, :account, :uniqid, :ueuse, :photo1, :photo2, :photo3, :photo4, :video1, :datetime, :abi, :nsfw)"); $stmt->bindParam(':username', $username, PDO::PARAM_STR); $stmt->bindParam(':account', $userid, PDO::PARAM_STR); @@ -359,6 +440,8 @@ if( !empty($_POST['btn_submit']) ) { $stmt->bindParam(':photo1', $photo1, PDO::PARAM_STR); $stmt->bindParam(':photo2', $photo2, PDO::PARAM_STR); + $stmt->bindParam(':photo3', $photo3, PDO::PARAM_STR); + $stmt->bindParam(':photo4', $photo4, PDO::PARAM_STR); $stmt->bindParam(':video1', $video1, PDO::PARAM_STR); $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); @@ -389,13 +472,13 @@ if( !empty($_POST['btn_submit']) ) { $stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)"); - $stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR); + $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); $stmt->bindParam(':msg', $msg, PDO::PARAM_STR); - $stmt->bindParam(':url', $url, PDO::PARAM_STR); - $stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); - $stmt->bindParam(':title', $title, PDO::PARAM_STR); + $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); + $stmt->bindParam(':userchk', htmlentities($userchk), PDO::PARAM_STR); + $stmt->bindParam(':title', htmlentities($title), PDO::PARAM_STR); - $stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); + $stmt->bindParam(':datetime', htmlentities($datetime), PDO::PARAM_STR); // SQLクエリの実行 $res = $stmt->execute(); @@ -468,6 +551,9 @@ if ("serviceWorker" in navigator) {
+ @@ -498,7 +584,7 @@ if ("serviceWorker" in navigator) {

画像のEXIF情報(位置情報など)は削除されません。
情報漏洩に気をつけてくださいね…

- + +