diff --git a/css/home.css b/css/home.css index 9f0f517..6affa0c 100644 --- a/css/home.css +++ b/css/home.css @@ -115,7 +115,7 @@ body{ padding: 8px 10px; border: none; border-radius: 10px; - background: #fff; + background: #f5f5f5; font-family: 'Zen Maru Gothic', sans-serif; color: rgb(32,32,32); font-size: 1em; @@ -795,7 +795,38 @@ main h1{ color:#252525; font-family: 'BIZ UDPGothic', sans-serif; } +.select_utl{ + margin: 0px; + background-color: #FFF; + border: none; + width: auto; + text-align: center; + display: flex; +} +.select_utl .btn{ + display: block; + width: 25%; + line-height: 32px; + margin-left: auto; + margin-right: auto; + overflow-wrap: break-word; + margin-top: 0px; + margin-bottom: 0px; + font-size: 16px; + background: #FFF; + color: #CCC; + text-decoration: none; + font-family: 'BIZ UDPGothic', sans-serif; + font-weight: bold; + display: inline-block; + border: none; + cursor: pointer; +} +.select_utl .btmline{ + color: #FFC832; + border-bottom: 1px solid #FFC832; +} .ueuse{ @@ -1711,8 +1742,8 @@ main h1{ padding-left: 32px; padding-right: 32px; border-radius: 15px; - background-color: #f7f7f7; - box-shadow:0 0px 48px 0 rgba(0, 0, 0, .05) inset; + background-color: #ffffff; + box-shadow:none; text-align: left; } @@ -3015,7 +3046,7 @@ hr{ color:#252525; font-family: 'BIZ UDGothic', sans-serif; word-wrap: break-word; - font-size: 22px; + font-size: 18px; line-height: 22px; font-weight: bold; } @@ -3026,7 +3057,7 @@ hr{ color:#252525; font-family: 'BIZ UDGothic', sans-serif; word-wrap: break-word; - font-size: 16px; + font-size: 14px; line-height: 22px; font-weight: bold; } @@ -4149,6 +4180,17 @@ hr{ font-weight: normal; margin-bottom: 6px; } + + .formarea{ + padding-top: 16px; + padding-bottom: 16px; + padding-left: 32px; + padding-right: 32px; + border-radius: 0px; + box-shadow:none; + text-align: left; + } + } /*------------------------------------------------------------------------------------------------------------*/ @@ -4535,7 +4577,7 @@ hr{ padding-top: 8px; padding-bottom: 8px; background-color: #0c0c0c; - border: 1px solid #EEE; + border: none; width: auto; } .server_code h1{ @@ -4677,4 +4719,17 @@ hr{ border-bottom: 1px solid #FFC832; } + + .select_utl{ + background-color: #0c0c0c; + } + + .select_utl .btn{ + background: #0c0c0c; + color: #EEE; + } + .select_utl .btmline{ + color: #FFC832; + border-bottom: 1px solid #FFC832; + } } \ No newline at end of file diff --git a/index.php b/index.php index 61e8a13..f084109 100644 --- a/index.php +++ b/index.php @@ -38,25 +38,6 @@ $contactfile = "server/contact.txt"; $onlyuserfile = "server/onlyuser.txt"; $onlyuser = file_get_contents($onlyuserfile); -try { - - $option = array( - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - PDO::MYSQL_ATTR_MULTI_STATEMENTS => false - ); - $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); - - $stmt = $pdo->prepare("SELECT COUNT(userid) FROM account"); - $stmt->execute(); - $count2 = $stmt->fetchColumn(); - - -} catch(PDOException $e) { - - // 接続エラーのときエラー内容を取得する - $error_message[] = $e->getMessage(); -} - // データベースに接続 try { $option = array( diff --git a/nextpage/userlikepage.php b/nextpage/userlikepage.php new file mode 100644 index 0000000..7934d74 --- /dev/null +++ b/nextpage/userlikepage.php @@ -0,0 +1,105 @@ + 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(); +} + + +$uwuzuid = htmlentities(isset($_GET['id'])) ? htmlentities($_GET['id']) : ''; +$userid = htmlentities($_GET['userid']); + +$itemsPerPage = 30; // 1ページあたりのユーズ数 +$pageNumber = htmlentities(isset($_GET['page'])) ? htmlentities(intval($_GET['page'])) : 1; +$offset = ($pageNumber - 1) * $itemsPerPage; + +$messages = array(); + +if (!empty($pdo)) { + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $dbh->prepare("SELECT username, userid, profile, role, follower FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $uwuzuid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + $messageQuery = $dbh->prepare("SELECT account,username,ueuse,uniqid,rpuniqid,datetime,photo1,photo2,video1,favorite, abi, abidate FROM ueuse WHERE favorite LIKE :userid ORDER BY datetime DESC LIMIT $offset, $itemsPerPage"); + $messageQuery->bindValue(':userid', '%,' . $uwuzuid . '%', PDO::PARAM_STR); + + $messageQuery->execute(); + $message_array = $messageQuery->fetchAll(); + + $messages = array(); + foreach ($message_array as $row) { + $messages[] = $row; + } + // ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える + foreach ($messages as &$message) { + $userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $message["account"]); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if ($userData) { + $message['iconname'] = $userData['iconname']; + $message['headname'] = $userData['headname']; + $message['username'] = $userData['username']; + $message['role'] = $userData['role']; + } + + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $message['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData){ + $message['reply_count'] = $rpData['reply_count']; + } + } + + if(!empty($messages)){ + foreach ($messages as $value) { + + $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $favIds = explode(',', $fav); + $value["favcnt"] = count($favIds)-1; + + $messageDisplay = new MessageDisplay($value, $userid); + $messageDisplay->display(); + } + }else{ + echo '

ユーズがありません

'; + } + + $pdo = null; + +} + +?> diff --git a/nextpage/usermediapage.php b/nextpage/usermediapage.php new file mode 100644 index 0000000..10a1487 --- /dev/null +++ b/nextpage/usermediapage.php @@ -0,0 +1,104 @@ + 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(); +} + + +$uwuzuid = htmlentities(isset($_GET['id'])) ? htmlentities($_GET['id']) : ''; +$userid = htmlentities($_GET['userid']); + +$itemsPerPage = 30; // 1ページあたりのユーズ数 +$pageNumber = htmlentities(isset($_GET['page'])) ? htmlentities(intval($_GET['page'])) : 1; +$offset = ($pageNumber - 1) * $itemsPerPage; + +$messages = array(); + +if (!empty($pdo)) { + + $dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + )); + + $userQuery = $dbh->prepare("SELECT username, userid, profile, role, follower FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $uwuzuid); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + $messageQuery = $dbh->prepare("SELECT account,username,ueuse,uniqid,rpuniqid,datetime,photo1,photo2,video1,favorite, abi, abidate FROM ueuse WHERE account = :userid AND rpuniqid = '' AND (photo1 NOT IN('none') OR photo2 NOT IN('none') OR video1 NOT IN('none')) ORDER BY datetime DESC LIMIT $offset, $itemsPerPage"); + $messageQuery->bindValue(':userid', $uwuzuid); + $messageQuery->execute(); + $message_array = $messageQuery->fetchAll(); + + $messages = array(); + foreach ($message_array as $row) { + $messages[] = $row; + } + // ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える + foreach ($messages as &$message) { + $userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname FROM account WHERE userid = :userid"); + $userQuery->bindValue(':userid', $message["account"]); + $userQuery->execute(); + $userData = $userQuery->fetch(); + + if ($userData) { + $message['iconname'] = $userData['iconname']; + $message['headname'] = $userData['headname']; + $message['username'] = $userData['username']; + $message['role'] = $userData['role']; + } + + $rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid"); + $rpQuery->bindValue(':rpuniqid', $message['uniqid']); + $rpQuery->execute(); + $rpData = $rpQuery->fetch(PDO::FETCH_ASSOC); + + if ($rpData){ + $message['reply_count'] = $rpData['reply_count']; + } + } + + if(!empty($messages)){ + foreach ($messages as $value) { + + $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 + + // コンマで区切って配列に分割し、要素数を数える + $favIds = explode(',', $fav); + $value["favcnt"] = count($favIds)-1; + + $messageDisplay = new MessageDisplay($value, $userid); + $messageDisplay->display(); + } + }else{ + echo '

ユーズがありません

'; + } + + $pdo = null; + +} + +?> diff --git a/require/rightbox.php b/require/rightbox.php index d12b00d..8cabac0 100644 --- a/require/rightbox.php +++ b/require/rightbox.php @@ -43,7 +43,7 @@

Server

- 利用規約プライバシーポリシー + 利用規約プライバシーポリシー詳細

Software

Version :

diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..e69de29 diff --git a/rule/serverabout.php b/rule/serverabout.php new file mode 100644 index 0000000..b5939a5 --- /dev/null +++ b/rule/serverabout.php @@ -0,0 +1,127 @@ + + + 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; + + +?> + + + + + + + + +サーバー情報 - <?php echo file_get_contents($servernamefile);?> + + + + + +
+ +
+ +
+ +

サーバー情報

+
+
+
+

説明

+

'; + }?>

+
+ +

管理者情報

+

管理者名 :

+

連絡用メールアドレス :

+ +
+ +

統計情報

+

ユーザー数 : "?>

+

投稿数 : "?>

+ +

注意

+

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

+ +
+

サーバーソフトウェア

+
+
Version :
Developer :
Last Update :
+ +
+ + + + + \ No newline at end of file diff --git a/server/uwuzuinfo.txt b/server/uwuzuinfo.txt index bf31d42..c0ac5f8 100644 --- a/server/uwuzuinfo.txt +++ b/server/uwuzuinfo.txt @@ -1,4 +1,4 @@ uwuzu -1.2.16 +1.2.17 2023/09/05 daichimarukana,putonfps \ No newline at end of file diff --git a/server/uwuzurelease.txt b/server/uwuzurelease.txt index 2be59cf..8ed2dbf 100644 --- a/server/uwuzurelease.txt +++ b/server/uwuzurelease.txt @@ -1,6 +1,15 @@ ## リリースノートだぜぇぇぇぇぇぇい!!!!!!! ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...) +## Version 1.2.17 +リリース日:2023/09/05 +OpenAI社によるGPTBotのクロールを拒否する設定項目を追加しました。 +サーバー設定よりログアウトできない問題を修正しました。 +一部スマホ向けUIを変更しました。 +ユーザーページに【メディア】欄と【いいね】欄を追加しました! +サーバーの詳細情報表示ページを追加しました! +404ページ・503ページに任意の画像を表示する機能を追加しました(サーバー設定からは設定できません。) + ## Version 1.2.16 リリース日:2023/09/05 サーバー設定項目を追加しました。 diff --git a/settings/serveradmin.php b/settings/serveradmin.php index 0341378..f9b3f34 100644 --- a/settings/serveradmin.php +++ b/settings/serveradmin.php @@ -21,6 +21,8 @@ $onlyuserfile = "../server/onlyuser.txt"; $err404imagefile = "../server/404imagepath.txt"; +$robots = "../robots.txt"; + function createUniqId(){ list($msec, $sec) = explode(" ", microtime()); $hashCreateTime = $sec.floor($msec*1000000); @@ -50,9 +52,6 @@ session_name('uwuzu_s_id'); session_start(); session_regenerate_id(true); -$userid = htmlentities($_SESSION['userid']); -$username = htmlentities($_SESSION['username']); - try { $option = array( @@ -235,6 +234,24 @@ if( !empty($_POST['btn_submit']) ) { }else{ $saveonlyuser = "false"; } + + $postrobots = $_POST['robots']; + + if($postrobots === "true"){ + //GPTBotによるクロールを拒否 + $file = fopen($robots, 'w'); + $data = "User-agent: GPTBot\nDisallow: /"; + fputs($file, $data); + fclose($file); + }else{ + //GPTBotによるクロールを許可 + $file = fopen($robots, 'w'); + $data = ""; + fputs($file, $data); + fclose($file); + } + + $serverterms = $_POST['serverterms']; $serverprv = $_POST['serverprv']; @@ -334,7 +351,7 @@ if( !empty($_POST['code_btn_submit']) ) { // プリペアドステートメントを削除 $stmt = null; } - +require('../logout/logout.php'); ?> @@ -395,6 +412,19 @@ if( !empty($_POST['code_btn_submit']) ) { +
+

OpenAIによるクロールを拒否するかどうか
※robots.txtによりOpenAIからのクロールを拒否するものであり、他のAI企業によるクロールを完全拒否するものではございません。

+
+ + + + + + + +
+
+

利用規約

@@ -421,11 +451,10 @@ if( !empty($_POST['code_btn_submit']) ) {

コード:

使用状況:発行日時:".$value["datetime"].""; }elseif($value["used"] === "true"){ - echo "使用済み"; + echo "使用済み
使用日時:".$value["datetime"].""; }?>

-

発行日時:

diff --git a/user/index.php b/user/index.php index 3f9f695..6cc9d48 100644 --- a/user/index.php +++ b/user/index.php @@ -519,8 +519,12 @@ $pdo = null; - - +
+
+ + + +

@@ -574,25 +578,107 @@ $(document).ready(function() { var isLoading = false; + var mode = ""; + function loadPosts() { - if (isLoading) return; - isLoading = true; + if (isLoading) return; + isLoading = true; $("#loading").show(); var uwuzuid = ''; var userid = ''; - $.ajax({ - url: '../nextpage/userpage.php', // PHPファイルへのパス - method: 'GET', - data: { page: pageNumber, id: uwuzuid ,userid: userid}, - dataType: 'html', - success: function(response) { - $('#postContainer').append(response); - pageNumber++; - isLoading = false; - $("#loading").hide(); - } - }); + if(mode == 'allueuse'){ + $.ajax({ + url: '../nextpage/userpage.php', // PHPファイルへのパス + method: 'GET', + data: { page: pageNumber, id: uwuzuid ,userid: userid}, + dataType: 'html', + success: function(response) { + $('#postContainer').append(response); + pageNumber++; + isLoading = false; + $("#loading").hide(); + } + }); + }else if(mode == 'mediaueuse'){ + $.ajax({ + url: '../nextpage/usermediapage.php', // PHPファイルへのパス + method: 'GET', + data: { page: pageNumber, id: uwuzuid ,userid: userid}, + dataType: 'html', + success: function(response) { + $('#postContainer').append(response); + pageNumber++; + isLoading = false; + $("#loading").hide(); + } + }); + }else if(mode == 'likeueuse'){ + $.ajax({ + url: '../nextpage/userlikepage.php', // PHPファイルへのパス + method: 'GET', + data: { page: pageNumber, id: uwuzuid ,userid: userid}, + dataType: 'html', + success: function(response) { + $('#postContainer').append(response); + pageNumber++; + isLoading = false; + $("#loading").hide(); + } + }); + }else{ + $('#all_ueuse_btn').addClass('btmline'); + $.ajax({ + url: '../nextpage/userpage.php', // PHPファイルへのパス + method: 'GET', + data: { page: pageNumber, id: uwuzuid ,userid: userid}, + dataType: 'html', + success: function(response) { + $('#postContainer').append(response); + pageNumber++; + isLoading = false; + $("#loading").hide(); + } + }); + } } + + $("#all_ueuse_btn").on('click',function(event) { + $('#all_ueuse_btn').addClass('btmline'); + $('#media_ueuse_btn').removeClass('btmline'); + $('#like_ueuse_btn').removeClass('btmline'); + + event.preventDefault(); + $("#postContainer").empty(); + pageNumber = 1; + mode = "allueuse"; + loadPosts(); + }); + + $("#media_ueuse_btn").on('click',function(event) { + $('#media_ueuse_btn').addClass('btmline'); + $('#like_ueuse_btn').removeClass('btmline'); + $('#all_ueuse_btn').removeClass('btmline'); + + event.preventDefault(); + $("#postContainer").empty(); + pageNumber = 1; + mode = "mediaueuse"; + loadPosts(); + }); + + $("#like_ueuse_btn").on('click',function(event) { + $('#like_ueuse_btn').addClass('btmline'); + $('#media_ueuse_btn').removeClass('btmline'); + $('#all_ueuse_btn').removeClass('btmline'); + + event.preventDefault(); + $("#postContainer").empty(); + pageNumber = 1; + mode = "likeueuse"; + loadPosts(); + }); + + $('.outer').on('scroll', function() { var innerHeight = $('.inner').innerHeight(), //内側の要素の高さ