1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-05 03:24:41 +00:00

uwuzu v1.3.6 new_planet

This commit is contained in:
Daichimarukana
2024-04-24 00:17:27 +09:00
parent c59f9a3366
commit 9c39e54191
94 changed files with 7116 additions and 1464 deletions
+6 -6
View File
@@ -185,11 +185,11 @@ $notificationcount = $notiData['notification_count'];
if( !empty($_POST['ads_btn_submit']) ) {
$ads_url = htmlentities($_POST['ads_url']);
$ads_img_url = htmlentities($_POST['ads_img_url']);
$ads_start_date = htmlentities(date($_POST['ads_start_date']));
$ads_limit_date = htmlentities(date($_POST['ads_limit_date']));
$ads_memo = htmlentities($_POST['ads_memo']);
$ads_url = htmlentities($_POST['ads_url'], ENT_QUOTES, 'UTF-8', false);
$ads_img_url = htmlentities($_POST['ads_img_url'], ENT_QUOTES, 'UTF-8', false);
$ads_start_date = htmlentities(date($_POST['ads_start_date']), ENT_QUOTES, 'UTF-8', false);
$ads_limit_date = htmlentities(date($_POST['ads_limit_date']), ENT_QUOTES, 'UTF-8', false);
$ads_memo = htmlentities($_POST['ads_memo'], ENT_QUOTES, 'UTF-8', false);
if(empty($ads_url)){
$error_message[] = "URLが入力されていません。(INPUT_PLEASE)";
@@ -312,7 +312,7 @@ if (!empty($pdo)) {
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>広告 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>広告 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
+57 -50
View File
@@ -214,41 +214,47 @@ if( !empty($pdo) ) {
}
if( !empty($_POST['btn_submit']) ) {
$emojiname = $_POST['emojiname'];
$emojiinfo = $_POST['emojiinfo'];
$emojiname = htmlentities($_POST['emojiname'], ENT_QUOTES, 'UTF-8', false);
$emojiinfo = htmlentities($_POST['emojiinfo'], ENT_QUOTES, 'UTF-8', false);
if (!empty($_FILES['image']['name'])) {
// アップロードされたファイル情報
$uploadedFile = $_FILES['image'];
if(filesize($uploadedFile['tmp_name']) > 256000){
$error_message[] = "絵文字のファイルサイズは256KB以下に押さえてください。(EMOJI_OVER_256KB)";
}
if(check_mime($uploadedFile['tmp_name'])){
// アップロードされたファイルの拡張子を取得
$extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION);
// 新しいファイル名を生成(uniqid + 拡張子)
$newFilename = uniqid() . '.' . $extension;
// 保存先のパスを生成
$uploadedPath = 'emojiimage/' . $newFilename;
if(empty($error_message)){
// アップロードされたファイルの拡張子を取得
$extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION);
// 新しいファイル名を生成(uniqid + 拡張子)
$newFilename = uniqid() . '.' . $extension;
// 保存先のパスを生成
$uploadedPath = 'emojiimage/' . $newFilename;
// EXIF削除
delete_exif($extension2, $uploadedFile['tmp_name']);
// EXIF削除
delete_exif($extension, $uploadedFile['tmp_name']);
// ファイルを移動
$result = move_uploaded_file($uploadedFile['tmp_name'], '../'.$uploadedPath);
if ($result) {
$emoji_path = $uploadedPath; // 保存されたファイルのパスを使用
} else {
$errnum = $uploadedFile['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[] = 'アップロード失敗!(2)エラーコード:' .$errcode.'';
// ファイルを移動
$result = move_uploaded_file($uploadedFile['tmp_name'], '../'.$uploadedPath);
if ($result) {
$emoji_path = $uploadedPath; // 保存されたファイルのパスを使用
} else {
$errnum = $uploadedFile['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[] = 'アップロード失敗!(2)エラーコード:' .$errcode.'';
}
}
}else{
$error_message[] = "使用できない画像形式です。(FILE_UPLOAD_DEKINAKATTA)";
@@ -363,7 +369,7 @@ $pdo = null;
<script src="../js/jquery-min.js"></script>
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>絵文字登録 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>絵文字登録 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -375,13 +381,13 @@ $pdo = null;
<div class="admin_right">
<?php if( !empty($error_message) ): ?>
<ul class="errmsg">
<?php foreach( $error_message as $value ): ?>
<p>・ <?php echo $value; ?></p>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if( !empty($error_message) ): ?>
<ul class="errmsg">
<?php foreach( $error_message as $value ): ?>
<p>・ <?php echo $value; ?></p>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<form class="formarea" enctype="multipart/form-data" method="post">
@@ -391,7 +397,8 @@ $pdo = null;
<div class="p2">
注意 : uwuzuで表示されるカスタム絵文字の最大の大きさは縦64pxです。<br>
縦64px以上のカスタム絵文字を登録しても縮小されて表示されます。<br>
また、縦64px以上の画像をアップロードすると、uwuzuの動作が遅くなる恐れがあるため、絵文字の画像サイズは縦64pxを推奨します。</div>
最大ファイルサイズは256KBです。<br>
これはカスタム絵文字によってuwuzuが重たくならないようにするための仕様です。</div>
<div id="wrap">
@@ -403,12 +410,12 @@ $pdo = null;
<!--ユーザーネーム関係-->
<div>
<p>EmojiID</p>
<input id="username" onInput="checkForm(this)" placeholder="kusa" class="inbox" type="text" name="emojiname" value="<?php if( !empty($_SESSION['emojiname']) ){ echo htmlentities( $_SESSION['emojiname'], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="username" onInput="checkForm(this)" placeholder="kusa" class="inbox" type="text" name="emojiname" value="<?php if( !empty($_SESSION['emojiname']) ){ echo htmlentities( $_SESSION['emojiname'], ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<div>
<p>この絵文字について</p>
<input id="username" placeholder="くさデス" class="inbox" type="text" name="emojiinfo" value="<?php if( !empty($_SESSION['emojiinfo']) ){ echo htmlentities( $_SESSION['emojiinfo'], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="username" placeholder="くさデス" class="inbox" type="text" name="emojiinfo" value="<?php if( !empty($_SESSION['emojiinfo']) ){ echo htmlentities( $_SESSION['emojiinfo'], ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<div>
@@ -438,21 +445,21 @@ function checkForm(inputElement) {
window.addEventListener('DOMContentLoaded', function(){
// ファイルが選択されたら実行
document.getElementById("file_upload").addEventListener('change', function(e){
// ファイルが選択されたら実行
document.getElementById("file_upload").addEventListener('change', function(e){
var file_reader = new FileReader();
var file_reader = new FileReader();
// ファイルの読み込みを行ったら実行
file_reader.addEventListener('load', function(e) {
console.log(e.target.result);
const element = document.querySelector('#wrap');
const createElement = '<p>画像を選択しました。</p>';
element.insertAdjacentHTML('afterend', createElement);
});
// ファイルの読み込みを行ったら実行
file_reader.addEventListener('load', function(e) {
const element = document.querySelector('#wrap');
const createElement = '<p>画像を選択しました。</p>';
element.insertAdjacentHTML('afterend', createElement);
});
file_reader.readAsText(e.target.files[0]);
});
file_reader.readAsText(e.target.files[0]);
});
});
</script>
</html>
+3 -3
View File
@@ -2,9 +2,9 @@
require('../db.php');
if (htmlentities(isset($_POST['code'])) && htmlentities(isset($_POST['userid'])) && htmlentities(isset($_POST['account_id']))){
$postUserid = htmlentities($_POST['userid']);
$postCode= htmlentities($_POST['code']);
$loginid = htmlentities($_POST['account_id']);
$postUserid = htmlentities($_POST['userid'], ENT_QUOTES, 'UTF-8', false);
$postCode= htmlentities($_POST['code'], ENT_QUOTES, 'UTF-8', false);
$loginid = htmlentities($_POST['account_id'], ENT_QUOTES, 'UTF-8', false);
try {
$option = array(
+11 -7
View File
@@ -226,7 +226,7 @@ if (!empty($pdo)) {
}
if( !empty($_POST['code_btn_submit']) ) {
$make_code = $_POST['make_code'];
$make_code = htmlentities($_POST['make_code'], ENT_QUOTES, 'UTF-8', false);
$code_num = 0;
while ($code_num < (int)$make_code) {
$code_num++;
@@ -281,7 +281,7 @@ require('../logout/logout.php');
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>招待コード発行所 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>招待コード発行所 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -302,14 +302,16 @@ require('../logout/logout.php');
<div class="admin_right">
<form class="formarea" enctype="multipart/form-data" method="post">
<h1>招待コード発行所</h1>
<?php if(htmlentities($serversettings["serverinfo"]["server_invitation"], ENT_QUOTES, 'UTF-8') === "true"){?>
<?php if(htmlentities($serversettings["serverinfo"]["server_invitation"], ENT_QUOTES, 'UTF-8', false) === "true"){?>
<p>下の発行ボタンで新しくコードを発行できます!<br>なお、コードは一回限り有効です。</p>
<div>
<p>発行数</p>
<input id="make_code" placeholder="1" class="inbox" type="number" name="make_code" value="1" min="1" max="10000">
</div>
<input type="submit" class = "irobutton" name="code_btn_submit" value="発行!">
<?php foreach ($codes as $value) {?>
<?php
if(!(empty($codes))){
foreach ($codes as $value) {?>
<div class="server_code">
<details>
<summary>コード:<?php if( !empty($value["code"]) ){ echo htmlentities($value["code"]); }?><?php if( !empty($value["used"]) ){if($value["used"] === "true"){echo " ✅";}}?> </summary>
@@ -318,14 +320,16 @@ require('../logout/logout.php');
echo "未使用<br>発行日時:".$value["datetime"]."";
}elseif($value["used"] === "true"){
echo "使用済み<br>使用日時:".$value["datetime"]."";
}?></p>
}}?></p>
<div class="delbox">
<p>削除ボタンを押すとこのコードは使用できなくなります。</p>
<button type="button" id="code_delete" class="delbtn" del-code="<?php echo htmlentities($value["code"]);?>">削除</button>
</div>
</details>
</div>
<?php }?>
</div>
<?php }?>
<?php }else{?>
<p>招待コードは発行されていません。</p>
<?php }?>
<?php }else{?>
<p>サーバーは招待制にされていないため招待コードは利用できません。</p>
+20 -4
View File
@@ -6,6 +6,9 @@ $serversettings = parse_ini_file($serversettings_file, true);
$colorfile = "../css/color.css";
$color_info = file_get_contents($colorfile);
$fontfile = "../css/font.css";
$font_info = file_get_contents($fontfile);
$manifestfile = "../manifest/manifest.json";
$manifest_info = file_get_contents($manifestfile);
@@ -235,16 +238,23 @@ if (!empty($pdo)) {
if( !empty($_POST['btn_submit']) ) {
// 空白除去
//htmlentitiesで変換すると死ぬので注意
$colordata = $_POST['colordata'];
$fontdata = $_POST['fontdata'];
$manifestdata = $_POST['manifestdata'];
//鯖名
//色等変数
$file = fopen($colorfile, 'w');
$data = $colordata;
fputs($file, $data);
fclose($file);
//フォント呼び出し
$file = fopen($fontfile, 'w');
$data = $fontdata;
fputs($file, $data);
fclose($file);
//manifest
$file = fopen($manifestfile, 'w');
$data = $manifestdata;
@@ -268,7 +278,7 @@ require('../logout/logout.php');
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>サーバーカスタマイズ - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>サーバーカスタマイズ - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -291,11 +301,17 @@ require('../logout/logout.php');
<h1>サーバーカスタマイズ</h1>
<div>
<p>CSS</p>
<p>Color & Fontname CSS</p>
<div class="p2">ここで指定されている色が適用されます。<br>もし適用されなかった場合はキャッシュを削除し再読み込みしてください。<br>表示がおかしくなってしまった場合はカラーコードを再度確認してください。</div>
<textarea id="colordata" placeholder="CSS" class="inbox" type="text" name="colordata"><?php $sinfo = explode("\r", $color_info); foreach ($sinfo as $info) { echo $info; }?></textarea>
</div>
<div>
<p>FontRequire CSS</p>
<div class="p2">ここで指定されている色が適用されます。<br>もし適用されなかった場合はキャッシュを削除し再読み込みしてください。<br>表示がおかしくなってしまった場合はカラーコードを再度確認してください。</div>
<textarea id="fontdata" placeholder="FontRequireCSS" class="inbox" type="text" name="fontdata"><?php $sinfo = explode("\r", $font_info); foreach ($sinfo as $info) { echo $info; }?></textarea>
</div>
<div>
<p>PWA(manifest)</p>
<div class="p2">ここでPWAの設定を変更できます。<br>"short_name"、"name"が表示されるアプリ名、"theme_color"、"background_color"がテーマカラーとPWA起動時のスプラッシュ画面の背景色です。<br>いま記載したもの以外の設定は変更しないことをお勧めします。</div>
+3 -3
View File
@@ -8,7 +8,7 @@ $serverstopfile = "../server/serverstop.txt";
$htaccessfile = "../.htaccess";
if(!empty(file_get_contents($serverstopfile))){
$serverstop = htmlentities(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
$serverstop = htmlentities(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8', false);
}else{
$serverstop = "";
}
@@ -236,7 +236,7 @@ if (!empty($pdo)) {
if( !empty($_POST['btn_submit']) ) {
// 空白除去
$serverstop = $_POST['serverstop'];
$serverstop = htmlentities($_POST['serverstop'], ENT_QUOTES, 'UTF-8', false);
//鯖停止
$file = fopen($serverstopfile, 'w');
@@ -290,7 +290,7 @@ require('../logout/logout.php');
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>メンテナンス - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>メンテナンス - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
+6 -6
View File
@@ -331,7 +331,7 @@ require('../logout/logout.php');
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>モデレーション - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>モデレーション - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -368,7 +368,7 @@ require('../logout/logout.php');
<div>
<p>投稿の最大文字数</p>
<div class="p2">ここで設定した文字数までの投稿が可能です。<br>なお、データベースより最大文字数を設定している場合そちらが優先されて使用されます。<br>1文字から16777216文字の間で設定が可能です。<br>※uwuzu version 1.3.0以前にuwuzuを導入された方はuwuzuのDB内のtext型を全てmediumtext型にしてください。</div>
<input id="max_textsize" placeholder="1024" class="inbox" type="number" min="1" max="16777216" name="max_textsize" value="<?php if( !empty(file_get_contents($mojisizefile)) ){ echo htmlentities(file_get_contents($mojisizefile), ENT_QUOTES, 'UTF-8'); } ?>">
<input id="max_textsize" placeholder="1024" class="inbox" type="number" min="1" max="16777216" name="max_textsize" value="<?php if( !empty(file_get_contents($mojisizefile)) ){ echo htmlentities(file_get_contents($mojisizefile), ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<hr>
<div>
@@ -387,9 +387,9 @@ require('../logout/logout.php');
<div id="hcaptcha">
<p>hCaptcha - 認証情報設定</p>
<div class="p2">サイトキー</div>
<input id="hcaptcha" placeholder="" class="inbox" type="text" name="hCaptcha_sitekey" value="<?php if( !empty(H_CAPTCHA_SITE_KEY) ){ echo htmlentities(H_CAPTCHA_SITE_KEY, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="hcaptcha" placeholder="" class="inbox" type="text" name="hCaptcha_sitekey" value="<?php if( !empty(H_CAPTCHA_SITE_KEY) ){ echo htmlentities(H_CAPTCHA_SITE_KEY, ENT_QUOTES, 'UTF-8', false); } ?>">
<div class="p2">シークレットキー</div>
<input id="hcaptcha" placeholder="" class="inbox" type="text" name="hCaptcha_seackey" value="<?php if( !empty(H_CAPTCHA_SEAC_KEY) ){ echo htmlentities(H_CAPTCHA_SEAC_KEY, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="hcaptcha" placeholder="" class="inbox" type="text" name="hCaptcha_seackey" value="<?php if( !empty(H_CAPTCHA_SEAC_KEY) ){ echo htmlentities(H_CAPTCHA_SEAC_KEY, ENT_QUOTES, 'UTF-8', false); } ?>">
<p>デモ</p>
<div class="h-captcha" data-sitekey="10000000-ffff-ffff-ffff-000000000001"></div>
</div>
@@ -411,9 +411,9 @@ require('../logout/logout.php');
<div id="CF_Turnstile">
<p>CloudflareTurnstile - 認証情報設定</p>
<div class="p2">サイトキー</div>
<input id="CF_Turnstile" placeholder="" class="inbox" type="text" name="CF_Turnstile_sitekey" value="<?php if( !empty(CF_TURNSTILE_SITE_KEY) ){ echo htmlentities(CF_TURNSTILE_SITE_KEY, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="CF_Turnstile" placeholder="" class="inbox" type="text" name="CF_Turnstile_sitekey" value="<?php if( !empty(CF_TURNSTILE_SITE_KEY) ){ echo htmlentities(CF_TURNSTILE_SITE_KEY, ENT_QUOTES, 'UTF-8', false); } ?>">
<div class="p2">シークレットキー</div>
<input id="CF_Turnstile" placeholder="" class="inbox" type="text" name="CF_Turnstile_seackey" value="<?php if( !empty(CF_TURNSTILE_SEAC_KEY) ){ echo htmlentities(CF_TURNSTILE_SEAC_KEY, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="CF_Turnstile" placeholder="" class="inbox" type="text" name="CF_Turnstile_seackey" value="<?php if( !empty(CF_TURNSTILE_SEAC_KEY) ){ echo htmlentities(CF_TURNSTILE_SEAC_KEY, ENT_QUOTES, 'UTF-8', false); } ?>">
<p>デモ<p>
<div class="cf-turnstile" data-sitekey="1x00000000000000000000AA" data-callback="javascriptCallback" data-language="ja"></div>
</div>
+58 -36
View File
@@ -213,28 +213,46 @@ $count3 = $result3->num_rows;
$result4 = $mysqli->query("SELECT userid FROM account WHERE sacinfo = 'bot'");
$count4 = $result4->num_rows;
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$diskFree = (int) disk_free_space('C:') / 1024 / 1024;
$diskTotal = (int) disk_total_space('C:') / 1024 / 1024;
$diskUmari = $diskTotal - $diskFree;
if ($diskFree / $diskTotal < 0.1) {
$disk_over90p = true;
}else{
$disk_over90p = false;
if(function_exists("disk_free_space")){
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$disk = true;
$diskFree = (int) disk_free_space('C:') / 1024 / 1024;
$diskTotal = (int) disk_total_space('C:') / 1024 / 1024;
$diskUmari = $diskTotal - $diskFree;
if ($diskFree / $diskTotal < 0.1) {
$disk_over90p = true;
}else{
$disk_over90p = false;
}
$loadAve = null;
} else {
$disk = true;
$diskFree = (int) disk_free_space('/') / 1024 / 1024;
$diskTotal = (int) disk_total_space('/') / 1024 / 1024;
$diskUmari = $diskTotal - $diskFree;
if ($diskFree / $diskTotal < 0.1) {
$disk_over90p = true;
}else{
$disk_over90p = false;
}
if(function_exists("sys_getloadavg")){
$loadAve = sys_getloadavg()[0];
}else{
$loadAve = null;
}
}
$loadAve = null;
} else {
$diskFree = (int) disk_free_space('/') / 1024 / 1024;
$diskTotal = (int) disk_total_space('/') / 1024 / 1024;
$diskUmari = $diskTotal - $diskFree;
if ($diskFree / $diskTotal < 0.1) {
$disk_over90p = true;
}else{
$disk = false;
$diskFree = 5000;
$diskUmari = 5000;
$diskTotal = 10000;
$disk_over90p = false;
if(function_exists("sys_getloadavg")){
$loadAve = sys_getloadavg()[0];
}else{
$disk_over90p = false;
$loadAve = null;
}
$loadAve = sys_getloadavg()[0];
}
require('../logout/logout.php');
@@ -250,7 +268,7 @@ require('../logout/logout.php');
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>サーバー概要 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>サーバー概要 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -274,32 +292,32 @@ require('../logout/logout.php');
<!--(サーバーアイコン)-->
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
<div class="serverhead">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8', false); ?>">
</div>
<?php }?>
<?php if( !empty($serversettings["serverinfo"]["server_icon"]) ){ ?>
<div class="servericon">
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
<div class="up">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8', false); ?>">
</div>
<?php }else{?>
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8', false); ?>">
<?php }?>
</div>
<?php }?>
<!--(サーバーアイコンここまで)-->
<p>サーバー名</p>
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')) ){ echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8'); } ?></p>
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)) ){ echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false); } ?></p>
<hr>
<p>サーバー紹介メッセージ</p>
<p><?php $sinfo = explode("\n", $serverinfo); foreach ($sinfo as $info) { echo nl2br(htmlentities($info)); }?></p>
<hr>
<p>サーバー管理者の名前</p>
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8')) ){ echo htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8'); } ?></p>
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8', false)) ){ echo htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8', false); } ?></p>
<hr>
<p>サーバーへのお問い合わせ用メールアドレス</p>
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8')) ){ echo htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8'); } ?></p>
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8', false)) ){ echo htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8', false); } ?></p>
<hr>
<p>統計情報</p>
<div class="overview">
@@ -324,17 +342,21 @@ require('../logout/logout.php');
</div>
<hr>
<p>ディスク空き容量</p>
<?php if($disk_over90p == true){?>
<p class="errmsg">90%以上が使用済みです。<br>早急に容量拡張などの対応を考えてください!</p>
<?php }else{?>
<p>ディスク空き容量には余裕があります。</p>
<?php };?>
<div class="graph">
<div class="per" style="width:calc(<?php echo round((int)mb_to_gb($diskUmari) / (int)mb_to_gb($diskTotal) * 100, 1);?>% - 8px);">
<?php if($disk == true){?>
<?php if($disk_over90p == true){?>
<p class="errmsg">90%以上が使用済みです。<br>早急に容量拡張などの対応を考えてください!</p>
<?php }else{?>
<p>ディスク空き容量には余裕があります。</p>
<?php };?>
<div class="graph">
<div class="per" style="width:calc(<?php echo round((int)mb_to_gb($diskUmari) / (int)mb_to_gb($diskTotal) * 100, 1);?>% - 8px);">
</div>
</div>
</div>
<p>使用済み : <?php echo mb_to_gb($diskUmari)."GB/".mb_to_gb($diskTotal);?>GB<br>
空き容量 : <?php echo mb_to_gb($diskFree);?>GB</p>
<p>使用済み : <?php echo mb_to_gb($diskUmari)."GB/".mb_to_gb($diskTotal);?>GB<br>
空き容量 : <?php echo mb_to_gb($diskFree);?>GB</p>
<?php }else{?>
<p>空き容量の取得ができませんでした。</p>
<?php };?>
<hr>
<p>ロードアベレージ</p>
<div class="p2">ロードアベレージはCPUのコア数と照らし合わせて活用してください。<br>
+22 -22
View File
@@ -8,7 +8,7 @@ $serverstopfile = "../server/serverstop.txt";
$domain = $_SERVER['HTTP_HOST'];
if(!empty(file_get_contents($serverstopfile))){
$serverstop = htmlentities(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
$serverstop = htmlentities(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8', false);
}else{
$serverstop = "";
}
@@ -197,26 +197,26 @@ $notiData = $notiQuery->fetch(PDO::FETCH_ASSOC);
$notificationcount = $notiData['notification_count'];
if( !empty($_POST['btn_submit']) ) {
$N_MAIL_ONOFF = $_POST['mailchks_onoff'];
$N_MAIL_ONOFF = htmlentities($_POST['mailchks_onoff'], ENT_QUOTES, 'UTF-8', false);
$N_MAIL_ADDS = $_POST['N_MAIL_ADDS'];
$N_MAIL_HOST = $_POST['N_MAIL_HOST'];
$N_MAIL_PORT = $_POST['N_MAIL_PORT'];
$N_MAIL_USER = $_POST['N_MAIL_USER'];
$N_MAIL_PASS = $_POST['N_MAIL_PASS'];
$N_MAIL_ADDS = htmlentities($_POST['N_MAIL_ADDS'], ENT_QUOTES, 'UTF-8', false);
$N_MAIL_HOST = htmlentities($_POST['N_MAIL_HOST'], ENT_QUOTES, 'UTF-8', false);
$N_MAIL_PORT = htmlentities($_POST['N_MAIL_PORT'], ENT_QUOTES, 'UTF-8', false);
$N_MAIL_USER = htmlentities($_POST['N_MAIL_USER'], ENT_QUOTES, 'UTF-8', false);
$N_MAIL_PASS = htmlentities($_POST['N_MAIL_PASS'], ENT_QUOTES, 'UTF-8', false);
$N_MAIL_SSL_ = $_POST['ssl_tls_none'];
$N_MAIL_SSL_ = htmlentities($_POST['ssl_tls_none'], ENT_QUOTES, 'UTF-8', false);
$New_Mail_Settings = "
<?php // メールサーバーの情報
define( 'MAIL_CHKS', '".htmlentities($N_MAIL_ONOFF)."');// trueならPHPMailerが有効
define( 'MAIL_CHKS', '".$N_MAIL_ONOFF."');// trueならPHPMailerが有効
define( 'MAIL_ADDS', '".htmlentities($N_MAIL_ADDS)."');
define( 'MAIL_HOST', '".htmlentities($N_MAIL_HOST)."');
define( 'MAIL_PORT', '".htmlentities($N_MAIL_PORT)."');
define( 'MAIL_USER', '".htmlentities($N_MAIL_USER)."');
define( 'MAIL_PASS', '".htmlentities($N_MAIL_PASS)."');
define( 'MAIL_SSL_', '".htmlentities($N_MAIL_SSL_)."');
define( 'MAIL_ADDS', '".$N_MAIL_ADDS."');
define( 'MAIL_HOST', '".$N_MAIL_HOST."');
define( 'MAIL_PORT', '".$N_MAIL_PORT."');
define( 'MAIL_USER', '".$N_MAIL_USER."');
define( 'MAIL_PASS', '".$N_MAIL_PASS."');
define( 'MAIL_SSL_', '".$N_MAIL_SSL_."');
?>
";
@@ -232,7 +232,7 @@ if( !empty($_POST['btn_submit']) ) {
}
if( !empty($_POST['testmail_send_btn_submit']) ) {
$test_mail_adds = $_POST['test_sender_adds'];
$test_mail_adds = htmlentities($_POST['test_sender_adds'], ENT_QUOTES, 'UTF-8', false);
$mail_title = "Test email";
$mail_text = "これはuwuzuのテストメールです。 問題なく受信できていますか?";
@@ -252,7 +252,7 @@ require('../logout/logout.php');
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>プラグイン - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>プラグイン - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -291,15 +291,15 @@ require('../logout/logout.php');
<div id="mail_plugin">
<p>PHPMailer - メールサーバー設定</p>
<div class="p2">メールアドレス</div>
<input id="mail_plugin" placeholder="user@localhost" class="inbox" type="text" name="N_MAIL_ADDS" value="<?php if( !empty(MAIL_ADDS) ){ echo htmlentities(MAIL_ADDS, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="mail_plugin" placeholder="user@localhost" class="inbox" type="text" name="N_MAIL_ADDS" value="<?php if( !empty(MAIL_ADDS) ){ echo htmlentities(MAIL_ADDS, ENT_QUOTES, 'UTF-8', false); } ?>">
<div class="p2">ホスト名</div>
<input id="mail_plugin" placeholder="smtp.mailserver.com" class="inbox" type="text" name="N_MAIL_HOST" value="<?php if( !empty(MAIL_HOST) ){ echo htmlentities(MAIL_HOST, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="mail_plugin" placeholder="smtp.mailserver.com" class="inbox" type="text" name="N_MAIL_HOST" value="<?php if( !empty(MAIL_HOST) ){ echo htmlentities(MAIL_HOST, ENT_QUOTES, 'UTF-8', false); } ?>">
<div class="p2">ポート番号</div>
<input id="mail_plugin" placeholder="465" class="inbox" type="text" name="N_MAIL_PORT" value="<?php if( !empty(MAIL_PORT) ){ echo htmlentities(MAIL_PORT, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="mail_plugin" placeholder="465" class="inbox" type="text" name="N_MAIL_PORT" value="<?php if( !empty(MAIL_PORT) ){ echo htmlentities(MAIL_PORT, ENT_QUOTES, 'UTF-8', false); } ?>">
<div class="p2">ユーザー名</div>
<input id="mail_plugin" placeholder="from@localhost" class="inbox" type="text" name="N_MAIL_USER" value="<?php if( !empty(MAIL_USER) ){ echo htmlentities(MAIL_USER, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="mail_plugin" placeholder="from@localhost" class="inbox" type="text" name="N_MAIL_USER" value="<?php if( !empty(MAIL_USER) ){ echo htmlentities(MAIL_USER, ENT_QUOTES, 'UTF-8', false); } ?>">
<div class="p2">パスワード</div>
<input id="mail_plugin" placeholder="password" class="inbox" type="text" name="N_MAIL_PASS" style="-webkit-text-security:disc;" value="<?php if( !empty(MAIL_PASS) ){ echo htmlentities(MAIL_PASS, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="mail_plugin" placeholder="password" class="inbox" type="text" name="N_MAIL_PASS" style="-webkit-text-security:disc;" value="<?php if( !empty(MAIL_PASS) ){ echo htmlentities(MAIL_PASS, ENT_QUOTES, 'UTF-8', false); } ?>">
<div class="p2">暗号化設定</div>
<div class="radio_btn_zone">
+9 -9
View File
@@ -185,10 +185,10 @@ $notificationcount = $notiData['notification_count'];
if( !empty($_POST['role_btn_submit']) ) {
$rolename = htmlentities($_POST['rolename']);
$roleid = htmlentities($_POST['roleid']);
$rolecolor = htmlentities($_POST['rolecolor']);
$roleeffect = htmlentities($_POST['roleeffect']);
$rolename = htmlentities($_POST['rolename'], ENT_QUOTES, 'UTF-8', false);
$roleid = htmlentities($_POST['roleid'], ENT_QUOTES, 'UTF-8', false);
$rolecolor = htmlentities($_POST['rolecolor'], ENT_QUOTES, 'UTF-8', false);
$roleeffect = htmlentities($_POST['roleeffect'], ENT_QUOTES, 'UTF-8', false);
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
$query = $dbh->prepare('SELECT * FROM role WHERE roleidname = :roleid limit 1');
@@ -269,7 +269,7 @@ if( !empty($_POST['role_btn_submit']) ) {
}
}
if( !empty($_POST['role_del']) ) {
$role_id = htmlentities($_POST['role_id']);
$role_id = htmlentities($_POST['role_id'], ENT_QUOTES, 'UTF-8', false);
try{
// 通知削除クエリを実行
$deleteQuery = $pdo->prepare("DELETE FROM role WHERE roleidname = :roleid");
@@ -319,8 +319,8 @@ if( !empty($_POST['role_del']) ) {
if( !empty($_POST['send_add_role_submit']) ) {
$add_userid = htmlentities($_POST['add_userid']);
$add_roleid = htmlentities($_POST['add_roleid']);
$add_userid = htmlentities($_POST['add_userid'], ENT_QUOTES, 'UTF-8', false);
$add_roleid = htmlentities($_POST['add_roleid'], ENT_QUOTES, 'UTF-8', false);
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
$query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
@@ -371,8 +371,8 @@ if( !empty($_POST['send_add_role_submit']) ) {
}
}
if( !empty($_POST['send_del_role_submit']) ) {
$del_userid = htmlentities($_POST['del_userid']);
$del_roleid = htmlentities($_POST['del_roleid']);
$del_userid = htmlentities($_POST['del_userid'], ENT_QUOTES, 'UTF-8', false);
$del_roleid = htmlentities($_POST['del_roleid'], ENT_QUOTES, 'UTF-8', false);
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
$query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
+48 -25
View File
@@ -237,42 +237,49 @@ if (!empty($pdo)) {
if( !empty($_POST['btn_submit']) ) {
$servericon = $_POST['servericon'];
$servericon = htmlentities($_POST['servericon'], ENT_QUOTES, 'UTF-8', false);
$serverhead = $_POST['serverhead'];
$serverhead = htmlentities($_POST['serverhead'], ENT_QUOTES, 'UTF-8', false);
$serverlogo_onoff = $_POST['serverlogo_onoff'];
$serverlogo_onoff = htmlentities($_POST['serverlogo_onoff'], ENT_QUOTES, 'UTF-8', false);
$serverlogo_light = $_POST['serverlogo_light'];
$serverlogo_dark = $_POST['serverlogo_dark'];
$serverlogo_light = htmlentities($_POST['serverlogo_light'], ENT_QUOTES, 'UTF-8', false);
$serverlogo_dark = htmlentities($_POST['serverlogo_dark'], ENT_QUOTES, 'UTF-8', false);
if(!($serverlogo_onoff === "true")){
$serverlogo_light = "";
$serverlogo_dark = "";
}
$servername = $_POST['servername'];
$servername = htmlentities($_POST['servername'], ENT_QUOTES, 'UTF-8', false);
$serverinfo = $_POST['serverinfo'];
$serverinfo = htmlentities($_POST['serverinfo'], ENT_QUOTES, 'UTF-8', false);
$serveradminname = $_POST['serveradminname'];
$serveradminname = htmlentities($_POST['serveradminname'], ENT_QUOTES, 'UTF-8', false);
$servermailadds = $_POST['servermailadds'];
$servermailadds = htmlentities($_POST['servermailadds'], ENT_QUOTES, 'UTF-8', false);
$onlyuser = $_POST['onlyuser'];
$onlyuser = htmlentities($_POST['onlyuser'], ENT_QUOTES, 'UTF-8', false);
if($onlyuser === "true"){
$saveonlyuser = "true";
}else{
$saveonlyuser = "false";
}
$activitypub = $_POST['activitypub'];
$activitypub = htmlentities($_POST['activitypub'], ENT_QUOTES, 'UTF-8', false);
if($activitypub === "true"){
$saveactivitypub = "true";
}else{
$saveactivitypub = "false";
}
$postrobots = $_POST['robots'];
$migration = htmlentities($_POST['migration'], ENT_QUOTES, 'UTF-8', false);
if($migration === "true"){
$savemigration = "true";
}else{
$savemigration = "false";
}
$postrobots = htmlentities($_POST['robots'], ENT_QUOTES, 'UTF-8', false);
if($postrobots === "true"){
//GPTBotによるクロールを拒否
$file = fopen($robots, 'w');
@@ -287,9 +294,9 @@ if( !empty($_POST['btn_submit']) ) {
fclose($file);
}
$serverterms = $_POST['serverterms'];
$serverterms = htmlentities($_POST['serverterms'], ENT_QUOTES, 'UTF-8', false);
$serverprv = $_POST['serverprv'];
$serverprv = htmlentities($_POST['serverprv'], ENT_QUOTES, 'UTF-8', false);
$server_new_settings = '
;サーバーの基本情報
@@ -309,6 +316,8 @@ if( !empty($_POST['btn_submit']) ) {
;招待のオンオフ
server_invitation = "'.$saveonlyuser.'"
server_activitypub = "'.$saveactivitypub.'"
;アカウントの移行登録を許可するか
server_account_migration = "'.$savemigration.'"
';
//サーバー設定上書き
@@ -353,7 +362,7 @@ require('../logout/logout.php');
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>サーバー設定 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>サーバー設定 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -377,17 +386,17 @@ require('../logout/logout.php');
<!--(サーバーアイコン)-->
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
<div class="serverhead_set">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8', false); ?>">
</div>
<?php }?>
<?php if( !empty($serversettings["serverinfo"]["server_icon"]) ){ ?>
<div class="servericon">
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
<div class="up">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8', false); ?>">
</div>
<?php }else{?>
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8', false); ?>">
<?php }?>
</div>
<?php }?>
@@ -395,12 +404,12 @@ require('../logout/logout.php');
<div>
<p>サーバーアイコン</p>
<div class="p2">サーバー登録画面などに表示されます。<br>自動的に角が丸くなります。<br>URLより設定してください。(設定しなくても大丈夫です。)</div>
<input id="servericon" placeholder="https://~" class="inbox" type="text" name="servericon" value="<?php if( !empty($serversettings["serverinfo"]["server_icon"]) ){ echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="servericon" placeholder="https://~" class="inbox" type="text" name="servericon" value="<?php if( !empty($serversettings["serverinfo"]["server_icon"]) ){ echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<div>
<p>サーバーヘッダー</p>
<div class="p2">サーバー登録画面などに表示されます。<br>自動的に角が丸くなります。<br>URLより設定してください。(設定しなくても大丈夫です。)</div>
<input id="serverhead" placeholder="https://~" class="inbox" type="text" name="serverhead" value="<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="serverhead" placeholder="https://~" class="inbox" type="text" name="serverhead" value="<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<div>
@@ -419,9 +428,9 @@ require('../logout/logout.php');
<p>サーバーロゴ</p>
<div class="p2">サーバーの左上に表示されているuwuzuのロゴを独自のロゴに置き換えるときに使用します。<br>自動的に角が丸くなります。<br>URLより設定してください。<br>背景透過画像を推奨します。</div>
<div class="p2">ログイン後のロゴ</div>
<input id="serverlogo" placeholder="https://~" class="inbox" type="text" name="serverlogo_light" value="<?php if( !empty($serversettings["serverinfo"]["server_logo_home"]) ){ echo htmlentities($serversettings["serverinfo"]["server_logo_home"], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="serverlogo" placeholder="https://~" class="inbox" type="text" name="serverlogo_light" value="<?php if( !empty($serversettings["serverinfo"]["server_logo_home"]) ){ echo htmlentities($serversettings["serverinfo"]["server_logo_home"], ENT_QUOTES, 'UTF-8', false); } ?>">
<div class="p2">ログイン画面と利用規約などドキュメントページのロゴ</div>
<input id="serverlogo" placeholder="https://~" class="inbox" type="text" name="serverlogo_dark" value="<?php if( !empty($serversettings["serverinfo"]["server_logo_login"]) ){ echo htmlentities($serversettings["serverinfo"]["server_logo_login"], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="serverlogo" placeholder="https://~" class="inbox" type="text" name="serverlogo_dark" value="<?php if( !empty($serversettings["serverinfo"]["server_logo_login"]) ){ echo htmlentities($serversettings["serverinfo"]["server_logo_login"], ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<script>
if ($("#serverlogo_onoff").prop("checked")) {
@@ -437,7 +446,7 @@ require('../logout/logout.php');
<div>
<p>サーバー名</p>
<div class="p2">サーバー名です。</div>
<input id="servername" placeholder="uwuzuさ~ば~" class="inbox" type="text" name="servername" value="<?php if( !empty($serversettings["serverinfo"]["server_name"]) ){ echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="servername" placeholder="uwuzuさ~ば~" class="inbox" type="text" name="servername" value="<?php if( !empty($serversettings["serverinfo"]["server_name"]) ){ echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<div>
@@ -449,13 +458,13 @@ require('../logout/logout.php');
<div>
<p>サーバー管理者の名前</p>
<div class="p2">サーバー管理者名です。</div>
<input id="serveradminname" placeholder="わたし" class="inbox" type="text" name="serveradminname" value="<?php if( !empty($serversettings["serverinfo"]["server_admin"]) ){ echo htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="serveradminname" placeholder="わたし" class="inbox" type="text" name="serveradminname" value="<?php if( !empty($serversettings["serverinfo"]["server_admin"]) ){ echo htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<div>
<p>サーバーへのお問い合わせ用メールアドレス</p>
<div class="p2">ユーザーからのお問い合わせメアドです。</div>
<input id="servermailadds" placeholder="" class="inbox" type="text" name="servermailadds" value="<?php if( !empty($serversettings["serverinfo"]["server_admin_mailadds"]) ){ echo htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8'); } ?>">
<input id="servermailadds" placeholder="" class="inbox" type="text" name="servermailadds" value="<?php if( !empty($serversettings["serverinfo"]["server_admin_mailadds"]) ){ echo htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<div>
@@ -471,6 +480,20 @@ require('../logout/logout.php');
</div>
</div>
<div>
<p>アカウントの移行登録を許可するか</p>
<div class="p2">他のuwuzuサーバーからのアカウント移行を許可するかです。<br>このサーバーが招待制の場合移行登録にも招待コードが必要となります。</div>
<div class="switch_button">
<?php if($serversettings["serverinfo"]["server_account_migration"] === "true"){?>
<input id="migration" class="switch_input" type='checkbox' name="migration" value="true" checked/>
<label for="migration" class="switch_label"></label>
<?php }else{?>
<input id="migration" class="switch_input" type='checkbox' name="migration" value="true" />
<label for="migration" class="switch_label"></label>
<?php }?>
</div>
</div>
<div>
<p>OpenAIによるクロールを拒否するかどうか<br>※robots.txtによりOpenAIからのクロールを拒否するものであり、他のAI企業によるクロールを完全拒否するものではございません。</p>
<div class="switch_button">
+5 -5
View File
@@ -187,7 +187,7 @@ $notificationcount = $notiData['notification_count'];
if( !empty($_POST['btn_submit']) ) {
// 空白除去
$target_userid = htmlentities(str_replace('@', '', $_POST['target_userid']));
$target_userid = htmlentities(str_replace('@', '', $_POST['target_userid']), ENT_QUOTES, 'UTF-8', false);
if (!empty($pdo)) {
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
@@ -222,7 +222,7 @@ if( !empty($_POST['btn_submit']) ) {
if( !empty($_POST['report_done']) ) {
$report_id = $_POST['report_id'];
$report_id = htmlentities($_POST['report_id'], ENT_QUOTES, 'UTF-8', false);
if (!empty($pdo)) {
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
@@ -268,7 +268,7 @@ if( !empty($_POST['report_done']) ) {
require('../logout/logout.php');
if(isset($_GET['q'])){
$keyword = htmlentities($_GET['q']);
$keyword = htmlentities($_GET['q'], ENT_QUOTES, 'UTF-8', false);
}else{
$keyword = "";
}
@@ -296,7 +296,7 @@ if (!empty($pdo)) {
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>ユーザー管理 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>ユーザー管理 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -319,7 +319,7 @@ if (!empty($pdo)) {
<h1>ユーザー管理</h1>
<div>
<p>ユーザーID</p>
<input id="target_userid" placeholder="admin" class="inbox" type="text" name="target_userid" value="<?php if( !empty($keyword) ){ echo htmlentities($keyword, ENT_QUOTES, 'UTF-8'); } ?>">
<input id="target_userid" placeholder="admin" class="inbox" type="text" name="target_userid" value="<?php if( !empty($keyword) ){ echo htmlentities($keyword, ENT_QUOTES, 'UTF-8', false); } ?>">
</div>
<input type="submit" class = "irobutton" name="btn_submit" value="検索">
+22 -22
View File
@@ -231,12 +231,12 @@ if( !empty($_POST['send_ice_submit']) ) {
$newrole = "ice";
$newtoken = "ice";
$newadmin = "user";
$newadmin = "none";
// トランザクション開始
$pdo->beginTransaction();
try {
$touserid = htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8');
$touserid = htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8', false);
// SQL作成
$stmt = $pdo->prepare("UPDATE account SET role = :role,token = :newtoken,admin = :newadmin WHERE userid = :userid");
@@ -264,8 +264,8 @@ if( !empty($_POST['send_ice_submit']) ) {
if(!empty(MAIL_CHKS && MAIL_CHKS == "true")){
if( !empty($userdata["mailadds"]) ){
if(filter_var($userdata["mailadds"], FILTER_VALIDATE_EMAIL)){
$mail_title = "お使いの".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントは凍結されました";
$mail_text = "".$userdata["username"]."(".$userdata["userid"].")さん いつもuwuzuをご利用いただきありがとうございます。 ご利用のアカウント(".$userdata["userid"].")が".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."管理者により凍結されたためお知らせいたします。 サービス管理者からのメッセージは以下のものです。 ". $notice_msg ." 異議申し立てする場合は[".htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8')."]まで異議申し立てをする旨を記載し送信をしてください。";
$mail_title = "お使いの".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)."アカウントは凍結されました";
$mail_text = "".$userdata["username"]."(".$userdata["userid"].")さん いつもuwuzuをご利用いただきありがとうございます。 ご利用のアカウント(".$userdata["userid"].")が".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)."管理者により凍結されたためお知らせいたします。 サービス管理者からのメッセージは以下のものです。 ". $notice_msg ." 異議申し立てする場合は[".htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8', false)."]まで異議申し立てをする旨を記載し送信をしてください。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
}
@@ -277,7 +277,7 @@ if( !empty($_POST['send_ice_submit']) ) {
$pdo->beginTransaction();
try {
$touserid = htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8');
$touserid = htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8', false);
$datetime = date("Y-m-d H:i:s");
$msg = "サービス管理者からのメッセージは以下のものです。\n" . $notice_msg . "\n異議申し立てする場合は連絡用メールに異議申し立てをする旨を記載し送信をしてください。";
$title = "🧊お使いのアカウントは凍結されました。🧊";
@@ -324,7 +324,7 @@ if( !empty($_POST['send_water_submit']) ) {
$pdo->beginTransaction();
try {
$touserid = htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8');
$touserid = htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8', false);
// SQL作成
$stmt = $pdo->prepare("UPDATE account SET role = :role,token = :newtoken,admin = :newadmin WHERE userid = :userid");
@@ -352,7 +352,7 @@ if( !empty($_POST['send_water_submit']) ) {
if(!empty(MAIL_CHKS && MAIL_CHKS == "true")){
if( !empty($userdata["mailadds"]) ){
if(filter_var($userdata["mailadds"], FILTER_VALIDATE_EMAIL)){
$mail_title = "お使いの".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントは解凍されました!";
$mail_title = "お使いの".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)."アカウントは解凍されました!";
$mail_text = "".$userdata["username"]."(".$userdata["userid"].")さん いつもuwuzuをご利用いただきありがとうございます。 ご利用のアカウント(".$userdata["userid"].")が解凍されたためお知らせいたします。 今後、ご利用のuwuzuアカウントは今まで通りご利用いただけます。 また、APIを使用している方はAPIのトークンがリセットされているため再度トークンを発行してご利用ください。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
@@ -365,7 +365,7 @@ if( !empty($_POST['send_water_submit']) ) {
$pdo->beginTransaction();
try {
$touserid = htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8');
$touserid = htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8', false);
$datetime = date("Y-m-d H:i:s");
$msg = "サービス管理者によりお使いのアカウントは解凍されました!\n今まで通りご利用いただけます。\nまた、APIを使用している方はAPIのトークンがリセットされているため再度トークンを発行してご利用ください。";
$title = "🫗お使いのアカウントが解凍されました!🫗";
@@ -535,8 +535,8 @@ if( !empty($_POST['send_ban_submit']) ) {
if(!empty(MAIL_CHKS && MAIL_CHKS == "true")){
if( !empty($userdata["mailadds"]) ){
if(filter_var($userdata["mailadds"], FILTER_VALIDATE_EMAIL)){
$mail_title = "お使いの".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントはBANされました";
$mail_text = "".$userdata["username"]."(".$userdata["userid"].")さん いつもuwuzuをご利用いただきありがとうございます。 この度、ご利用のアカウント(".$userdata["userid"].")が".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."管理者によりBAN(削除)されたためお知らせいたします。 今後は今までご利用いただいた".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントは利用できません。 ".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."サーバー上から今までご利用いただいていたアカウントの情報は削除されたためログインなどもできません。 ご理解とご協力のほどよろしくお願いします。";
$mail_title = "お使いの".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)."アカウントはBANされました";
$mail_text = "".$userdata["username"]."(".$userdata["userid"].")さん いつもuwuzuをご利用いただきありがとうございます。 この度、ご利用のアカウント(".$userdata["userid"].")が".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)."管理者によりBAN(削除)されたためお知らせいたします。 今後は今までご利用いただいた".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)."アカウントは利用できません。 ".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)."サーバー上から今までご利用いただいていたアカウントの情報は削除されたためログインなどもできません。 ご理解とご協力のほどよろしくお願いします。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
}
@@ -576,7 +576,7 @@ require('../logout/logout.php');
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
<title>ユーザー管理 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>ユーザー管理 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -599,8 +599,8 @@ require('../logout/logout.php');
<div class="icon">
<img src="<?php echo htmlentities('../'.$userdata['iconname']); ?>">
<div class="tatext">
<h2><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?></h2>
<p>@<?php echo htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8'); ?></p>
<h2><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?></h2>
<p>@<?php echo htmlentities($userdata['userid'], ENT_QUOTES, 'UTF-8', false); ?></p>
</div>
</div>
@@ -629,12 +629,12 @@ require('../logout/logout.php');
<div class="profile">
<div class="p2">プロフィール</div>
<p><?php echo nl2br(htmlentities($userdata["profile"], ENT_QUOTES, 'UTF-8')); ?></p>
<p><?php echo nl2br(htmlentities($userdata["profile"], ENT_QUOTES, 'UTF-8', false)); ?></p>
</div>
<hr>
<div class="about">
<div class="p2">メールアドレス</div>
<p><?php if( !empty($userdata["mailadds"]) ){ echo htmlentities($userdata["mailadds"], ENT_QUOTES, 'UTF-8'); }else{echo "未設定";} ?></p>
<p><?php if( !empty($userdata["mailadds"]) ){ echo htmlentities($userdata["mailadds"], ENT_QUOTES, 'UTF-8', false); }else{echo "未設定";} ?></p>
<hr>
<div class="p2">二段階認証</div>
<p><?php if( !empty($userdata["authcode"]) ){ echo "設定済み";}else{echo "未設定";} ?></p>
@@ -643,15 +643,15 @@ require('../logout/logout.php');
<p><?php if( !empty($userdata["admin"] === "yes") ){ echo "あり";}else{echo "なし";} ?></p>
<hr>
<div class="p2">フォロー数</div>
<p><?php if( $followCount > 0 ){ echo htmlentities($followCount, ENT_QUOTES, 'UTF-8');}else{echo "なし";} ?></p>
<p><?php if( $followCount > 0 ){ echo htmlentities($followCount, ENT_QUOTES, 'UTF-8', false);}else{echo "なし";} ?></p>
<div class="p2">フォロワー数</div>
<p><?php if( $followerCount > 0 ){ echo htmlentities($followerCount, ENT_QUOTES, 'UTF-8');}else{echo "なし";} ?></p>
<p><?php if( $followerCount > 0 ){ echo htmlentities($followerCount, ENT_QUOTES, 'UTF-8', false);}else{echo "なし";} ?></p>
<hr>
<div class="p2">投稿数</div>
<p><?php if( $upload_cnt1 > 0 ){ echo $upload_cnt1;}else{echo "なし";} ?></p>
<hr>
<div class="p2">アカウント登録日時</div>
<p><?php echo htmlentities($userdata["datetime"], ENT_QUOTES, 'UTF-8'); ?></p>
<p><?php echo htmlentities($userdata["datetime"], ENT_QUOTES, 'UTF-8', false); ?></p>
<hr>
<div class="p2">アカウント操作</div>
<div class="banzone">
@@ -670,9 +670,9 @@ require('../logout/logout.php');
<div id="account_IceModal" class="modal">
<div class="modal-content">
<h1>このアカウントを凍結しますか?</h1>
<p><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんのアカウントを凍結しますか?<br>凍結すると<?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんは以下のことができなくなります。<br>・投稿<br>・追記<br>・フォロー<br>・返信<br>・管理者権限の利用(管理者権限を持っていた場合)<br>・APIの使用(トークンがリセットされます)<br>また、以下の欄に入力した内容が個別メッセージとして通知欄に表示されます。<br><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんは異議申し立てが可能です。</p>
<p><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんのアカウントを凍結しますか?<br>凍結すると<?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんは以下のことができなくなります。<br>・投稿<br>・追記<br>・フォロー<br>・返信<br>・管理者権限の利用(管理者権限を持っていた場合)<br>・APIの使用(トークンがリセットされます)<br>また、以下の欄に入力した内容が個別メッセージとして通知欄に表示されます。<br><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんは異議申し立てが可能です。</p>
<form method="post" id="deleteForm">
<textarea id="notice_msg" placeholder="<?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんへのメッセージ" name="notice_msg"></textarea>
<textarea id="notice_msg" placeholder="<?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんへのメッセージ" name="notice_msg"></textarea>
<div class="btn_area">
<input type="submit" id="deleteButton" class="fbtn_no" name="send_ice_submit" value="凍結">
<input type="button" id="cancelButton" class="fbtn" value="キャンセル">
@@ -684,7 +684,7 @@ require('../logout/logout.php');
<div id="account_BanModal" class="modal">
<div class="modal-content">
<h1>このアカウントをBANしますか?</h1>
<p><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんのアカウントをBANしますか?<br>BANすると<?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんのアカウントとは削除されます。<br>また、以下のデータも削除されます。<br>・アカウントに紐づいている画像や写真データ<br>・投稿<br>・フォロー情報やいいね情報<br>・APIトークン<br>・アカウントのメールアドレス<br>・その他アカウントに関連している情報<br>また、すぐに削除されるため本人に削除通知を送ることは出来ません。<br><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんのアカウントを削除する場合は「BAN」を押してください。<br>アカウントの復旧は出来ません。</p>
<p><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんのアカウントをBANしますか?<br>BANすると<?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんのアカウントとは削除されます。<br>また、以下のデータも削除されます。<br>・アカウントに紐づいている画像や写真データ<br>・投稿<br>・フォロー情報やいいね情報<br>・APIトークン<br>・アカウントのメールアドレス<br>・その他アカウントに関連している情報<br>また、すぐに削除されるため本人に削除通知を送ることは出来ません。<br><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんのアカウントを削除する場合は「BAN」を押してください。<br>アカウントの復旧は出来ません。</p>
<form class="btn_area" method="post" id="deleteForm">
<input type="submit" id="deleteButton2" class="fbtn_no" name="send_ban_submit" value="BAN">
<input type="button" id="cancelButton2" class="fbtn" value="キャンセル">
@@ -695,7 +695,7 @@ require('../logout/logout.php');
<div id="account_WaterModal" class="modal">
<div class="modal-content">
<h1>このアカウントを解凍しますか?</h1>
<p><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんのアカウントを解凍しますか?<br>凍結すると<?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8'); ?>さんは今まで通りアカウントを使用できます。</p>
<p><?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんのアカウントを解凍しますか?<br>凍結すると<?php echo htmlentities($userdata['username'], ENT_QUOTES, 'UTF-8', false); ?>さんは今まで通りアカウントを使用できます。</p>
<form method="post" id="deleteForm">
<div class="btn_area">
<input type="submit" id="deleteButton3" class="fbtn_no" name="send_water_submit" value="解凍">