1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-04 19:14:41 +00:00

uwuzu v1.3.4 new_planet

This commit is contained in:
Daichimarukana
2024-03-26 22:48:57 +09:00
parent e0b3b93414
commit ea4ca882da
92 changed files with 3192 additions and 1567 deletions
@@ -0,0 +1,8 @@
<?php // Captchaの認証情報
define( 'CF_TURNSTILE_ONOFF', '');// trueならCloudflareTurnstileが有効
define( 'CF_TURNSTILE_SITE_KEY', '');
define( 'CF_TURNSTILE_SEAC_KEY', '');
?>
+3 -2
View File
@@ -306,13 +306,13 @@ if (!empty($pdo)) {
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>広告 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -406,6 +406,7 @@ if (!empty($pdo)) {
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
</html>
+9 -4
View File
@@ -360,10 +360,10 @@ $pdo = null;
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<meta name="viewport" content="width=device-width,initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>絵文字登録 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -388,6 +388,10 @@ $pdo = null;
<h1>絵文字登録</h1>
<p>絵文字登録です。</p>
<div class="p2">
注意 : uwuzuで表示されるカスタム絵文字の最大の大きさは縦64pxです。<br>
縦64px以上のカスタム絵文字を登録しても縮小されて表示されます。<br>
また、縦64px以上の画像をアップロードすると、uwuzuの動作が遅くなる恐れがあるため、絵文字の画像サイズは縦64pxを推奨します。</div>
<div id="wrap">
@@ -399,12 +403,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 htmlspecialchars( $_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'); } ?>">
</div>
<div>
<p>この絵文字について</p>
<input id="username" placeholder="くさデス" class="inbox" type="text" name="emojiinfo" value="<?php if( !empty($_SESSION['emojiinfo']) ){ echo htmlspecialchars( $_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'); } ?>">
</div>
<div>
@@ -420,6 +424,7 @@ $pdo = null;
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
<script type="text/javascript">
+4 -3
View File
@@ -275,13 +275,13 @@ require('../logout/logout.php');
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>招待コード発行所 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -302,7 +302,7 @@ require('../logout/logout.php');
<div class="admin_right">
<form class="formarea" enctype="multipart/form-data" method="post">
<h1>招待コード発行所</h1>
<?php if(htmlspecialchars($serversettings["serverinfo"]["server_invitation"], ENT_QUOTES, 'UTF-8') === "true"){?>
<?php if(htmlentities($serversettings["serverinfo"]["server_invitation"], ENT_QUOTES, 'UTF-8') === "true"){?>
<p>下の発行ボタンで新しくコードを発行できます!<br>なお、コードは一回限り有効です。</p>
<div>
<p>発行数</p>
@@ -338,6 +338,7 @@ require('../logout/logout.php');
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
<script>
$(document).ready(function() {
+3 -2
View File
@@ -262,13 +262,13 @@ require('../logout/logout.php');
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>サーバーカスタマイズ - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -310,6 +310,7 @@ require('../logout/logout.php');
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
@@ -1,8 +1,8 @@
<?php // Captchaの認証情報
define( 'CAPTCHA', '');// trueならhCaptchaが有効
<?php // Captchaの認証情報
define( 'H_CAPTCHA_ONOFF', '');// trueならhCaptchaが有効
define( 'SITE_KEY', '');
define( 'SEAC_KEY', '');
?>
define( 'H_CAPTCHA_SITE_KEY', '');
define( 'H_CAPTCHA_SEAC_KEY', '');
?>
+4 -3
View File
@@ -8,7 +8,7 @@ $serverstopfile = "../server/serverstop.txt";
$htaccessfile = "../.htaccess";
if(!empty(file_get_contents($serverstopfile))){
$serverstop = htmlspecialchars(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
$serverstop = htmlentities(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
}else{
$serverstop = "";
}
@@ -284,13 +284,13 @@ require('../logout/logout.php');
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>メンテナンス - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -336,6 +336,7 @@ require('../logout/logout.php');
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
+113 -45
View File
@@ -26,6 +26,8 @@ function random_code($length = 8){
require('../db.php');
//hCaptcha--------------------------------------------
require('hCaptcha_settings/hCaptcha_settings.php');
//Cloudflare_Turnstile--------------------------------------------
require('CloudflareTurnstile_settings/CloudflareTurnstile_settings.php');
//----------------------------------------------------
// 変数の初期化
@@ -237,54 +239,82 @@ if (!empty($pdo)) {
if( !empty($_POST['btn_submit']) ) {
// 空白除去
$banuserid = $_POST['banuserid'];
$banuserid = htmlentities($_POST['banuserid'], ENT_QUOTES, 'UTF-8', false);
$banurldomain = $_POST['banurldomain'];
$banurldomain = htmlentities($_POST['banurldomain'], ENT_QUOTES, 'UTF-8', false);
$max_textsize = $_POST['max_textsize'];
$max_textsize = htmlentities($_POST['max_textsize'], ENT_QUOTES, 'UTF-8', false);
//banuserid
$file = fopen($banuseridfile, 'w');
$data = $banuserid;
fputs($file, $data);
fclose($file);
if((int)$max_textsize > 16777216){
$error_message[] = "投稿の最大文字数の限界値を超えています。";
}
//banurldomain
$file = fopen($banurldomainfile, 'w');
$data = $banurldomain;
fputs($file, $data);
fclose($file);
if(empty($error_message)){
//banuserid
$file = fopen($banuseridfile, 'w');
$data = $banuserid;
fputs($file, $data);
fclose($file);
//maxtextsize
$file = fopen($mojisizefile, 'w');
$data = $max_textsize;
fputs($file, $data);
fclose($file);
//banurldomain
$file = fopen($banurldomainfile, 'w');
$data = $banurldomain;
fputs($file, $data);
fclose($file);
//maxtextsize
$file = fopen($mojisizefile, 'w');
$data = $max_textsize;
fputs($file, $data);
fclose($file);
$Captcha_ONOFF = $_POST['hCaptcha_onoff'];
$hCaptcha_ONOFF = htmlentities($_POST['hCaptcha_onoff'], ENT_QUOTES, 'UTF-8', false);
$Captcha_sitekey = $_POST['hCaptcha_sitekey'];
$Captcha_seackey = $_POST['hCaptcha_seackey'];
$hCaptcha_sitekey = htmlentities($_POST['hCaptcha_sitekey'], ENT_QUOTES, 'UTF-8', false);
$hCaptcha_seackey = htmlentities($_POST['hCaptcha_seackey'], ENT_QUOTES, 'UTF-8', false);
$New_hCaptcha_Settings = "
<?php // Captchaの認証情報
define( 'CAPTCHA', '".htmlentities($Captcha_ONOFF)."');// trueならhCaptchaが有効
$New_hCaptcha_Settings = "
<?php // Captchaの認証情報
define( 'H_CAPTCHA_ONOFF', '".htmlentities($hCaptcha_ONOFF, ENT_QUOTES, 'UTF-8', false)."');// trueならhCaptchaが有効
define( 'SITE_KEY', '".htmlentities($Captcha_sitekey)."');
define( 'SEAC_KEY', '".htmlentities($Captcha_seackey)."');
?>
";
define( 'H_CAPTCHA_SITE_KEY', '".htmlentities($hCaptcha_sitekey, ENT_QUOTES, 'UTF-8', false)."');
define( 'H_CAPTCHA_SEAC_KEY', '".htmlentities($hCaptcha_seackey, ENT_QUOTES, 'UTF-8', false)."');
?>
";
//設定上書き
$file = fopen('hCaptcha_settings/hCaptcha_settings.php', 'w');
$data = $New_hCaptcha_Settings;
fputs($file, $data);
fclose($file);
//設定上書き
$file = fopen('hCaptcha_settings/hCaptcha_settings.php', 'w');
$data = $New_hCaptcha_Settings;
fputs($file, $data);
fclose($file);
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location:".$url."");
exit;
//CF_Turnstile
$CF_Turnstile_ONOFF = htmlentities($_POST['CF_Turnstile_onoff'], ENT_QUOTES, 'UTF-8', false);
$CF_Turnstile_sitekey = htmlentities($_POST['CF_Turnstile_sitekey'], ENT_QUOTES, 'UTF-8', false);
$CF_Turnstile_seackey = htmlentities($_POST['CF_Turnstile_seackey'], ENT_QUOTES, 'UTF-8', false);
$New_CF_Turnstile_Settings = "
<?php // Captchaの認証情報
define( 'CF_TURNSTILE_ONOFF', '".htmlentities($CF_Turnstile_ONOFF, ENT_QUOTES, 'UTF-8', false)."');// trueならCloudflareTurnstileが有効
define( 'CF_TURNSTILE_SITE_KEY', '".htmlentities($CF_Turnstile_sitekey, ENT_QUOTES, 'UTF-8', false)."');
define( 'CF_TURNSTILE_SEAC_KEY', '".htmlentities($CF_Turnstile_seackey, ENT_QUOTES, 'UTF-8', false)."');
?>
";
//設定上書き
$file = fopen('CloudflareTurnstile_settings/CloudflareTurnstile_settings.php', 'w');
$data = $New_CF_Turnstile_Settings;
fputs($file, $data);
fclose($file);
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location:".$url."");
exit;
}
}
require('../logout/logout.php');
?>
@@ -293,13 +323,15 @@ require('../logout/logout.php');
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>モデレーション - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -326,25 +358,25 @@ require('../logout/logout.php');
<div class="p2">ここに入力してあるユーザーidは登録できません。<br>改行で禁止するユーザーidを指定できます。<br>すでにあるアカウントは影響を受けません。</div>
<textarea id="banuserid" placeholder="uwuzu" class="inbox" type="text" name="banuserid"><?php $sinfo = explode("\r", $banuserid_info); foreach ($sinfo as $info) { echo $info; }?></textarea>
</div>
<hr>
<div>
<p>投稿禁止URLドメイン</p>
<div class="p2">ここに入力してあるドメインが含まれる投稿をしようとすると投稿が拒否されます。<br>なお、この機能はまだ確実な動作が保証されないためベータ版です。<br>位置情報特定サイトなどの対策等にご利用ください。</div>
<textarea id="banurldomain" placeholder="" class="inbox" type="text" name="banurldomain"><?php $sinfo = explode("\r", $banurldomain_info); foreach ($sinfo as $info) { echo $info; }?></textarea>
</div>
<hr>
<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 htmlspecialchars(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'); } ?>">
</div>
<hr>
<div>
<p>hCaptcha認証</p>
<div class="p2">hCaptchaを使用し、ログイン時とアカウント登録時に認証をすることができます。<br>もし人間でないと判断された場合はアカウント登録やログイン、パスワード変更を受け付けません。</div>
<p>hCaptchaのオンオフ</p>
<div class="switch_button">
<?php if(!empty(CAPTCHA && CAPTCHA == "true")){?>
<?php if(!empty(H_CAPTCHA_ONOFF && H_CAPTCHA_ONOFF == "true")){?>
<input id="hCaptcha_onoff" class="switch_input" type='checkbox' name="hCaptcha_onoff" value="true" checked/>
<label for="hCaptcha_onoff" class="switch_label"></label>
<?php }else{?>
@@ -355,9 +387,35 @@ 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(SITE_KEY) ){ echo htmlspecialchars(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'); } ?>">
<div class="p2">シークレットキー</div>
<input id="hcaptcha" placeholder="" class="inbox" type="text" name="hCaptcha_seackey" value="<?php if( !empty(SEAC_KEY) ){ echo htmlspecialchars(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'); } ?>">
<p>デモ</p>
<div class="h-captcha" data-sitekey="10000000-ffff-ffff-ffff-000000000001"></div>
</div>
</div>
<hr>
<div>
<p>CloudflareTurnstile認証</p>
<div class="p2">CloudflareTurnstileを使用し、ログイン時とアカウント登録時に認証をすることができます。<br>もし人間でないと判断された場合はアカウント登録やログイン、パスワード変更を受け付けません。<br>hCaptchaなどと二重に設定することが可能です。</div>
<p>CloudflareTurnstileのオンオフ</p>
<div class="switch_button">
<?php if(!empty(CF_TURNSTILE_ONOFF && CF_TURNSTILE_ONOFF == "true")){?>
<input id="CF_Turnstile_onoff" class="switch_input" type='checkbox' name="CF_Turnstile_onoff" value="true" checked/>
<label for="CF_Turnstile_onoff" class="switch_label"></label>
<?php }else{?>
<input id="CF_Turnstile_onoff" class="switch_input" type='checkbox' name="CF_Turnstile_onoff" value="true" />
<label for="CF_Turnstile_onoff" class="switch_label"></label>
<?php }?>
</div>
<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'); } ?>">
<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'); } ?>">
<p>デモ<p>
<div class="cf-turnstile" data-sitekey="1x00000000000000000000AA" data-callback="javascriptCallback" data-language="ja"></div>
</div>
</div>
@@ -369,6 +427,7 @@ require('../logout/logout.php');
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
<script>
@@ -391,6 +450,15 @@ $(document).ready(function() {
$('#hCaptcha_onoff').change(function(){
$('#hcaptcha').toggle();
});
if ($("#CF_Turnstile_onoff").prop("checked")) {
$('#CF_Turnstile').show();
}else{
$('#CF_Turnstile').hide();
}
$('#CF_Turnstile_onoff').change(function(){
$('#CF_Turnstile').toggle();
});
});
</script>
+63 -9
View File
@@ -22,6 +22,11 @@ function createUniqId(){
function random_code($length = 8){
return substr(str_shuffle('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, $length);
}
function mb_to_gb($megabyte){
$n_mb = $megabyte / 1024;
return round($n_mb, 1);
}
require('../db.php');
@@ -208,6 +213,30 @@ $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;
}
$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_over90p = false;
}
$loadAve = sys_getloadavg()[0];
}
require('../logout/logout.php');
?>
<!DOCTYPE html>
@@ -215,13 +244,13 @@ require('../logout/logout.php');
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>サーバー概要 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -245,32 +274,32 @@ require('../logout/logout.php');
<!--(サーバーアイコン)-->
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
<div class="serverhead">
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
</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 htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
</div>
<?php }else{?>
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<?php }?>
</div>
<?php }?>
<!--(サーバーアイコンここまで)-->
<p>サーバー名</p>
<p><?php if( !empty(htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')) ){ echo htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8'); } ?></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>
<hr>
<p>サーバー紹介メッセージ</p>
<p><?php $sinfo = explode("\n", $serverinfo); foreach ($sinfo as $info) { echo nl2br(htmlspecialchars($info)); }?></p>
<p><?php $sinfo = explode("\n", $serverinfo); foreach ($sinfo as $info) { echo nl2br(htmlentities($info)); }?></p>
<hr>
<p>サーバー管理者の名前</p>
<p><?php if( !empty(htmlspecialchars($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8')) ){ echo htmlspecialchars($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8'); } ?></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>
<hr>
<p>サーバーへのお問い合わせ用メールアドレス</p>
<p><?php if( !empty(htmlspecialchars($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8')) ){ echo htmlspecialchars($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8'); } ?></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>
<hr>
<p>統計情報</p>
<div class="overview">
@@ -293,6 +322,30 @@ require('../logout/logout.php');
<p><?php echo htmlentities($count4);?></p>
</div>
</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);">
</div>
</div>
<p>使用済み : <?php echo mb_to_gb($diskUmari)."GB/".mb_to_gb($diskTotal);?>GB<br>
空き容量 : <?php echo mb_to_gb($diskFree);?>GB</p>
<hr>
<p>ロードアベレージ</p>
<div class="p2">ロードアベレージはCPUのコア数と照らし合わせて活用してください。<br>
"ロードアベレージ/CPUコア数"で計算をした時に1.0を超えると処理が重くなっています。<br>
※Windows環境ではロードアベレージの取得はできません。</div>
<?php if(empty($loadAve)){?>
<p>ロードアベレージの取得ができませんでした。</p>
<?php }else{?>
<p>過去1分間のロードアベレージ : <?php echo $loadAve?></p>
<?php };?>
</div>
</div>
</div>
@@ -300,6 +353,7 @@ require('../logout/logout.php');
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
</html>
+9 -8
View File
@@ -8,7 +8,7 @@ $serverstopfile = "../server/serverstop.txt";
$domain = $_SERVER['HTTP_HOST'];
if(!empty(file_get_contents($serverstopfile))){
$serverstop = htmlspecialchars(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
$serverstop = htmlentities(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
}else{
$serverstop = "";
}
@@ -246,13 +246,13 @@ require('../logout/logout.php');
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>プラグイン - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></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 htmlspecialchars(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'); } ?>">
<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 htmlspecialchars(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'); } ?>">
<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 htmlspecialchars(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'); } ?>">
<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 htmlspecialchars(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'); } ?>">
<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 htmlspecialchars(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'); } ?>">
<div class="p2">暗号化設定</div>
<div class="radio_btn_zone">
@@ -334,6 +334,7 @@ require('../logout/logout.php');
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
+96 -35
View File
@@ -188,6 +188,7 @@ if( !empty($_POST['role_btn_submit']) ) {
$rolename = htmlentities($_POST['rolename']);
$roleid = htmlentities($_POST['roleid']);
$rolecolor = htmlentities($_POST['rolecolor']);
$roleeffect = htmlentities($_POST['roleeffect']);
$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');
@@ -207,6 +208,20 @@ if( !empty($_POST['role_btn_submit']) ) {
$error_message[] = "ロールの色が入力されていません。(INPUT_PLEASE)";
}
if(empty($roleeffect)){
$error_message[] = "ロールに適用するエフェクトが選択されていません。(INPUT_PLEASE)";
}else{
if($roleeffect == "0"){
$save_role_effect = "none";
}
if($roleeffect == "1"){
$save_role_effect = "shine";
}
if($roleeffect == "2"){
$save_role_effect = "rainbow";
}
}
if (!empty($pdo)) {
if (empty($error_message)) {
// 書き込み日時を取得
@@ -219,12 +234,13 @@ if( !empty($_POST['role_btn_submit']) ) {
try {
// SQL作成
$stmt = $pdo->prepare("INSERT INTO role (rolename, roleauth, rolecolor, roleidname) VALUES (:rolename, :roleauth, :rolecolor, :roleidname)");
$stmt = $pdo->prepare("INSERT INTO role (rolename, roleauth, rolecolor, roleidname, roleeffect) VALUES (:rolename, :roleauth, :rolecolor, :roleidname, :roleeffect)");
$stmt->bindParam(':rolename', $rolename, PDO::PARAM_STR);
$stmt->bindParam(':roleauth', $roleauth, PDO::PARAM_STR);
$stmt->bindParam(':rolecolor', $rolecolor, PDO::PARAM_STR);
$stmt->bindParam(':roleidname', $roleid, PDO::PARAM_STR);
$stmt->bindParam(':roleeffect', $save_role_effect, PDO::PARAM_STR);
// SQLクエリの実行
$res = $stmt->execute();
@@ -420,13 +436,13 @@ if (!empty($pdo)) {
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>ロール - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
</head>
@@ -463,43 +479,87 @@ if (!empty($pdo)) {
<div class="p2">ロールの色です。<br>HEXコードで入力してください。(#はつけないでください。)</div>
<input id="rolecolor" onInput="checkForm(this)" placeholder="256238" class="inbox" type="text" name="rolecolor" maxlength="6" value="">
</div>
<div>
<div class="p2">ロールに付与するエフェクト</div>
<div class="radio_btn_zone">
<input type="radio" name="roleeffect" value="0" id="0" class="radiobtn_input" checked>
<label for="0" class="radiobtn_label">なし</label>
<input type="radio" name="roleeffect" value="1" id="1" class="radiobtn_input">
<label for="1" class="radiobtn_label">輝かせる</label>
<input type="radio" name="roleeffect" value="2" id="2" class="radiobtn_input">
<label for="2" class="radiobtn_label">枠を虹色にする</label>
</div>
</div>
<input type="submit" class = "irobutton" name="role_btn_submit" value="作成">
</form>
<div class="formarea">
<hr>
<h1>ロール付与</h1>
<p>特定のユーザーにロール付与するときに使用してください。</p>
<button id="addrole" class="irobutton">付与</button>
<hr>
<h1>ロール剥奪</h1>
<p>特定のユーザーからロールを剥奪する時に使用してください。</p>
<button id="delrole" class="irobutton">剥奪</button>
<hr>
<h1>ロール一覧</h1>
<?php if(!(empty($roles))){?>
<?php foreach ($roles as $value) {?>
<div class="server_code">
<details>
<summary><?php echo htmlentities($value["rolename"]);?></summary>
<hr>
<p>ロールのid:<?php echo htmlentities($value["roleidname"]);?></p>
<p>ロールの色:#<?php echo htmlentities($value["rolecolor"]);?></p>
<hr>
<hr>
<h1>ロール付与</h1>
<p>特定のユーザーにロール付与するときに使用してください。</p>
<button id="addrole" class="irobutton">付与</button>
<hr>
<h1>ロール剥奪</h1>
<p>特定のユーザーからロールを剥奪する時に使用してください。</p>
<button id="delrole" class="irobutton">剥奪</button>
<hr>
<h1>ロール一覧</h1>
<?php if(!(empty($roles))){?>
<?php foreach ($roles as $value) {?>
<div class="server_code">
<details>
<summary><?php echo htmlentities($value["rolename"]);?></summary>
<hr>
<p>ロールのid:<?php echo htmlentities($value["roleidname"]);?></p>
<p>ロールの色:#<?php echo htmlentities($value["rolecolor"]);?></p>
<p>ロールのエフェクト:<?php
if(htmlentities($value["roleeffect"]) == '' || htmlentities($value["roleeffect"]) == 'none'){
$role_view_effect = "なし";
}elseif(htmlentities($value["roleeffect"]) == 'shine'){
$role_view_effect = "輝かせる";
}elseif(htmlentities($value["roleeffect"]) == 'rainbow'){
$role_view_effect = "枠を虹色にする";
}else{
$role_view_effect = "不明";
}
echo $role_view_effect;
?></p>
<hr>
<div class="roleboxes">
<?php
if(htmlentities($value["roleeffect"], ENT_QUOTES, 'UTF-8', false) == '' || htmlentities($value["roleeffect"], ENT_QUOTES, 'UTF-8', false) == 'none'){
$role_view_effect = "";
}elseif(htmlentities($value["roleeffect"], ENT_QUOTES, 'UTF-8', false) == 'shine'){
$role_view_effect = "shine";
}elseif(htmlentities($value["roleeffect"], ENT_QUOTES, 'UTF-8', false) == 'rainbow'){
$role_view_effect = "rainbow";
}else{
$role_view_effect = "";
}
?>
<div class="rolebox <?php echo htmlentities($role_view_effect, ENT_QUOTES, 'UTF-8', false); ?>" style="border: 1px solid <?php echo '#' . htmlentities($value["rolecolor"], ENT_QUOTES, 'UTF-8', false); ?>;">
<p style="color: <?php echo '#' . $value["rolecolor"]; ?>;">
<?php if (!empty($value["rolename"])) { echo htmlentities($value["rolename"], ENT_QUOTES, 'UTF-8', false); }else{ echo("ロールが正常に設定されていません。");} ?>
</p>
</div>
</div>
<hr>
<form enctype="multipart/form-data" method="post">
<?php if(!($value["roleidname"] === "user" || $value["roleidname"] === "official" || $value["roleidname"] === "ice")){?>
<div class="delbox">
<p>削除ボタンを押すとこのロールは削除されます。<br>また、このロールをつけているユーザー全員からこのロールが剥奪されます。</p>
<input type="text" name="role_id" id="role_id" value="<?php echo htmlentities($value["roleidname"]);?>" style="display:none;" >
<input type="submit" name="role_del" class="delbtn" value="削除">
</div>
<?php }else{?>
<div class="delbox">
<p>このロールは削除できません。</p>
</div>
<?php }?>
</form>
<form enctype="multipart/form-data" method="post">
<?php if(!($value["roleidname"] === "user" || $value["roleidname"] === "official" || $value["roleidname"] === "ice")){?>
<div class="delbox">
<p>削除ボタンを押すとこのロールは削除されます。<br>また、このロールをつけているユーザー全員からこのロールが剥奪されます。</p>
<input type="text" name="role_id" id="role_id" value="<?php echo htmlentities($value["roleidname"]);?>" style="display:none;" >
<input type="submit" name="role_del" class="delbtn" value="削除">
</div>
<?php }else{?>
<div class="delbox">
<p>このロールは削除できません。</p>
</div>
<?php }?>
</form>
</details>
</div>
<?php }?>
@@ -546,6 +606,7 @@ if (!empty($pdo)) {
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
<script type="text/javascript">
+13 -12
View File
@@ -347,13 +347,13 @@ require('../logout/logout.php');
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>サーバー設定 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -377,17 +377,17 @@ require('../logout/logout.php');
<!--(サーバーアイコン)-->
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
<div class="serverhead_set">
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
</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 htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
</div>
<?php }else{?>
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<?php }?>
</div>
<?php }?>
@@ -395,12 +395,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 htmlspecialchars($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'); } ?>">
</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 htmlspecialchars($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'); } ?>">
</div>
<div>
@@ -419,9 +419,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 htmlspecialchars($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'); } ?>">
<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 htmlspecialchars($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'); } ?>">
</div>
<script>
if ($("#serverlogo_onoff").prop("checked")) {
@@ -437,7 +437,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 htmlspecialchars($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'); } ?>">
</div>
<div>
@@ -449,13 +449,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 htmlspecialchars($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'); } ?>">
</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 htmlspecialchars($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'); } ?>">
</div>
<div>
@@ -515,6 +515,7 @@ require('../logout/logout.php');
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
+4 -3
View File
@@ -290,13 +290,13 @@ if (!empty($pdo)) {
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>ユーザー管理 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></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 htmlspecialchars($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'); } ?>">
</div>
<input type="submit" class = "irobutton" name="btn_submit" value="検索">
@@ -375,6 +375,7 @@ if (!empty($pdo)) {
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
+27 -15
View File
@@ -201,7 +201,7 @@ if (!empty($pdo)) {
$roleDataArray = array();
foreach ($roles as $roleId) {
$rerole = $dbh->prepare("SELECT rolename, roleauth, rolecolor FROM role WHERE roleidname = :role");
$rerole = $dbh->prepare("SELECT rolename, roleauth, rolecolor, roleeffect FROM role WHERE roleidname = :role");
$rerole->bindValue(':role', $roleId);
$rerole->execute();
$roleDataArray[$roleId] = $rerole->fetch();
@@ -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 = "お使いの".htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントは凍結されました";
$mail_text = "".$userdata["username"]."(".$userdata["userid"].")さん いつもuwuzuをご利用いただきありがとうございます。 ご利用のアカウント(".$userdata["userid"].")が".htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."管理者により凍結されたためお知らせいたします。 サービス管理者からのメッセージは以下のものです。 ". $notice_msg ." 異議申し立てする場合は[".htmlspecialchars($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8')."]まで異議申し立てをする旨を記載し送信をしてください。";
$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')."]まで異議申し立てをする旨を記載し送信をしてください。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
}
@@ -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 = "お使いの".htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントは解凍されました!";
$mail_title = "お使いの".htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントは解凍されました!";
$mail_text = "".$userdata["username"]."(".$userdata["userid"].")さん いつもuwuzuをご利用いただきありがとうございます。 ご利用のアカウント(".$userdata["userid"].")が解凍されたためお知らせいたします。 今後、ご利用のuwuzuアカウントは今まで通りご利用いただけます。 また、APIを使用している方はAPIのトークンがリセットされているため再度トークンを発行してご利用ください。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
@@ -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 = "お使いの".htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントはBANされました";
$mail_text = "".$userdata["username"]."(".$userdata["userid"].")さん いつもuwuzuをご利用いただきありがとうございます。 この度、ご利用のアカウント(".$userdata["userid"].")が".htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."管理者によりBAN(削除)されたためお知らせいたします。 今後は今までご利用いただいた".htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."アカウントは利用できません。 ".htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')."サーバー上から今までご利用いただいていたアカウントの情報は削除されたためログインなどもできません。 ご理解とご協力のほどよろしくお願いします。";
$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')."サーバー上から今までご利用いただいていたアカウントの情報は削除されたためログインなどもできません。 ご理解とご協力のほどよろしくお願いします。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
}
@@ -570,13 +570,13 @@ require('../logout/logout.php');
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="../js/jquery-min.js"></script>
<script src="../js/unsupported.js"></script>
<script src="../js/console_notice.js"></script>
<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 htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
<title>ユーザー管理 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
</head>
@@ -607,9 +607,20 @@ require('../logout/logout.php');
<div class="roleboxes">
<?php foreach ($roles as $roleId): ?>
<?php $roleData = $roleDataArray[$roleId]; ?>
<div class="rolebox" style="border: 1px solid <?php echo '#' . $roleData["rolecolor"]; ?>;">
<?php
if(htmlentities($roleData["roleeffect"], ENT_QUOTES, 'UTF-8', false) == '' || htmlentities($roleData["roleeffect"], ENT_QUOTES, 'UTF-8', false) == 'none'){
$role_view_effect = "";
}elseif(htmlentities($roleData["roleeffect"], ENT_QUOTES, 'UTF-8', false) == 'shine'){
$role_view_effect = "shine";
}elseif(htmlentities($roleData["roleeffect"], ENT_QUOTES, 'UTF-8', false) == 'rainbow'){
$role_view_effect = "rainbow";
}else{
$role_view_effect = "";
}
?>
<div class="rolebox <?php echo htmlentities($role_view_effect, ENT_QUOTES, 'UTF-8', false); ?>" style="border: 1px solid <?php echo '#' . htmlentities($roleData["rolecolor"], ENT_QUOTES, 'UTF-8', false); ?>;">
<p style="color: <?php echo '#' . $roleData["rolecolor"]; ?>;">
<?php if (!empty($roleData["rolename"])) { echo htmlentities($roleData["rolename"], ENT_QUOTES, 'UTF-8'); } ?>
<?php if (!empty($roleData["rolename"])) { echo htmlentities($roleData["rolename"], ENT_QUOTES, 'UTF-8', false); }else{ echo("ロールが正常に設定されていません。");} ?>
</p>
</div>
<?php endforeach; ?>
@@ -618,12 +629,12 @@ require('../logout/logout.php');
<div class="profile">
<div class="p2">プロフィール</div>
<p><?php echo nl2br(htmlspecialchars($userdata["profile"], ENT_QUOTES, 'UTF-8')); ?></p>
<p><?php echo nl2br(htmlentities($userdata["profile"], ENT_QUOTES, 'UTF-8')); ?></p>
</div>
<hr>
<div class="about">
<div class="p2">メールアドレス</div>
<p><?php if( !empty($userdata["mailadds"]) ){ echo htmlspecialchars($userdata["mailadds"], ENT_QUOTES, 'UTF-8'); }else{echo "未設定";} ?></p>
<p><?php if( !empty($userdata["mailadds"]) ){ echo htmlentities($userdata["mailadds"], ENT_QUOTES, 'UTF-8'); }else{echo "未設定";} ?></p>
<hr>
<div class="p2">二段階認証</div>
<p><?php if( !empty($userdata["authcode"]) ){ echo "設定済み";}else{echo "未設定";} ?></p>
@@ -632,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 htmlspecialchars($followCount, ENT_QUOTES, 'UTF-8');}else{echo "なし";} ?></p>
<p><?php if( $followCount > 0 ){ echo htmlentities($followCount, ENT_QUOTES, 'UTF-8');}else{echo "なし";} ?></p>
<div class="p2">フォロワー数</div>
<p><?php if( $followerCount > 0 ){ echo htmlspecialchars($followerCount, ENT_QUOTES, 'UTF-8');}else{echo "なし";} ?></p>
<p><?php if( $followerCount > 0 ){ echo htmlentities($followerCount, ENT_QUOTES, 'UTF-8');}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 htmlspecialchars($userdata["datetime"], ENT_QUOTES, 'UTF-8'); ?></p>
<p><?php echo htmlentities($userdata["datetime"], ENT_QUOTES, 'UTF-8'); ?></p>
<hr>
<div class="p2">アカウント操作</div>
<div class="banzone">
@@ -698,6 +709,7 @@ require('../logout/logout.php');
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
<?php require('../require/noscript_modal.php');?>
</body>
<script>