mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu v1.4.7 Funium
This commit is contained in:
+4
-1
@@ -3,7 +3,7 @@ $mojisizefile = "../server/textsize.txt";
|
|||||||
|
|
||||||
$banurldomainfile = "../server/banurldomain.txt";
|
$banurldomainfile = "../server/banurldomain.txt";
|
||||||
$banurl_info = file_get_contents($banurldomainfile);
|
$banurl_info = file_get_contents($banurldomainfile);
|
||||||
$banurl = preg_split("/\r\n|\n|\r/", $banurl_info);
|
$banurl = array_filter(preg_split("/\r\n|\n|\r/", $banurl_info));
|
||||||
|
|
||||||
require('../db.php');
|
require('../db.php');
|
||||||
|
|
||||||
@@ -57,6 +57,7 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['abitext'])) && s
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
// 禁止url確認
|
// 禁止url確認
|
||||||
|
if(!(empty($banurl))){
|
||||||
for($i = 0; $i < count($banurl); $i++) {
|
for($i = 0; $i < count($banurl); $i++) {
|
||||||
if (false !== strpos($abitext, 'https://'.$banurl[$i])) {
|
if (false !== strpos($abitext, 'https://'.$banurl[$i])) {
|
||||||
$err = "contains_prohibited_url";
|
$err = "contains_prohibited_url";
|
||||||
@@ -67,6 +68,8 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['abitext'])) && s
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS);
|
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS);
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
|||||||
"preferredUsername" => "".$userData["userid"]."",
|
"preferredUsername" => "".$userData["userid"]."",
|
||||||
"name" => "".$userData["username"]."",
|
"name" => "".$userData["username"]."",
|
||||||
"summary" => "".nl2br($userData["profile"])."",
|
"summary" => "".nl2br($userData["profile"])."",
|
||||||
|
"followers" => "https://".$domain."/user/followers/?actor=@".$userid."",
|
||||||
|
"following" => "https://".$domain."/user/following/?actor=@".$userid."",
|
||||||
"inbox" => "https://".$domain."/user/inbox/?actor=@".$userid."",
|
"inbox" => "https://".$domain."/user/inbox/?actor=@".$userid."",
|
||||||
"outbox" => "https://".$domain."/user/outbox/?actor=@".$userid."",
|
"outbox" => "https://".$domain."/user/outbox/?actor=@".$userid."",
|
||||||
"published" => "".date(DATE_ATOM, strtotime($userData["datetime"]))."",
|
"published" => "".date(DATE_ATOM, strtotime($userData["datetime"]))."",
|
||||||
|
|||||||
+1
-1
@@ -3745,7 +3745,7 @@ label>input {
|
|||||||
|
|
||||||
.rightbox .btmbox{
|
.rightbox .btmbox{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 6px; /*下に固定*/
|
bottom: 8px; /*下に固定*/
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
max-width: 45dvh;
|
max-width: 45dvh;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
|||||||
+67
-3
@@ -405,7 +405,7 @@ function YouTube_and_nicovideo_Links($postText) {
|
|||||||
}
|
}
|
||||||
$video_id = str_replace('&', '?', $video_id);
|
$video_id = str_replace('&', '?', $video_id);
|
||||||
} elseif (isset($parsedUrl['path'])) {
|
} elseif (isset($parsedUrl['path'])) {
|
||||||
if (preg_match('/^\/watch\/|^\/embed\/|^\/shorts\/|^\/v\//', $parsedUrl['path'])) {
|
if (preg_match('/^\/watch\/|^\/embed\/|^\/shorts\/|^\/v\/|\//', $parsedUrl['path'])) {
|
||||||
$video_id = str_replace('/', '', htmlentities($parsedUrl['path'], ENT_QUOTES, 'UTF-8', false));
|
$video_id = str_replace('/', '', htmlentities($parsedUrl['path'], ENT_QUOTES, 'UTF-8', false));
|
||||||
$video_time = 0;
|
$video_time = 0;
|
||||||
$iframe = true;
|
$iframe = true;
|
||||||
@@ -692,7 +692,11 @@ function send_notification($to,$from,$title,$message,$url,$category){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ユーズするとき全部この関数
|
// ユーズするとき全部この関数
|
||||||
function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw){
|
function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw,$aibwm){
|
||||||
|
//AIBlockWaterMark--------------------------------------------
|
||||||
|
require('../settings_admin/plugin_settings/aiblockwatermark_settings.php');
|
||||||
|
//------------------------------------------------------
|
||||||
|
|
||||||
$rpUniqid = safetext($rpUniqid);
|
$rpUniqid = safetext($rpUniqid);
|
||||||
$ruUniqid = safetext($ruUniqid);
|
$ruUniqid = safetext($ruUniqid);
|
||||||
$userid = safetext($userid);
|
$userid = safetext($userid);
|
||||||
@@ -707,7 +711,8 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
|
|
||||||
$banurldomainfile = "../server/banurldomain.txt";
|
$banurldomainfile = "../server/banurldomain.txt";
|
||||||
$banurl_info = file_get_contents($banurldomainfile);
|
$banurl_info = file_get_contents($banurldomainfile);
|
||||||
$banurl = preg_split("/\r\n|\n|\r/", $banurl_info);
|
$banurl = array_filter(preg_split("/\r\n|\n|\r/", $banurl_info));
|
||||||
|
|
||||||
|
|
||||||
// データベースに接続
|
// データベースに接続
|
||||||
try {
|
try {
|
||||||
@@ -743,6 +748,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 禁止url確認
|
// 禁止url確認
|
||||||
|
if(!(empty($banurl))){
|
||||||
for($i = 0; $i < count($banurl); $i++) {
|
for($i = 0; $i < count($banurl); $i++) {
|
||||||
if(!($banurl[$i] == "")){
|
if(!($banurl[$i] == "")){
|
||||||
if (false !== strpos($ueuse, 'https://'.$banurl[$i])) {
|
if (false !== strpos($ueuse, 'https://'.$banurl[$i])) {
|
||||||
@@ -752,6 +758,8 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$old_datetime = date("Y-m-d H:i:00");
|
$old_datetime = date("Y-m-d H:i:00");
|
||||||
$now_datetime = date("Y-m-d H:i:00",strtotime("+1 minute"));
|
$now_datetime = date("Y-m-d H:i:00",strtotime("+1 minute"));
|
||||||
$rate_Query = $pdo->prepare("SELECT * FROM ueuse WHERE account = :userid AND TIME(datetime) BETWEEN :old_datetime AND :now_datetime");
|
$rate_Query = $pdo->prepare("SELECT * FROM ueuse WHERE account = :userid AND TIME(datetime) BETWEEN :old_datetime AND :now_datetime");
|
||||||
@@ -963,6 +971,22 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($aibwm === true && !empty(AIBWM_CHK && AIBWM_CHK == "true")){
|
||||||
|
require('../plugin/AIBlockWaterMark/aiblockwatermark.php');
|
||||||
|
if(!($save_photo1 == "none")){
|
||||||
|
AIBlockWaterMark($save_photo1, $userid);
|
||||||
|
}
|
||||||
|
if(!($save_photo2 == "none")){
|
||||||
|
AIBlockWaterMark($save_photo2, $userid);
|
||||||
|
}
|
||||||
|
if(!($save_photo3 == "none")){
|
||||||
|
AIBlockWaterMark($save_photo3, $userid);
|
||||||
|
}
|
||||||
|
if(!($save_photo4 == "none")){
|
||||||
|
AIBlockWaterMark($save_photo4, $userid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(empty($error_message)) {
|
if(empty($error_message)) {
|
||||||
// 書き込み日時を取得
|
// 書き込み日時を取得
|
||||||
$datetime = date("Y-m-d H:i:s");
|
$datetime = date("Y-m-d H:i:s");
|
||||||
@@ -1346,4 +1370,44 @@ function uwuzu_password_verify($password, $hash){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ユーザーのOther_Settings読み取り関数
|
||||||
|
function val_OtherSettings($dataname, $jsontext){
|
||||||
|
$other_settings = json_decode($jsontext, true);
|
||||||
|
if(!(empty($other_settings[$dataname]))) {
|
||||||
|
if(is_bool($other_settings[$dataname]) === true){
|
||||||
|
if($other_settings[$dataname] == true){
|
||||||
|
$ret = true;
|
||||||
|
}else{
|
||||||
|
$ret = false;
|
||||||
|
}
|
||||||
|
}elseif(is_int($other_settings[$dataname]) === true){
|
||||||
|
$ret = (int)$other_settings[$dataname];
|
||||||
|
}elseif(is_string($other_settings[$dataname])){
|
||||||
|
$ret = $other_settings[$dataname];
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$ret = false;
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
//ユーザーのOther_Settings追加関数
|
||||||
|
function val_AddOtherSettings($dataname, $data, $jsontext){
|
||||||
|
$other_settings = json_decode($jsontext, true);
|
||||||
|
if(isset($dataname) && isset($data) && isset($jsontext)) {
|
||||||
|
if(is_bool($data) === true){
|
||||||
|
$new_data = [$dataname=>$data];
|
||||||
|
$ret = json_encode(array_merge($other_settings,$new_data));
|
||||||
|
}elseif(is_int($data) === true){
|
||||||
|
$new_data = [$dataname=>(int)$data];
|
||||||
|
$ret = json_encode(array_merge($other_settings,$new_data));
|
||||||
|
}elseif(is_string($data)){
|
||||||
|
$new_data = [$dataname=>$data];
|
||||||
|
$ret = json_encode(array_merge($other_settings,$new_data));
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$ret = false;
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
+3
-1
@@ -43,12 +43,14 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['reusetext'])) &&
|
|||||||
$video1 = "";
|
$video1 = "";
|
||||||
|
|
||||||
$rpUniqid = "";
|
$rpUniqid = "";
|
||||||
|
|
||||||
|
$AIBWM = false;
|
||||||
if(!(empty($result["ueuse"]))){
|
if(!(empty($result["ueuse"]))){
|
||||||
$ruUniqid = $postUniqid;
|
$ruUniqid = $postUniqid;
|
||||||
}else{
|
}else{
|
||||||
$ruUniqid = $result["ruuniqid"];
|
$ruUniqid = $result["ruuniqid"];
|
||||||
}
|
}
|
||||||
$ueuse_result = send_ueuse($userid,$rpUniqid,$ruUniqid,$reusetext,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw_chk);
|
$ueuse_result = send_ueuse($userid,$rpUniqid,$ruUniqid,$reusetext,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw_chk,$AIBWM);
|
||||||
|
|
||||||
if($ueuse_result == null){
|
if($ueuse_result == null){
|
||||||
echo json_encode(['success' => true]);
|
echo json_encode(['success' => true]);
|
||||||
|
|||||||
+12
-2
@@ -187,7 +187,7 @@ $notificationcount = $notiData['notification_count'];
|
|||||||
|
|
||||||
//-----------------URLから取得----------------
|
//-----------------URLから取得----------------
|
||||||
if(isset($_GET['text'])) {
|
if(isset($_GET['text'])) {
|
||||||
$ueuse = safetext($_GET['text']);
|
$ueuse = safetext(urldecode($_GET['text']));
|
||||||
}elseif(isset($_COOKIE['ueuse'])) {
|
}elseif(isset($_COOKIE['ueuse'])) {
|
||||||
$ueuse = safetext($_COOKIE['ueuse']);
|
$ueuse = safetext($_COOKIE['ueuse']);
|
||||||
}
|
}
|
||||||
@@ -195,6 +195,16 @@ if(isset($_GET['text'])) {
|
|||||||
//-------------------------------------------
|
//-------------------------------------------
|
||||||
|
|
||||||
if( !empty($_POST['btn_submit']) ) {
|
if( !empty($_POST['btn_submit']) ) {
|
||||||
|
$settingsJsonQuery = $pdo->prepare("SELECT userid, other_settings FROM account WHERE userid = :userid");
|
||||||
|
$settingsJsonQuery->bindValue(':userid', $userid);
|
||||||
|
$settingsJsonQuery->execute();
|
||||||
|
$settingsJson = $settingsJsonQuery->fetch();
|
||||||
|
if(!(empty($settingsJson["other_settings"]))){
|
||||||
|
$isAIBWM = val_OtherSettings("isAIBlockWaterMark", $settingsJson["other_settings"]);
|
||||||
|
}else{
|
||||||
|
$isAIBWM = false;
|
||||||
|
}
|
||||||
|
|
||||||
$ueuse = safetext($_POST['ueuse']);
|
$ueuse = safetext($_POST['ueuse']);
|
||||||
|
|
||||||
if(isset($_POST['nsfw_chk'])){
|
if(isset($_POST['nsfw_chk'])){
|
||||||
@@ -211,7 +221,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
|
|
||||||
$rpUniqid = "";
|
$rpUniqid = "";
|
||||||
$ruUniqid = "";
|
$ruUniqid = "";
|
||||||
$ueuse_result = send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw_chk);
|
$ueuse_result = send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw_chk,$isAIBWM);
|
||||||
|
|
||||||
if($ueuse_result == null){
|
if($ueuse_result == null){
|
||||||
//一時保存していたユーズ内容の削除
|
//一時保存していたユーズ内容の削除
|
||||||
|
|||||||
@@ -94,27 +94,6 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
### WebPush
|
|
||||||
Copyright (c) 2015 Louis Lagrange
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
## 更新情報
|
## 更新情報
|
||||||
編集者 : daichimarukana
|
編集者 : daichimarukana
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uwuzu
|
uwuzu
|
||||||
1.4.6
|
1.4.7
|
||||||
2024/11/06
|
2024/11/14
|
||||||
daichimarukana,putonfps
|
daichimarukana,putonfps
|
||||||
@@ -1,6 +1,28 @@
|
|||||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||||
|
|
||||||
|
## Version 1.4.7 (Funium)
|
||||||
|
2024/11/14
|
||||||
|
fix: 未使用のライブラリのライセンス情報が表示されてしまう問題を修正しました。
|
||||||
|
fix: 一部のYouTubeリンクで埋め込みがされない問題を修正しました。
|
||||||
|
fix: ドメインブロック機能の設定が空白の際にすべてのドメインがブロックされてしまう問題を修正しました!
|
||||||
|
chg: ActivityPubの仕様に少しでも近づけるようちょこっといじりました
|
||||||
|
chg: 一部UIを変更しました!!!
|
||||||
|
new: 各ユーザーごとにAI学習を拒否する設定を行えるようにしました!
|
||||||
|
これはHTML内にnoaiフラグを含むことによりAI学習を拒否する意思表示を行うものです。
|
||||||
|
なお、この機能を使用するにはデータベースの更新が必要となります。
|
||||||
|
データベースのaccountテーブルにother_settings(longtext)というカラムを追加してください。
|
||||||
|
phpMyAdminで追加する場合は、タイプをJSONに選択して追加してください。
|
||||||
|
new: AIによる学習(クロール)を拒否する管理者設定を追加しました!
|
||||||
|
この設定で次のAIクローラーによる学習が拒否されます。
|
||||||
|
OpenAI、Google、Anthropic、Common Crawl
|
||||||
|
new: 利用可能なプラグインを増やしました!
|
||||||
|
現在利用可能なプラグインは以下のものです。
|
||||||
|
- AIBlockWaterMark
|
||||||
|
- PHPMailer
|
||||||
|
AIBlockWaterMarkの利用にもデータベースのaccountテーブルにother_settings(longtext)というカラムを追加する必要があります。
|
||||||
|
del: OpenAI社によるGPTBotのクロールを拒否する設定項目を削除しました。
|
||||||
|
uwuzu_database.sqlは更新済みです。
|
||||||
|
|
||||||
## Version 1.4.6 (Funium)
|
## Version 1.4.6 (Funium)
|
||||||
リリース日:2024/11/06
|
リリース日:2024/11/06
|
||||||
|
|||||||
+52
-1
@@ -190,6 +190,7 @@ $mail_settings = safetext($res["mail_settings"]);
|
|||||||
//phpmailer--------------------------------------------
|
//phpmailer--------------------------------------------
|
||||||
require('../settings_admin/plugin_settings/phpmailer_settings.php');
|
require('../settings_admin/plugin_settings/phpmailer_settings.php');
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
require('../settings_admin/plugin_settings/aiblockwatermark_settings.php');
|
||||||
if( !empty($pdo) ) {
|
if( !empty($pdo) ) {
|
||||||
|
|
||||||
// データベース接続の設定
|
// データベース接続の設定
|
||||||
@@ -200,6 +201,9 @@ if( !empty($pdo) ) {
|
|||||||
|
|
||||||
$role = $userData["role"];
|
$role = $userData["role"];
|
||||||
|
|
||||||
|
$isAIBlock = val_OtherSettings("isAIBlock", $userData["other_settings"]);
|
||||||
|
$isAIBWM = val_OtherSettings("isAIBlockWaterMark", $userData["other_settings"]);
|
||||||
|
|
||||||
if(!(empty($userData["encryption_ivkey"]))){
|
if(!(empty($userData["encryption_ivkey"]))){
|
||||||
$view_mailadds = DecryptionUseEncrKey($userData["mailadds"], GenUserEnckey($userData["datetime"]), $userData["encryption_ivkey"]);
|
$view_mailadds = DecryptionUseEncrKey($userData["mailadds"], GenUserEnckey($userData["datetime"]), $userData["encryption_ivkey"]);
|
||||||
}else{
|
}else{
|
||||||
@@ -231,6 +235,22 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
|
|
||||||
$mailadds = safetext($_POST['mailadds']);
|
$mailadds = safetext($_POST['mailadds']);
|
||||||
|
|
||||||
|
$new_isAIBlock = safetext($_POST['isAIBlock']);
|
||||||
|
if($new_isAIBlock === "true"){
|
||||||
|
$save_isAIBlock = true;
|
||||||
|
}else{
|
||||||
|
$save_isAIBlock = false;
|
||||||
|
}
|
||||||
|
$other_settings_json = val_AddOtherSettings("isAIBlock", $save_isAIBlock, $userData["other_settings"]);
|
||||||
|
|
||||||
|
$new_isAIBMW = safetext($_POST['isAIBMW']);
|
||||||
|
if($new_isAIBMW === "true"){
|
||||||
|
$save_isAIBMW = true;
|
||||||
|
}else{
|
||||||
|
$save_isAIBMW = false;
|
||||||
|
}
|
||||||
|
$other_settings_json = val_AddOtherSettings("isAIBlockWaterMark", $save_isAIBMW, $other_settings_json);
|
||||||
|
|
||||||
if( !empty($_POST['mail_important']) ) {
|
if( !empty($_POST['mail_important']) ) {
|
||||||
$mail_important = safetext($_POST['mail_important']);
|
$mail_important = safetext($_POST['mail_important']);
|
||||||
}else{
|
}else{
|
||||||
@@ -306,7 +326,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// SQL作成
|
// SQL作成
|
||||||
$stmt = $pdo->prepare("UPDATE account SET username = :username, mailadds = :mailadds, profile = :profile, sacinfo = :saveimbot, mail_settings = :mail_settings WHERE userid = :userid;");
|
$stmt = $pdo->prepare("UPDATE account SET username = :username, mailadds = :mailadds, profile = :profile, sacinfo = :saveimbot, mail_settings = :mail_settings, other_settings = :other_settings WHERE userid = :userid;");
|
||||||
|
|
||||||
// 他の値をセット
|
// 他の値をセット
|
||||||
$stmt->bindParam(':username', $username, PDO::PARAM_STR);
|
$stmt->bindParam(':username', $username, PDO::PARAM_STR);
|
||||||
@@ -314,6 +334,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$stmt->bindParam(':profile', $profile, PDO::PARAM_STR);
|
$stmt->bindParam(':profile', $profile, PDO::PARAM_STR);
|
||||||
$stmt->bindParam(':saveimbot', $saveim_bot, PDO::PARAM_STR);
|
$stmt->bindParam(':saveimbot', $saveim_bot, PDO::PARAM_STR);
|
||||||
$stmt->bindParam(':mail_settings', $savemail_important, PDO::PARAM_STR);
|
$stmt->bindParam(':mail_settings', $savemail_important, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':other_settings', $other_settings_json, PDO::PARAM_STR);
|
||||||
|
|
||||||
// 条件を指定
|
// 条件を指定
|
||||||
// 以下の部分を適切な条件に置き換えてください
|
// 以下の部分を適切な条件に置き換えてください
|
||||||
@@ -846,6 +867,36 @@ $pdo = null;
|
|||||||
</div>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
|
<p>AIによる学習を拒否する</p>
|
||||||
|
<div class="p2">あなたのプロフィールにAIが訪れた際に、ユーズや画像などのコンテンツを学習しないように要求します。<br>
|
||||||
|
これはHTML内にnoaiフラグを含むことで実装されているため、必ずしもすべてのAIがこれに従うとは限りません。<br>
|
||||||
|
なお、この機能はまだ確実な動作が保証されないためベータ版です。</div>
|
||||||
|
<div class="switch_button">
|
||||||
|
<?php if($isAIBlock == true){?>
|
||||||
|
<input id="isAIBlock" class="switch_input" type='checkbox' name="isAIBlock" value="true" checked/>
|
||||||
|
<label for="isAIBlock" class="switch_label"></label>
|
||||||
|
<?php }else{?>
|
||||||
|
<input id="isAIBlock" class="switch_input" type='checkbox' name="isAIBlock" value="true" />
|
||||||
|
<label for="isAIBlock" class="switch_label"></label>
|
||||||
|
<?php }?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if(!empty(AIBWM_CHK && AIBWM_CHK == "true")){?>
|
||||||
|
<p>AI学習防止透かしを自動挿入する</p>
|
||||||
|
<div class="p2">画像を添付してユーズした際に自動的に画像の右下に「AI学習禁止」と書かれた透かしを挿入する機能です。<br>
|
||||||
|
この機能はまだ確実な動作が確認されていないためベータ版です。<br>
|
||||||
|
また、gif、tiffやsvgなどの一部画像形式では挿入されません。</div>
|
||||||
|
<div class="switch_button">
|
||||||
|
<?php if($isAIBWM == true){?>
|
||||||
|
<input id="isAIBMW" class="switch_input" type='checkbox' name="isAIBMW" value="true" checked/>
|
||||||
|
<label for="isAIBMW" class="switch_label"></label>
|
||||||
|
<?php }else{?>
|
||||||
|
<input id="isAIBMW" class="switch_input" type='checkbox' name="isAIBMW" value="true" />
|
||||||
|
<label for="isAIBMW" class="switch_label"></label>
|
||||||
|
<?php }?>
|
||||||
|
</div>
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
<input type="submit" class = "irobutton" name="btn_submit" value="情報更新">
|
<input type="submit" class = "irobutton" name="btn_submit" value="情報更新">
|
||||||
|
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ require('plugin_settings/phpmailer_settings.php');
|
|||||||
require('plugin_settings/phpmailer_sender.php');
|
require('plugin_settings/phpmailer_sender.php');
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
|
||||||
|
//AIBlockWaterMark--------------------------------------------
|
||||||
|
require('plugin_settings/aiblockwatermark_settings.php');
|
||||||
|
//------------------------------------------------------
|
||||||
|
|
||||||
session_name('uwuzu_s_id');
|
session_name('uwuzu_s_id');
|
||||||
session_set_cookie_params([
|
session_set_cookie_params([
|
||||||
'lifetime' => 0,
|
'lifetime' => 0,
|
||||||
@@ -229,6 +233,22 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
fputs($file, $data);
|
fputs($file, $data);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
$N_AIBWM_ONOFF = safetext($_POST['aibwmchk_onoff']);
|
||||||
|
|
||||||
|
$New_AIBWM_Settings = "
|
||||||
|
<?php // AIBlockWaterMarkの設定
|
||||||
|
define( 'AIBWM_CHK', '".$N_AIBWM_ONOFF."');// trueならAIBlockWaterMarkが有効
|
||||||
|
?>
|
||||||
|
";
|
||||||
|
|
||||||
|
//設定上書き
|
||||||
|
$file = fopen('plugin_settings/aiblockwatermark_settings.php', 'w');
|
||||||
|
$data = $New_AIBWM_Settings;
|
||||||
|
fputs($file, $data);
|
||||||
|
fclose($file);
|
||||||
|
|
||||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||||
header("Location:".$url."");
|
header("Location:".$url."");
|
||||||
exit;
|
exit;
|
||||||
@@ -355,8 +375,21 @@ require('../logout/logout.php');
|
|||||||
<input type="radio" name="ssl_tls_none" value="NONE" id="NONE" class="radiobtn_input" <?php if(!empty(MAIL_SSL_ && MAIL_SSL_ == "NONE")){echo "checked";}?>>
|
<input type="radio" name="ssl_tls_none" value="NONE" id="NONE" class="radiobtn_input" <?php if(!empty(MAIL_SSL_ && MAIL_SSL_ == "NONE")){echo "checked";}?>>
|
||||||
<label for="NONE" class="radiobtn_label">なし</label>
|
<label for="NONE" class="radiobtn_label">なし</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<p>AIBlockWaterMarkプラグイン</p>
|
||||||
|
<div class="p2">AI学習対策に、ユーザー単位で画像に透かしを自動挿入できるプラグインです。<b>pluginフォルダに解凍済みのAIBlockWaterMarkのファイル一式が入っていることが必須要件になります。</b><br>plugin/AIBlockWaterMark/README.MDなど一式</div>
|
||||||
|
<p>AIBlockWaterMarkのオンオフ</p>
|
||||||
|
<div class="switch_button">
|
||||||
|
<?php if(!empty(AIBWM_CHK && AIBWM_CHK == "true")){?>
|
||||||
|
<input id="aibwmchk_onoff" class="switch_input" type='checkbox' name="aibwmchk_onoff" value="true" checked/>
|
||||||
|
<label for="aibwmchk_onoff" class="switch_label"></label>
|
||||||
|
<?php }else{?>
|
||||||
|
<input id="aibwmchk_onoff" class="switch_input" type='checkbox' name="aibwmchk_onoff" value="true" />
|
||||||
|
<label for="aibwmchk_onoff" class="switch_label"></label>
|
||||||
|
<?php }?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" class = "irobutton" name="btn_submit" value="保存&更新">
|
<input type="submit" class = "irobutton" name="btn_submit" value="保存&更新">
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
<?php // AIBlockWaterMarkの設定
|
||||||
|
define( 'AIBWM_CHK', '');// trueならAIBlockWaterMarkが有効
|
||||||
|
?>
|
||||||
|
|
||||||
@@ -284,7 +284,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
if($postrobots === "true"){
|
if($postrobots === "true"){
|
||||||
//GPTBotによるクロールを拒否
|
//GPTBotによるクロールを拒否
|
||||||
$file = fopen($robots, 'w');
|
$file = fopen($robots, 'w');
|
||||||
$data = "User-agent: GPTBot\nDisallow: /";
|
$data = "User-agent: GPTBot\nDisallow: /\n\nUser-agent: ChatGPT-User\nDisallow: /\n\nUser-agent: Google-Extended\nDisallow: /\n\nUser-agent: ClaudeBot\nDisallow: /\n\nUser-agent: CCBot\nDisallow: /";
|
||||||
fputs($file, $data);
|
fputs($file, $data);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
}else{
|
}else{
|
||||||
@@ -496,9 +496,11 @@ require('../logout/logout.php');
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p>OpenAIによるクロールを拒否するかどうか<br>※robots.txtによりOpenAIからのクロールを拒否するものであり、他のAI企業によるクロールを完全拒否するものではございません。</p>
|
<p>AI学習を拒否するかどうか</p>
|
||||||
|
<div class="p2">robots.txtを使用し、OpenAI、Google、Anthropic、Common Crawlのクローラーを拒否します。<br>
|
||||||
|
必ずしもすべてのAI学習用クローラーをブロックできるわけではありません。</div>
|
||||||
<div class="switch_button">
|
<div class="switch_button">
|
||||||
<?php if(file_get_contents($robots) === "User-agent: GPTBot\nDisallow: /"){?>
|
<?php if(file_get_contents($robots) === "User-agent: GPTBot\nDisallow: /\n\nUser-agent: ChatGPT-User\nDisallow: /\n\nUser-agent: Google-Extended\nDisallow: /\n\nUser-agent: ClaudeBot\nDisallow: /\n\nUser-agent: CCBot\nDisallow: /"){?>
|
||||||
<input id="robots" class="switch_input" type='checkbox' name="robots" value="true" checked/>
|
<input id="robots" class="switch_input" type='checkbox' name="robots" value="true" checked/>
|
||||||
<label for="robots" class="switch_label"></label>
|
<label for="robots" class="switch_label"></label>
|
||||||
<?php }else{?>
|
<?php }else{?>
|
||||||
|
|||||||
+12
-2
@@ -213,7 +213,7 @@ if (!(empty($pdo))) {
|
|||||||
|
|
||||||
//-----------------URLから取得----------------
|
//-----------------URLから取得----------------
|
||||||
if(isset($_GET['text'])) {
|
if(isset($_GET['text'])) {
|
||||||
$ueuse = safetext($_GET['text']);
|
$ueuse = safetext(urldecode($_GET['text']));
|
||||||
}elseif(isset($_COOKIE['ueuse'])) {
|
}elseif(isset($_COOKIE['ueuse'])) {
|
||||||
$ueuse = safetext($_COOKIE['ueuse']);
|
$ueuse = safetext($_COOKIE['ueuse']);
|
||||||
}
|
}
|
||||||
@@ -221,6 +221,16 @@ if(isset($_GET['text'])) {
|
|||||||
//-------------------------------------------
|
//-------------------------------------------
|
||||||
|
|
||||||
if( !empty($_POST['btn_submit']) ) {
|
if( !empty($_POST['btn_submit']) ) {
|
||||||
|
$settingsJsonQuery = $pdo->prepare("SELECT userid, other_settings FROM account WHERE userid = :userid");
|
||||||
|
$settingsJsonQuery->bindValue(':userid', $userid);
|
||||||
|
$settingsJsonQuery->execute();
|
||||||
|
$settingsJson = $settingsJsonQuery->fetch();
|
||||||
|
if(!(empty($settingsJson["other_settings"]))){
|
||||||
|
$isAIBWM = val_OtherSettings("isAIBlockWaterMark", $settingsJson["other_settings"]);
|
||||||
|
}else{
|
||||||
|
$isAIBWM = false;
|
||||||
|
}
|
||||||
|
|
||||||
$ueuse = safetext($_POST['ueuse']);
|
$ueuse = safetext($_POST['ueuse']);
|
||||||
|
|
||||||
if(isset($_POST['nsfw_chk'])){
|
if(isset($_POST['nsfw_chk'])){
|
||||||
@@ -237,7 +247,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
|
|
||||||
$rpUniqid = $ueuseid;
|
$rpUniqid = $ueuseid;
|
||||||
$ruUniqid = "";
|
$ruUniqid = "";
|
||||||
$ueuse_result = send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw_chk);
|
$ueuse_result = send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$photo4,$video1,$nsfw_chk,$isAIBWM);
|
||||||
|
|
||||||
if($ueuse_result == null){
|
if($ueuse_result == null){
|
||||||
//一時保存していたユーズ内容の削除
|
//一時保存していたユーズ内容の削除
|
||||||
|
|||||||
+14
-23
@@ -1,35 +1,26 @@
|
|||||||
{
|
{
|
||||||
"software": "uwuzu",
|
"software": "uwuzu",
|
||||||
"version": "1.4.6",
|
"version": "1.4.7",
|
||||||
"release_date": "2024-11-06",
|
"release_date": "2024-11-14",
|
||||||
"release_notes": "このアップデートではパスワードが完全に入力されていなくても認証されてしまう問題を含め、他数件の問題が修正されています!!!\n早急なアップデートを強く推奨します!!!!!",
|
"release_notes": "このアップデートではAI学習対策を中心に様々な新機能の追加がされています!\nまた、いくつかのバグ修正が含まれています!\nアップデートを推奨します!!",
|
||||||
"notices": "アップデートの前に、データのバックアップを行うことをおすすめします!",
|
"notices": "アップデートの前に、データベースの構造の更新をお忘れなく!\n合わせてデータのバックアップを行うことをおすすめします!",
|
||||||
"files": {
|
"files": {
|
||||||
"overwrite": [
|
"overwrite": [
|
||||||
"/admin/addadmin.php",
|
"/abi/addabi.php",
|
||||||
|
"/actor/index.php",
|
||||||
"/css/home.css",
|
"/css/home.css",
|
||||||
"/function/function.php",
|
"/function/function.php",
|
||||||
|
"/function/reuse.php",
|
||||||
"/home/index.php",
|
"/home/index.php",
|
||||||
"/js/console_notice.js",
|
|
||||||
"/migration/index.php",
|
|
||||||
"/nextpage/bookmark.php",
|
|
||||||
"/nextpage/ftlpage.php",
|
|
||||||
"/nextpage/nextpage.php",
|
|
||||||
"/nextpage/notification.php",
|
|
||||||
"/nextpage/ueusepage.php",
|
|
||||||
"/nextpage/userlikepage.php",
|
|
||||||
"/nextpage/usermediapage.php",
|
|
||||||
"/nextpage/userpage.php",
|
|
||||||
"/others/index.php",
|
|
||||||
"/passrecovery/startrecovery.php",
|
|
||||||
"/settings/addauthcode.php",
|
|
||||||
"/settings/index.php",
|
"/settings/index.php",
|
||||||
"/settings_admin/userinfo.php",
|
"/settings_admin/plugin_settings/aiblockwatermark_settings.php",
|
||||||
|
"/settings_admin/plugin_admin.php",
|
||||||
|
"/settings_admin/serveradmin.php",
|
||||||
|
"/ueuse/index.php",
|
||||||
|
"/user/followers/index.php",
|
||||||
|
"/user/following/index.php",
|
||||||
"/user/outbox/index.php",
|
"/user/outbox/index.php",
|
||||||
"/addauthcode.php",
|
"/user/index.php",
|
||||||
"/authlogin.php",
|
|
||||||
"/login.php",
|
|
||||||
"/new.php",
|
|
||||||
"/server/uwuzuabout.txt",
|
"/server/uwuzuabout.txt",
|
||||||
"/server/uwuzuinfo.txt",
|
"/server/uwuzuinfo.txt",
|
||||||
"/server/uwuzurelease.txt"
|
"/server/uwuzurelease.txt"
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
require("../../function/function.php");
|
||||||
|
|
||||||
|
$serversettings_file = "../../server/serversettings.ini";
|
||||||
|
$serversettings = parse_ini_file($serversettings_file, true);
|
||||||
|
if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
||||||
|
header("Content-Type: application/activity+json");
|
||||||
|
header("charset=utf-8");
|
||||||
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
|
$domain = $_SERVER['HTTP_HOST'];
|
||||||
|
|
||||||
|
$user = safetext($_GET['actor']);
|
||||||
|
|
||||||
|
$userid = str_replace('@','', str_replace('@'.$domain.'', '', $user));
|
||||||
|
|
||||||
|
$item = array(
|
||||||
|
"@context" => "https://www.w3.org/ns/activitystreams",
|
||||||
|
"id" => "https://".$domain."/user/followers/?actor=".$userid,
|
||||||
|
"type" => "OrderedCollection",
|
||||||
|
"totalItems" => 0,
|
||||||
|
"orderedItems" => [],
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($item, JSON_UNESCAPED_UNICODE);
|
||||||
|
}else{
|
||||||
|
header("HTTP/1.1 410 Gone");
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
require("../../function/function.php");
|
||||||
|
|
||||||
|
$serversettings_file = "../../server/serversettings.ini";
|
||||||
|
$serversettings = parse_ini_file($serversettings_file, true);
|
||||||
|
if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
||||||
|
header("Content-Type: application/activity+json");
|
||||||
|
header("charset=utf-8");
|
||||||
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
|
$domain = $_SERVER['HTTP_HOST'];
|
||||||
|
|
||||||
|
$user = safetext($_GET['actor']);
|
||||||
|
|
||||||
|
$userid = str_replace('@','', str_replace('@'.$domain.'', '', $user));
|
||||||
|
|
||||||
|
$item = array(
|
||||||
|
"@context" => "https://www.w3.org/ns/activitystreams",
|
||||||
|
"id" => "https://".$domain."/user/following/?actor=".$userid,
|
||||||
|
"type" => "OrderedCollection",
|
||||||
|
"totalItems" => 0,
|
||||||
|
"orderedItems" => [],
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($item, JSON_UNESCAPED_UNICODE);
|
||||||
|
}else{
|
||||||
|
header("HTTP/1.1 410 Gone");
|
||||||
|
}
|
||||||
|
?>
|
||||||
+9
-12
@@ -184,19 +184,11 @@ function customStripTags($html, $allowedTags)
|
|||||||
$allowedTags = array('h1', 'h2', 'h3', 'center', 'font');
|
$allowedTags = array('h1', 'h2', 'h3', 'center', 'font');
|
||||||
|
|
||||||
if (!empty($pdo)) {
|
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,
|
|
||||||
));
|
|
||||||
|
|
||||||
$uwuzuid2 = safetext(str_replace('@', '', $_GET['uwuzuid']));
|
$uwuzuid2 = safetext(str_replace('@', '', $_GET['uwuzuid']));
|
||||||
|
|
||||||
$uwuzuid = safetext(str_replace('@' . $domain, '', $uwuzuid2));
|
$uwuzuid = safetext(str_replace('@' . $domain, '', $uwuzuid2));
|
||||||
|
|
||||||
$userQuery = $dbh->prepare("SELECT username, userid, profile, role, follower, blocklist FROM account WHERE userid = :userid");
|
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, follower, blocklist FROM account WHERE userid = :userid");
|
||||||
$userQuery->bindValue(':userid', $uwuzuid);
|
$userQuery->bindValue(':userid', $uwuzuid);
|
||||||
$userQuery->execute();
|
$userQuery->execute();
|
||||||
$userData = $userQuery->fetch();
|
$userData = $userQuery->fetch();
|
||||||
@@ -207,7 +199,7 @@ if (!empty($pdo)) {
|
|||||||
|
|
||||||
$roles = explode(',', $userData["role"]); // カンマで区切られたロールを配列に分割
|
$roles = explode(',', $userData["role"]); // カンマで区切られたロールを配列に分割
|
||||||
|
|
||||||
$rerole = $dbh->prepare("SELECT follow, follower,blocklist, username, userid, password, mailadds, profile, iconname, headname, role, datetime FROM account WHERE userid = :userid");
|
$rerole = $pdo->prepare("SELECT follow, follower,blocklist, username, userid, password, mailadds, profile, iconname, headname, role, datetime, other_settings FROM account WHERE userid = :userid");
|
||||||
|
|
||||||
$rerole->bindValue(':userid', $uwuzuid);
|
$rerole->bindValue(':userid', $uwuzuid);
|
||||||
// SQL実行
|
// SQL実行
|
||||||
@@ -218,12 +210,13 @@ if (!empty($pdo)) {
|
|||||||
$roleDataArray = array();
|
$roleDataArray = array();
|
||||||
|
|
||||||
foreach ($roles as $roleId) {
|
foreach ($roles as $roleId) {
|
||||||
$rerole = $dbh->prepare("SELECT rolename, roleauth, rolecolor, roleeffect FROM role WHERE roleidname = :role");
|
$rerole = $pdo->prepare("SELECT rolename, roleauth, rolecolor, roleeffect FROM role WHERE roleidname = :role");
|
||||||
$rerole->bindValue(':role', $roleId);
|
$rerole->bindValue(':role', $roleId);
|
||||||
$rerole->execute();
|
$rerole->execute();
|
||||||
$roleDataArray[$roleId] = $rerole->fetch();
|
$roleDataArray[$roleId] = $rerole->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$isAIBlock = val_OtherSettings("isAIBlock", $userdata["other_settings"]);
|
||||||
|
|
||||||
//-------フォロー数---------
|
//-------フォロー数---------
|
||||||
$follow = $userdata['follow']; // コンマで区切られたユーザーIDを含む変数
|
$follow = $userdata['follow']; // コンマで区切られたユーザーIDを含む変数
|
||||||
@@ -250,7 +243,7 @@ if (!empty($pdo)) {
|
|||||||
$profileText = safetext($userData['profile']);
|
$profileText = safetext($userData['profile']);
|
||||||
|
|
||||||
|
|
||||||
$allueuse = $dbh->prepare("SELECT account FROM ueuse WHERE account = :userid");
|
$allueuse = $pdo->prepare("SELECT account FROM ueuse WHERE account = :userid");
|
||||||
$allueuse->bindValue(':userid', $uwuzuid);
|
$allueuse->bindValue(':userid', $uwuzuid);
|
||||||
$allueuse->execute();
|
$allueuse->execute();
|
||||||
$ueuse_cnt = $allueuse->rowCount();
|
$ueuse_cnt = $allueuse->rowCount();
|
||||||
@@ -508,6 +501,10 @@ $pdo = null;
|
|||||||
<script src="../js/nsfw_event.js"></script>
|
<script src="../js/nsfw_event.js"></script>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
<?php if($isAIBlock === true){?>
|
||||||
|
<meta name="robots" content="noimageai">
|
||||||
|
<meta name="robots" content="noai">
|
||||||
|
<?php }?>
|
||||||
<link rel="stylesheet" href="../css/home.css">
|
<link rel="stylesheet" href="../css/home.css">
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
|||||||
foreach ($messages as $value) {
|
foreach ($messages as $value) {
|
||||||
$activity = array(
|
$activity = array(
|
||||||
"type" => "Create",
|
"type" => "Create",
|
||||||
"@context" => "https://www.w3.org/ns/activitystreams",
|
|
||||||
"id" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"],
|
"id" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"],
|
||||||
"url" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"],
|
"url" => "https://" . $domain . "/ueuse/activity/?ueuse=" . $value["uniqid"],
|
||||||
"published" => date(DATE_ATOM, strtotime($value["datetime"])),
|
"published" => date(DATE_ATOM, strtotime($value["datetime"])),
|
||||||
@@ -86,7 +85,6 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
|||||||
"type" => "OrderedCollection",
|
"type" => "OrderedCollection",
|
||||||
"@context" => "https://www.w3.org/ns/activitystreams",
|
"@context" => "https://www.w3.org/ns/activitystreams",
|
||||||
"id" => "https://" . $domain . "/user/outbox/?actor=@" . $userid . "&page=true",
|
"id" => "https://" . $domain . "/user/outbox/?actor=@" . $userid . "&page=true",
|
||||||
"partOf" => "https://" . $domain . "/user/outbox/?actor=@" . $userid,
|
|
||||||
"summary" => "outbox of " . $userid,
|
"summary" => "outbox of " . $userid,
|
||||||
"totalItems" => count($messages),
|
"totalItems" => count($messages),
|
||||||
"orderedItems" => $orderedItems,
|
"orderedItems" => $orderedItems,
|
||||||
|
|||||||
+3
-2
@@ -3,7 +3,7 @@
|
|||||||
-- https://www.phpmyadmin.net/
|
-- https://www.phpmyadmin.net/
|
||||||
--
|
--
|
||||||
-- ホスト: 127.0.0.1
|
-- ホスト: 127.0.0.1
|
||||||
-- 生成日時: 2024-08-19 10:03:35
|
-- 生成日時: 2024-11-14 11:59:48
|
||||||
-- サーバのバージョン: 10.4.32-MariaDB
|
-- サーバのバージョン: 10.4.32-MariaDB
|
||||||
-- PHP のバージョン: 8.2.12
|
-- PHP のバージョン: 8.2.12
|
||||||
|
|
||||||
@@ -50,7 +50,8 @@ CREATE TABLE `account` (
|
|||||||
`sacinfo` varchar(256) NOT NULL,
|
`sacinfo` varchar(256) NOT NULL,
|
||||||
`notification_settings` varchar(256) NOT NULL,
|
`notification_settings` varchar(256) NOT NULL,
|
||||||
`mail_settings` mediumtext NOT NULL,
|
`mail_settings` mediumtext NOT NULL,
|
||||||
`encryption_ivkey` varchar(256) NOT NULL
|
`encryption_ivkey` varchar(256) NOT NULL,
|
||||||
|
`other_settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`other_settings`))
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user