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

uwuzu v1.3.0 new_planet

This commit is contained in:
Daichimarukana
2024-02-24 19:17:08 +09:00
parent 29c46fcc4e
commit 1597041471
115 changed files with 5655 additions and 2252 deletions
+49 -45
View File
@@ -192,65 +192,67 @@ if( !empty($_POST['ads_btn_submit']) ) {
$ads_memo = htmlentities($_POST['ads_memo']);
if(empty($ads_url)){
$error_message[] = "URLが入力されていません。";
$error_message[] = "URLが入力されていません。(INPUT_PLEASE)";
}
if(empty($ads_img_url)){
$error_message[] = "画像のURLが入力されていません。";
$error_message[] = "画像のURLが入力されていません。(INPUT_PLEASE)";
}
if(empty($ads_start_url)){
$error_message[] = "設置開始日時が入力されていません。";
$error_message[] = "設置開始日時が入力されていません。(INPUT_PLEASE)";
}
if(empty($ads_limit_url)){
$error_message[] = "設置終了日時が入力されていません。";
$error_message[] = "設置終了日時が入力されていません。(INPUT_PLEASE)";
}
if(empty($ads_memo_url)){
$error_message[] = "メモが入力されていません。";
$error_message[] = "メモが入力されていません。(INPUT_PLEASE)";
}
if (!empty($pdo)) {
// 書き込み日時を取得
$datetime = date("Y-m-d H:i:s");
$uniqid = createUniqId();
if(empty($error_message)){
if (!empty($pdo)) {
// 書き込み日時を取得
$datetime = date("Y-m-d H:i:s");
$uniqid = createUniqId();
// トランザクション開始
$pdo->beginTransaction();
// トランザクション開始
$pdo->beginTransaction();
try {
try {
// SQL作成
$stmt = $pdo->prepare("INSERT INTO ads (uniqid, url, image_url, memo, start_date, limit_date, datetime) VALUES (:uniqid, :url, :image_url, :memo, :start_date, :limit_date, :datetime)");
$stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR);
$stmt->bindParam(':url', $ads_url, PDO::PARAM_STR);
$stmt->bindParam(':image_url', $ads_img_url, PDO::PARAM_STR);
$stmt->bindParam(':memo', $ads_memo, PDO::PARAM_STR);
$stmt->bindParam(':start_date', $ads_start_date, PDO::PARAM_STR);
$stmt->bindParam(':limit_date', $ads_limit_date, PDO::PARAM_STR);
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
// SQL作成
$stmt = $pdo->prepare("INSERT INTO ads (uniqid, url, image_url, memo, start_date, limit_date, datetime) VALUES (:uniqid, :url, :image_url, :memo, :start_date, :limit_date, :datetime)");
$stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR);
$stmt->bindParam(':url', $ads_url, PDO::PARAM_STR);
$stmt->bindParam(':image_url', $ads_img_url, PDO::PARAM_STR);
$stmt->bindParam(':memo', $ads_memo, PDO::PARAM_STR);
$stmt->bindParam(':start_date', $ads_start_date, PDO::PARAM_STR);
$stmt->bindParam(':limit_date', $ads_limit_date, PDO::PARAM_STR);
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
// SQLクエリの実行
$res = $stmt->execute();
// SQLクエリの実行
$res = $stmt->execute();
// コミット
$res = $pdo->commit();
// コミット
$res = $pdo->commit();
} catch(Exception $e) {
} catch(Exception $e) {
// エラーが発生した時はロールバック
$pdo->rollBack();
}
if( $res ) {
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location:".$url."");
exit;
} else {
$error_message[] = $e->getMessage();
}
// プリペアドステートメントを削除
$stmt = null;
// エラーが発生した時はロールバック
$pdo->rollBack();
}
if( $res ) {
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location:".$url."");
exit;
} else {
$error_message[] = $e->getMessage();
}
// プリペアドステートメントを削除
$stmt = null;
}
}
if( !empty($_POST['ads_del']) ) {
@@ -303,10 +305,10 @@ if (!empty($pdo)) {
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
@@ -393,8 +395,10 @@ if (!empty($pdo)) {
</form>
</details>
</div>
<?php }?>
<?php }else{?>
<div class="tokonone" id="noueuse"><p>広告がありません</p></div>
<?php }?>
<?php }?>
</div>
</div>
</div>
+449
View File
@@ -0,0 +1,449 @@
<?php
$serversettings_file = "../server/serversettings.ini";
$serversettings = parse_ini_file($serversettings_file, true);
function createUniqId(){
list($msec, $sec) = explode(" ", microtime());
$hashCreateTime = $sec.floor($msec*1000000);
$hashCreateTime = strrev($hashCreateTime);
return base_convert($hashCreateTime,10,36);
}
require('../db.php');
//関数呼び出し
//- EXIF
require('../function/function.php');
// 変数の初期化
$datetime = array();
$user_name = null;
$message = array();
$message_data = null;
$error_message = array();
$pdo = null;
$stmt = null;
$res = null;
$option = null;
session_name('uwuzu_s_id');
session_set_cookie_params(0, '', '', true, true);
session_start();
session_regenerate_id(true);
try {
$option = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::MYSQL_ATTR_MULTI_STATEMENTS => false
);
$pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
} catch(PDOException $e) {
// 接続エラーのときエラー内容を取得する
$error_message[] = $e->getMessage();
}
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
$passQuery->execute();
$res = $passQuery->fetch();
if(empty($res["userid"])){
header("Location: ../login.php");
exit;
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] == $res["userid"]){
// セッションに値をセット
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
$loginid = htmlentities($res["loginid"]);
$role = htmlentities($res["role"]);
$sacinfo = htmlentities($res["sacinfo"]);
$myblocklist = htmlentities($res["blocklist"]);
$myfollowlist = htmlentities($res["follow"]);
$_SESSION['admin_login'] = true;
$_SESSION['userid'] = $userid;
$_SESSION['username'] = $username;
$_SESSION['loginid'] = $res["loginid"];
setcookie('userid', $userid, [
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('username', $username,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('loginid', $res["loginid"],[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('admin_login', true,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
}else{
header("Location: ../login.php");
exit;
}
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
$passQuery->execute();
$res = $passQuery->fetch();
if(empty($res["userid"])){
header("Location: ../login.php");
exit;
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] == $res["userid"]){
// セッションに値をセット
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
$username = htmlentities($res['username']); // クッキーから取得した値をセット
$loginid = htmlentities($res["loginid"]);
$role = htmlentities($res["role"]);
$sacinfo = htmlentities($res["sacinfo"]);
$myblocklist = htmlentities($res["blocklist"]);
$myfollowlist = htmlentities($res["follow"]);
$_SESSION['admin_login'] = true;
$_SESSION['userid'] = $userid;
$_SESSION['username'] = $username;
$_SESSION['loginid'] = $res["loginid"];
setcookie('userid', $userid,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('username', $username,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('loginid', $res["loginid"],[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('admin_login', true,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
}else{
header("Location: ../login.php");
exit;
}
} else {
// ログインが許可されていない場合、ログインページにリダイレクト
header("Location: ../login.php");
exit;
}
if(empty($userid)){
header("Location: ../login.php");
exit;
}
if(empty($username)){
header("Location: ../login.php");
exit;
}
if(!($res["admin"] === "yes")){
header("Location: ../login.php");
exit;
}
$notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'");
$notiQuery->bindValue(':userid', $userid);
$notiQuery->execute();
$notiData = $notiQuery->fetch(PDO::FETCH_ASSOC);
$notificationcount = $notiData['notification_count'];
if( !empty($pdo) ) {
// データベース接続の設定
$dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
));
$userQuery = $dbh->prepare("SELECT username, userid, profile, role FROM account WHERE userid = :userid");
$userQuery->bindValue(':userid', $userid);
$userQuery->execute();
$userData = $userQuery->fetch();
$role = $userData["role"];
$dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
$rerole = $dbh->prepare("SELECT username, userid, password, mailadds, profile, iconname, headname, role, datetime FROM account WHERE userid = :userid");
$rerole->bindValue(':userid', $userid);
// SQL実行
$rerole->execute();
$userdata = $rerole->fetch(); // ここでデータベースから取得した値を $role に代入する
}
if( !empty($_POST['btn_submit']) ) {
$emojiname = $_POST['emojiname'];
$emojiinfo = $_POST['emojiinfo'];
if (!empty($_FILES['image']['name'])) {
// アップロードされたファイル情報
$uploadedFile = $_FILES['image'];
// アップロードされたファイルの拡張子を取得
$extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION);
// 新しいファイル名を生成(uniqid + 拡張子)
$newFilename = uniqid() . '.' . $extension;
// 保存先のパスを生成
$uploadedPath = 'emojiimage/' . $newFilename;
// ファイルを移動
$result = move_uploaded_file($uploadedFile['tmp_name'], '../'.$uploadedPath);
// EXIF削除
delete_exif($extension2, $uploadedPath2);
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[] = '画像を選択してください';
}
$options = array(
// SQL実行失敗時に例外をスルー
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
// デフォルトフェッチモードを連想配列形式に設定
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
// バッファードクエリを使う(一度に結果セットを全て取得し、サーバー負荷を軽減)
// SELECTで得た結果に対してもrowCountメソッドを使えるようにする
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
);
$dbh = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
$query = $dbh->prepare('SELECT * FROM emoji WHERE emojiname = :emojiname limit 1');
$query->execute(array(':emojiname' => $emojiname));
$result = $query->fetch();
// IDの入力チェック
if( empty($emojiname) ) {
$error_message[] = '絵文字IDを入力してください!(EMOJI_ID_INPUT_PLEASE)';
} else {
// 文字数を確認
if( 20 < mb_strlen($emojiname, 'UTF-8') ) {
$error_message[] = 'IDは20文字以内で入力してください。(EMOJI_ID_OVER_MAX_COUNT)';
}
if($result > 0){
$error_message[] = 'このID('.$emojiname.')は既に使用されています。他のIDを作成してください。(EMOJI_ID_SHIYOUZUMI)'; //このE-mailは既に使用されています。
}
}
if( empty($error_message) ) {
// 書き込み日時を取得
$datetime = date("Y-m-d H:i:s");
// トランザクション開始
$pdo->beginTransaction();
try {
// SQL作成
$stmt = $pdo->prepare("INSERT INTO emoji (emojifile, emojiname, emojiinfo, emojidate) VALUES ( :emojifile, :emojiname, :emojiinfo, :emojidate)");
$stmt->bindValue(':emojifile', $emoji_path, PDO::PARAM_STR);
// 値をセット
$stmt->bindParam( ':emojiname', $emojiname, PDO::PARAM_STR);
$stmt->bindParam( ':emojiinfo', $emojiinfo, PDO::PARAM_STR);
$stmt->bindParam( ':emojidate', $datetime, PDO::PARAM_STR);
// SQLクエリの実行
$res = $stmt->execute();
// コミット
$res = $pdo->commit();
} catch(Exception $e) {
// エラーが発生した時はロールバック
$pdo->rollBack();
}
if( $res ) {
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location:".$url."");
exit;
} else {
$error_message[] = '登録に失敗しました。(REGISTERED_DAME)';
}
// プリペアドステートメントを削除
$stmt = null;
}
}
require('../logout/logout.php');
// データベースの接続を閉じる
$pdo = null;
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css">
<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>
<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>
</head>
<body>
<?php require('../require/leftbox.php');?>
<main>
<div class="admin_settings">
<?php require('settings_left_menu.php');?>
<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; ?>
<form class="formarea" enctype="multipart/form-data" method="post">
<h1>絵文字登録</h1>
<p>絵文字登録です。</p>
<div id="wrap">
<label class="irobutton" for="file_upload">ファイル選択
<input type="file" id="file_upload" name="image" >
</label>
</div>
<!--ユーザーネーム関係-->
<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'); } ?>">
</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'); } ?>">
</div>
<div>
<input type="submit" class = "irobutton" name="btn_submit" value="登録">
</div>
</form>
</div>
</div>
</main>
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
</body>
<script type="text/javascript">
function checkForm(inputElement) {
var str = inputElement.value;
while (str.match(/[^A-Za-z\d_]/)) {
str = str.replace(/[^A-Za-z\d_]/, "");
}
inputElement.value = str;
}
window.addEventListener('DOMContentLoaded', function(){
// ファイルが選択されたら実行
document.getElementById("file_upload").addEventListener('change', function(e){
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.readAsText(e.target.files[0]);
});
});
</script>
</html>
+4 -4
View File
@@ -262,7 +262,7 @@ if( !empty($_POST['code_btn_submit']) ) {
header("Location:".$url."");
exit;
} else {
$error_message[] = '発行に失敗しました。';
$error_message[] = '発行に失敗しました。(REGISTERED_DAME)';
}
// プリペアドステートメントを削除
@@ -274,10 +274,10 @@ require('../logout/logout.php');
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
+3 -3
View File
@@ -261,10 +261,10 @@ require('../logout/logout.php');
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
+3 -3
View File
@@ -283,10 +283,10 @@ require('../logout/logout.php');
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
+4 -4
View File
@@ -268,10 +268,10 @@ require('../logout/logout.php');
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
@@ -311,7 +311,7 @@ require('../logout/logout.php');
<div>
<p>投稿の最大文字数</p>
<div class="p2">ここで設定した文字数までの投稿が可能です。<br>なお、データベースより最大文字数を設定している場合そちらが優先されて使用されます。<br>1文字から16777216文字の間で設定が可能です。</div>
<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'); } ?>">
</div>
+20 -7
View File
@@ -214,10 +214,10 @@ require('../logout/logout.php');
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
@@ -242,11 +242,24 @@ require('../logout/logout.php');
<div class="admin_right">
<div class="formarea">
<h1>サーバー概要</h1>
<?php if( !empty(htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8')) ){ ?>
<div class="servericon">
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
</div>
<!--(サーバーアイコン)-->
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
<div class="serverhead">
<img src="<?php echo htmlspecialchars($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'); ?>">
</div>
<?php }else{?>
<img src="<?php echo htmlspecialchars($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>
<hr>
+363
View File
@@ -0,0 +1,363 @@
<?php
$serversettings_file = "../server/serversettings.ini";
$serversettings = parse_ini_file($serversettings_file, true);
$serverstopfile = "../server/serverstop.txt";
$domain = $_SERVER['HTTP_HOST'];
if(!empty(file_get_contents($serverstopfile))){
$serverstop = htmlspecialchars(file_get_contents($serverstopfile), ENT_QUOTES, 'UTF-8');
}else{
$serverstop = "";
}
function createUniqId(){
list($msec, $sec) = explode(" ", microtime());
$hashCreateTime = $sec.floor($msec*1000000);
$hashCreateTime = strrev($hashCreateTime);
return base_convert($hashCreateTime,10,36);
}
function random_code($length = 8){
return substr(str_shuffle('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, $length);
}
// 変数の初期化
$datetime = array();
$user_name = null;
$message = array();
$message_data = null;
$error_message = array();
$pdo = null;
$stmt = null;
$res = null;
$option = null;
require('../db.php');
//phpmailer--------------------------------------------
require('plugin_settings/phpmailer_settings.php');
require('plugin_settings/phpmailer_sender.php');
//------------------------------------------------------
session_name('uwuzu_s_id');
session_set_cookie_params(0, '', '', true, true);
session_start();
session_regenerate_id(true);
try {
$option = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::MYSQL_ATTR_MULTI_STATEMENTS => false
);
$pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
} catch(PDOException $e) {
// 接続エラーのときエラー内容を取得する
$error_message[] = $e->getMessage();
}
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
$passQuery->bindValue(':userid', htmlentities($_SESSION['userid']));
$passQuery->execute();
$res = $passQuery->fetch();
if(empty($res["userid"])){
header("Location: ../login.php");
exit;
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] == $res["userid"]){
// セッションに値をセット
$userid = htmlentities($res['userid']); // セッションに格納されている値をそのままセット
$username = htmlentities($res['username']); // セッションに格納されている値をそのままセット
$loginid = htmlentities($res["loginid"]);
$role = htmlentities($res["role"]);
$sacinfo = htmlentities($res["sacinfo"]);
$myblocklist = htmlentities($res["blocklist"]);
$myfollowlist = htmlentities($res["follow"]);
$_SESSION['admin_login'] = true;
$_SESSION['userid'] = $userid;
$_SESSION['username'] = $username;
$_SESSION['loginid'] = $res["loginid"];
setcookie('userid', $userid, [
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('username', $username,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('loginid', $res["loginid"],[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('admin_login', true,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
}else{
header("Location: ../login.php");
exit;
}
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
$passQuery->bindValue(':userid', htmlentities($_COOKIE['userid']));
$passQuery->execute();
$res = $passQuery->fetch();
if(empty($res["userid"])){
header("Location: ../login.php");
exit;
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] == $res["userid"]){
// セッションに値をセット
$userid = htmlentities($res['userid']); // クッキーから取得した値をセット
$username = htmlentities($res['username']); // クッキーから取得した値をセット
$loginid = htmlentities($res["loginid"]);
$role = htmlentities($res["role"]);
$sacinfo = htmlentities($res["sacinfo"]);
$myblocklist = htmlentities($res["blocklist"]);
$myfollowlist = htmlentities($res["follow"]);
$_SESSION['admin_login'] = true;
$_SESSION['userid'] = $userid;
$_SESSION['username'] = $username;
$_SESSION['loginid'] = $res["loginid"];
setcookie('userid', $userid,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('username', $username,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('loginid', $res["loginid"],[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
setcookie('admin_login', true,[
'expires' => time() + 60 * 60 * 24 * 14,
'path' => '/',
'samesite' => 'lax',
'secure' => true,
'httponly' => true,
]);
}else{
header("Location: ../login.php");
exit;
}
} else {
// ログインが許可されていない場合、ログインページにリダイレクト
header("Location: ../login.php");
exit;
}
if(empty($userid)){
header("Location: ../login.php");
exit;
}
if(empty($username)){
header("Location: ../login.php");
exit;
}
if(!($res["admin"] === "yes")){
header("Location: ../login.php");
exit;
}
$notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'");
$notiQuery->bindValue(':userid', $userid);
$notiQuery->execute();
$notiData = $notiQuery->fetch(PDO::FETCH_ASSOC);
$notificationcount = $notiData['notification_count'];
if( !empty($_POST['btn_submit']) ) {
$N_MAIL_ONOFF = $_POST['mailchks_onoff'];
$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_SSL_ = $_POST['ssl_tls_none'];
$New_Mail_Settings = "
<?php // メールサーバーの情報
define( 'MAIL_CHKS', '".htmlentities($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_)."');
?>
";
//設定上書き
$file = fopen('plugin_settings/phpmailer_settings.php', 'w');
$data = $New_Mail_Settings;
fputs($file, $data);
fclose($file);
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location:".$url."");
exit;
}
if( !empty($_POST['testmail_send_btn_submit']) ) {
$test_mail_adds = $_POST['test_sender_adds'];
$mail_title = "Test email";
$mail_text = "これはuwuzuのテストメールです。 問題なく受信できていますか?";
$error_message = send_html_mail($test_mail_adds,$mail_title,$mail_text,"../");
}
require('../logout/logout.php');
?>
<!DOCTYPE html>
<html lang="ja">
<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/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>
</head>
<body>
<?php require('../require/leftbox.php');?>
<main>
<?php if( !empty($error_message) ): ?>
<ul class="errmsg">
<?php foreach( $error_message as $value ): ?>
<p>・ <?php echo $value; ?></p>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<div class="admin_settings">
<?php require('settings_left_menu.php');?>
<div class="admin_right">
<form class="formarea" enctype="multipart/form-data" method="post">
<h1>プラグイン</h1>
<p>PHPMailerなどとの連携が可能です。</p>
<div>
<p>自動メールプラグイン</p>
<div class="p2">PHPMailerと連携し、パスワードリセット時やログイン通知などを自動送信することができます。<br>SMTP送信のみ対応です。<br><b>pluginフォルダに解凍済みのPHPMailerのファイル一式が入っていることが必須要件になります。</b><br>plugin/PHPMailer/README.MDなど一式</div>
<p>自動メールプラグインのオンオフ</p>
<div class="switch_button">
<?php if(!empty(MAIL_CHKS && MAIL_CHKS == "true")){?>
<input id="mailchks_onoff" class="switch_input" type='checkbox' name="mailchks_onoff" value="true" checked/>
<label for="mailchks_onoff" class="switch_label"></label>
<?php }else{?>
<input id="mailchks_onoff" class="switch_input" type='checkbox' name="mailchks_onoff" value="true" />
<label for="mailchks_onoff" class="switch_label"></label>
<?php }?>
</div>
<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'); } ?>">
<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'); } ?>">
<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'); } ?>">
<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'); } ?>">
<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'); } ?>">
<div class="p2">暗号化設定</div>
<div class="radio_btn_zone">
<input type="radio" name="ssl_tls_none" value="SSL" id="SSL" class="radiobtn_input" <?php if(!empty(MAIL_SSL_ && MAIL_SSL_ == "SSL")){echo "checked";}?>>
<label for="SSL" class="radiobtn_label">SSL</label>
<input type="radio" name="ssl_tls_none" value="TLS" id="TLS" class="radiobtn_input" <?php if(!empty(MAIL_SSL_ && MAIL_SSL_ == "TLS")){echo "checked";}?>>
<label for="TLS" class="radiobtn_label">TLS</label>
<input type="radio" name="ssl_tls_none" value="NONE" id="NONE" class="radiobtn_input" <?php if(!empty(MAIL_SSL_ && MAIL_SSL_ == "NONE")){echo "checked";}?>>
<label for="NONE" class="radiobtn_label">なし</label>
</div>
</div>
</div>
<input type="submit" class = "irobutton" name="btn_submit" value="保存&更新">
</form>
<?php if(!empty(MAIL_CHKS && MAIL_CHKS == "true")){?>
<form class="formarea" enctype="multipart/form-data" method="post">
<div id="mail_plugin_chk">
<p>メールテスト送信</p>
<input id="mail_plugin" placeholder="admin@localhost" class="inbox" type="text" name="test_sender_adds" value="">
<input type="submit" class = "irobutton" name="testmail_send_btn_submit" value="テスト送信">
</div>
</form>
<?php }?>
</div>
</div>
</main>
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
</body>
</html>
<script>
$(function(){
$("input"). keydown(function(e) {
if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) {
return false;
} else {
return true;
}
});
});
if ($("#mailchks_onoff").prop("checked")) {
$('#mail_plugin').show();
$('#mail_plugin_chk').show();
}else{
$('#mail_plugin').hide();
$('#mail_plugin_chk').hide();
}
$('#mailchks_onoff').change(function(){
$('#mail_plugin').toggle();
$('#mail_plugin_chk').toggle();
});
</script>
@@ -0,0 +1,105 @@
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\SMTP;
function send_html_mail($mailadds,$mailtitle,$mailtext,$server_file_backslash){
if(!empty(MAIL_CHKS && MAIL_CHKS == "true")){
if(file_exists("".$server_file_backslash."plugin/PHPMailer/")){
require(''.$server_file_backslash.'plugin/PHPMailer/src/PHPMailer.php');
require(''.$server_file_backslash.'plugin/PHPMailer/src/Exception.php');
require(''.$server_file_backslash.'plugin/PHPMailer/src/SMTP.php');
}else{
$error_message[] = "pluginフォルダにPHPMailerがありません<br>ファイル名などをお間違いではありませんか?(PLUGIN_NOT_FOUND)";
}
}else{
$error_message[] = "メール送信プラグインは無効です。(PLUGIN_MUKOU)";
}
$serversettings = parse_ini_file("".$server_file_backslash."server/serversettings.ini", true);
$domain = $_SERVER['HTTP_HOST'];
$mail_adds = htmlentities($mailadds);
$mail_title = htmlentities($mailtitle);
$x_mailtext = htmlentities($mailtext);
$mail_text = str_replace( ' ', '<br>', $x_mailtext );
if(!(filter_var($mail_adds, FILTER_VALIDATE_EMAIL))){
$error_message[] = 'メールアドレスが正しくありません...(MAILADDS_CHECK_DAME)';
}
if(empty($error_message)){
if(htmlentities(MAIL_SSL_) == "NONE"){
$Mail_SSL = false;
}elseif(htmlentities(MAIL_SSL_) == "SSL"){
$Mail_SSL = "ssl";
}elseif(htmlentities(MAIL_SSL_) == "TLS"){
$Mail_SSL = "tls";
}
$s_name = htmlspecialchars($serversettings['serverinfo']['server_name'], ENT_QUOTES, 'UTF-8');
$now_date = date("Y-m-d H:i:s");
$logo_path = htmlspecialchars($serversettings["serverinfo"]["server_logo_login"], ENT_QUOTES, 'UTF-8');
if(empty($logo_path)){
$logo_path = "https://".$domain."/img/uwuzulogo.svg";
}
mb_language('uni');
mb_internal_encoding('UTF-8');
$mail = new PHPMailer(true);
$mail->CharSet = 'utf-8';
try {
// SMTPサーバの設定
$mail->isSMTP(); // SMTPの使用宣言
$mail->Host = htmlentities(MAIL_HOST); // SMTPサーバーを指定
$mail->SMTPAuth = true; // SMTP authenticationを有効化
$mail->Username = htmlentities(MAIL_USER); // SMTPサーバーのユーザ名
$mail->Password = htmlentities(MAIL_PASS); // SMTPサーバーのパスワード
$mail->SMTPSecure = $Mail_SSL; // 暗号化を有効(tls or ssl)無効の場合はfalse
$mail->Port = (int)htmlentities(MAIL_PORT); // TCPポートを指定(tlsの場合は465や587)
$mail->setFrom(htmlentities(MAIL_ADDS), htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')); // 送信者
$mail->addAddress(htmlentities($mail_adds)); // 宛先
$mail->addReplyTo(htmlspecialchars($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8'), 'お問い合わせ'); // 返信先
$mail->Sender = htmlspecialchars($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8'); // Return-path
// 送信内容設定
$mail->isHTML(true);
$mail->Subject = $mail_title;
$mail->Body = <<<EOD
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<div class="header" style="background-color:#FFC832; width:100%; height: 48px;">
<a href="https://{$domain}"><img src="{$logo_path}" style="height: 32px;width:auto;margin-top:8px; margin-left:12px; margin-bottom:8px;"></a>
</div>
<body style="width: 100%;">
<main>
<h1 style="margin-left:12px; margin-right:12px; font-family: 'BIZ UDPGothic', sans-serif; font-weight: bold;font-size: 32px;text-align: left;color: #252525;">{$mail_title}</h1>
<p style="margin-left:12px; margin-right:12px; font-family: 'BIZ UDPGothic', sans-serif; font-weight: normal;font-size: 16px; line-height: 125%; text-align: left;color: #252525;">{$mail_text}</p>
<a href="https://{$domain}" style="margin-left:12px; margin-right:12px; font-family: 'BIZ UDPGothic', sans-serif; font-weight: normal;font-size: 16px;text-align: left;color: #4e4428;">{$s_name}</a>
<p style="margin-right:12px; margin-left:12px; font-family: 'BIZ UDPGothic', sans-serif; font-weight: normal;font-size: 16px;text-align: left;color: #252525;">{$now_date}</p>
</main>
</body
</html>
EOD;
// 送信
$mail->send();
} catch (Exception $e) {
// エラーの場合
$error_message[] = "PHPMailer Error:<br> ".$mail->ErrorInfo."";
}
}
return $error_message;
}
?>
@@ -0,0 +1,12 @@
<?php // メールサーバーの情報
define( 'MAIL_CHKS', 'false');// trueならPHPMailerが有効
define( 'MAIL_ADDS', '');
define( 'MAIL_HOST', '');
define( 'MAIL_PORT', '');
define( 'MAIL_USER', '');
define( 'MAIL_PASS', '');
define( 'MAIL_SSL_', '');
?>
+126 -25
View File
@@ -195,16 +195,16 @@ if( !empty($_POST['role_btn_submit']) ) {
$result3 = $query->fetch();
if(empty($rolename)){
$error_message[] = "ロール名が入力されていません。";
$error_message[] = "ロール名が入力されていません。(INPUT_PLEASE)";
}
if(empty($roleid)){
$error_message[] = "ロールのidが入力されていません。";
$error_message[] = "ロールのidが入力されていません。(ROLE_ID_INPUT_PLEASE)";
}elseif($result3 > 0){
$error_message[] = 'このロールのid('.$roleid.')は既に使用されています。他のidを作成してください。';
$error_message[] = 'このロールのid('.$roleid.')は既に使用されています。他のidを作成してください。(ROLE_ID_SHIYOUZUMI)';
}
if(empty($rolecolor)){
$error_message[] = "ロールの色が入力されていません。";
$error_message[] = "ロールの色が入力されていません。(INPUT_PLEASE)";
}
if (!empty($pdo)) {
@@ -260,17 +260,26 @@ if( !empty($_POST['role_del']) ) {
$deleteQuery->bindValue(':roleid', $role_id, PDO::PARAM_STR);
$res = $deleteQuery->execute();
try{
// ロールを削除したい全てのアカウントを取得
$query = $pdo->prepare("SELECT * FROM account WHERE role LIKE :pattern1 OR role LIKE :pattern2 OR role LIKE :pattern3");
$query->bindValue(':pattern1', "%,$role_id,%", PDO::PARAM_STR);
$query->bindValue(':pattern2', "%,$role_id", PDO::PARAM_STR);
$query->bindValue(':pattern3', "$role_id,%", PDO::PARAM_STR);
$query->execute();
$accounts = $query->fetchAll();
foreach ($accounts as $account) {
// フォローの更新
$updateFollowQuery = $pdo->prepare("UPDATE account SET role = REPLACE(role, :roleid, '') WHERE role LIKE :pattern");
$updateFollowQuery->bindValue(':roleid', ",$role_id", PDO::PARAM_STR);
$updateFollowQuery->bindValue(':pattern', "%,$role_id%", PDO::PARAM_STR);
$res = $updateFollowQuery->execute();
} catch (Exception $e) {
// エラーが発生した時はロールバック
$pdo->rollBack();
if (strpos($account['role'], ",$role_id,") !== false || strpos($account['role'], ",$role_id") !== false || strpos($account['role'], "$role_id,") !== false) {
$delrole_roleList = explode(',', $account['role']);
$delrole_roleList = array_diff($delrole_roleList, array($role_id));
$new_delrole_roleList = implode(',', $delrole_roleList);
$updateroleQuery = $pdo->prepare("UPDATE account SET role = :role WHERE userid = :userid");
$updateroleQuery->bindValue(':role', $new_delrole_roleList, PDO::PARAM_STR);
$updateroleQuery->bindValue(':userid', $account['userid'], PDO::PARAM_STR);
$updateroleQuery->execute();
}
}
} catch (Exception $e) {
@@ -310,7 +319,7 @@ if( !empty($_POST['send_add_role_submit']) ) {
if($result4 > 0 && $result5 > 0){
if (false !== strstr($result4["role"], ','.$add_roleid)) {
$error_message[] = "既に".$add_roleid."は付与済みです。";
$error_message[] = "既に".$add_roleid."は付与済みです。(ROLE_HUYOZUMI)";
}
$New_role_id = $result4["role"] . ',' . $add_roleid;
@@ -342,7 +351,54 @@ if( !empty($_POST['send_add_role_submit']) ) {
$stmt = null;
}
}else{
$error_message[] = "ロールがないまたはユーザーがいません。";
$error_message[] = "ロールがないまたはユーザーがいません。(ROLE_OR_USER_NOT_FOUND)";
}
}
if( !empty($_POST['send_del_role_submit']) ) {
$del_userid = htmlentities($_POST['del_userid']);
$del_roleid = htmlentities($_POST['del_roleid']);
$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');
$query->execute(array(':userid' => $del_userid));
$result4 = $query->fetch();
$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');
$query->execute(array(':roleid' => $del_roleid));
$result5 = $query->fetch();
if($result4 > 0 && $result5 > 0){
$userQuery = $dbh->prepare("SELECT role FROM account WHERE userid = :userid");
$userQuery->bindValue(':userid', $del_userid);
$userQuery->execute();
$userData = $userQuery->fetch();
// ロール剥奪ボタンが押された場合の処理
$roleList = explode(',', $userData['role']);
if (in_array($del_roleid, $roleList)) {
// 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新
$roleList = array_diff($roleList, array($del_roleid));
$newroleList = implode(',', $roleList);
// UPDATE文を実行してフォロー情報を更新
$updateQuery = $pdo->prepare("UPDATE account SET role = :role WHERE userid = :userid");
$updateQuery->bindValue(':role', $newroleList, PDO::PARAM_STR);
$updateQuery->bindValue(':userid', $del_userid, PDO::PARAM_STR);
$res = $updateQuery->execute();
if ($res) {
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location:" . $url);
exit;
} else {
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
}
$stmt = null;
}
}else{
$error_message[] = "ロールがないまたはユーザーがいません。(ROLE_OR_USER_NOT_FOUND)";
}
}
@@ -363,10 +419,10 @@ if (!empty($pdo)) {
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
@@ -405,7 +461,7 @@ if (!empty($pdo)) {
<div>
<p>ロールの色</p>
<div class="p2">ロールの色です。<br>HEXコードで入力してください。(#はつけないでください。)</div>
<input id="rolecolor" placeholder="256238" class="inbox" type="text" name="rolecolor" maxlength="6" value="">
<input id="rolecolor" onInput="checkForm(this)" placeholder="256238" class="inbox" type="text" name="rolecolor" maxlength="6" value="">
</div>
<input type="submit" class = "irobutton" name="role_btn_submit" value="作成">
@@ -416,6 +472,10 @@ if (!empty($pdo)) {
<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) {?>
@@ -454,9 +514,9 @@ if (!empty($pdo)) {
<p>ロール付与先のユーザーidと付与したいロールのidを入力してください。<br>なお、現時点ではここからロールの剥奪は出来ませんのでご注意ください。</p>
<form method="post" id="deleteForm">
<div class="p2">付与先ユーザーid</div>
<input type="text" id="add_userid" class="inbox" placeholder="admin" name="add_userid" value="">
<input type="text" id="add_userid" onInput="checkForm(this)" class="inbox" placeholder="admin" name="add_userid" value="">
<div class="p2">付与するロールid</div>
<input type="text" id="add_roleid" class="inbox" placeholder="role" name="add_roleid" value="">
<input type="text" id="add_roleid" onInput="checkForm(this)" class="inbox" placeholder="role" name="add_roleid" value="">
<div class="btn_area">
<input type="submit" id="deleteButton" class="fbtn_no" name="send_add_role_submit" value="付与">
<input type="button" id="cancelButton" class="fbtn" value="キャンセル">
@@ -465,14 +525,30 @@ if (!empty($pdo)) {
</div>
</div>
<div id="account_delrole_Modal" class="modal">
<div class="modal-content">
<h1>ロール付与</h1>
<p>ロール付与先のユーザーidと付与したいロールのidを入力してください。<br>なお、現時点ではここからロールの剥奪は出来ませんのでご注意ください。</p>
<form method="post" id="delrole_Form">
<div class="p2">剥奪先ユーザーid</div>
<input type="text" id="del_userid" onInput="checkForm(this)" class="inbox" placeholder="admin" name="del_userid" value="">
<div class="p2">剥奪するロールid</div>
<input type="text" id="del_roleid" onInput="checkForm(this)" class="inbox" placeholder="role" name="del_roleid" value="">
<div class="btn_area">
<input type="submit" id="delrole_deleteButton" class="fbtn_no" name="send_del_role_submit" value="剥奪">
<input type="button" id="delrole_cancelButton" class="fbtn" value="キャンセル">
</div>
</form>
</div>
</div>
</main>
<?php require('../require/rightbox.php');?>
<?php require('../require/botbox.php');?>
</body>
<script>
$(document).ready(function() {
<script type="text/javascript">
function checkForm(inputElement) {
var str = inputElement.value;
while (str.match(/[^A-Za-z\d_]/)) {
@@ -507,7 +583,32 @@ $(document).ready(function() {
}, 150);
});
});
});
var modal2 = document.getElementById('account_delrole_Modal');
var delrole_deleteButton = document.getElementById('delrole_deleteButton');
var delrole_cancelButton = document.getElementById('delrole_cancelButton'); // 追加
var modalMain = $('.modal-content');
document.getElementById("delrole").addEventListener('click', function(){
modal2.style.display = 'block';
modalMain.addClass("slideUp");
modalMain.removeClass("slideDown");
delrole_deleteButton.addEventListener('click', () => {
modalMain.removeClass("slideUp");
modalMain.addClass("slideDown");
window.setTimeout(function(){
modal2.style.display = 'none';
}, 150);
});
delrole_cancelButton.addEventListener('click', () => { // 追加
modalMain.removeClass("slideUp");
modalMain.addClass("slideDown");
window.setTimeout(function(){
modal2.style.display = 'none';
}, 150);
});
});
</script>
</html>
+29 -7
View File
@@ -239,6 +239,8 @@ if( !empty($_POST['btn_submit']) ) {
$servericon = $_POST['servericon'];
$serverhead = $_POST['serverhead'];
$serverlogo_onoff = $_POST['serverlogo_onoff'];
$serverlogo_light = $_POST['serverlogo_light'];
@@ -296,6 +298,8 @@ if( !empty($_POST['btn_submit']) ) {
server_name = "'.$servername.'"
;サーバーアイコンのアドレス
server_icon = "'.$servericon.'"
;サーバーヘッダーのアドレス
server_head = "'.$serverhead.'"
;サーバーロゴのアドレス
server_logo_home = "'.$serverlogo_light.'"
server_logo_login = "'.$serverlogo_dark.'"
@@ -342,10 +346,10 @@ require('../logout/logout.php');
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
@@ -370,16 +374,34 @@ require('../logout/logout.php');
<div class="admin_right">
<form class="formarea" enctype="multipart/form-data" method="post">
<h1>サーバー設定</h1>
<?php if( !empty($serversettings["serverinfo"]["server_icon"]) ){ ?>
<div class="servericon">
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<!--(サーバーアイコン)-->
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
<div class="serverhead_set">
<img src="<?php echo htmlspecialchars($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'); ?>">
</div>
<?php }else{?>
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
<?php }?>
</div>
<?php }?>
<!--(サーバーアイコンここまで)-->
<div>
<p>サーバーアイコン</p>
<div class="p2">サーバー登録画面などに表示されます。<br>自動的に角が丸くなります。<br>URLより設定してください。</div>
<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'); } ?>">
</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'); } ?>">
</div>
<div>
<p>サーバーロゴ機能のオンオフ</p>
+2
View File
@@ -5,9 +5,11 @@
<a href="useradmin" class="admin_leftbtn">ユーザー管理</a>
<a href="codeadmin" class="admin_leftbtn">招待コード発行所</a>
<a href="role_admin" class="admin_leftbtn">ロール</a>
<a href="addemoji_admin" class="admin_leftbtn">絵文字登録</a>
<a href="ad_admin" class="admin_leftbtn">広告</a>
<a href="moderation_admin" class="admin_leftbtn">モデレーション</a>
<a href="customize_admin" class="admin_leftbtn">カスタマイズ</a>
<a href="maintenance_admin" class="admin_leftbtn">メンテナンス</a>
<a href="plugin_admin" class="admin_leftbtn">プラグイン</a>
</div>
<?php ?>
+7 -8
View File
@@ -187,7 +187,7 @@ $notificationcount = $notiData['notification_count'];
if( !empty($_POST['btn_submit']) ) {
// 空白除去
$target_userid = $_POST['target_userid'];
$target_userid = htmlentities(str_replace('@', '', $_POST['target_userid']));
if (!empty($pdo)) {
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
@@ -205,7 +205,7 @@ if( !empty($_POST['btn_submit']) ) {
$userdata = $rerole->fetch(); // ここでデータベースから取得した値を $role に代入する
if(empty($userdata)){
$error_message[] = "ユーザーがいません";
$error_message[] = "ユーザーがいません(USER_NOT_FOUND)";
}else{
$_SESSION['userdata'] = $userdata;
@@ -254,11 +254,11 @@ if( !empty($_POST['report_done']) ) {
header("Location:".$url."");
exit;
} else {
$error_message[] = '発行に失敗しました。';
$error_message[] = '発行に失敗しました。(REGISTERED_DAME)';
}
} catch (Exception $e) {
$error_message[] = "えらー";
$error_message[] = "えらー(ERROR)";
// エラーが発生した時はロールバック
$pdo->rollBack();
}
@@ -289,10 +289,10 @@ if (!empty($pdo)) {
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">
@@ -319,7 +319,6 @@ if (!empty($pdo)) {
<h1>ユーザー管理</h1>
<div>
<p>ユーザーID</p>
<div class="p2">「@」は外してください。</div>
<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'); } ?>">
</div>
+61 -12
View File
@@ -185,6 +185,10 @@ $notiData = $notiQuery->fetch(PDO::FETCH_ASSOC);
$notificationcount = $notiData['notification_count'];
//phpmailer--------------------------------------------
require('plugin_settings/phpmailer_settings.php');
require('plugin_settings/phpmailer_sender.php');
//------------------------------------------------------
if (!empty($pdo)) {
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
@@ -255,6 +259,21 @@ if( !empty($_POST['send_ice_submit']) ) {
$pdo->rollBack();
}
//凍結通知メール
if(false !== strpos($userdata["mail_settings"], 'important')) {
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')."]まで異議申し立てをする旨を記載し送信をしてください。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
}
}
}
}
//------------
$pdo->beginTransaction();
try {
@@ -266,9 +285,9 @@ if( !empty($_POST['send_ice_submit']) ) {
$userchk = 'none';
// 通知用SQL作成
$stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)");
$stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title)");
$stmt->bindParam(':fromuserid', htmlentities("uwuzu-fromsys"), PDO::PARAM_STR);
$stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR);
$stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR);
$stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR);
@@ -293,7 +312,7 @@ if( !empty($_POST['send_ice_submit']) ) {
header("Location:useradmin");
exit;
} else {
$error_message[] = '凍結に失敗しました。';
$error_message[] = '凍結に失敗しました。(USER_ICE_DAME)';
}
}
if( !empty($_POST['send_water_submit']) ) {
@@ -323,11 +342,26 @@ if( !empty($_POST['send_water_submit']) ) {
} catch (Exception $e) {
$error_message[] = "えらー";
$error_message[] = "えらー(ERROR)";
// エラーが発生した時はロールバック
$pdo->rollBack();
}
//凍結通知メール
if(false !== strpos($userdata["mail_settings"], 'important')) {
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"].")が解凍されたためお知らせいたします。 今後、ご利用のuwuzuアカウントは今まで通りご利用いただけます。 また、APIを使用している方はAPIのトークンがリセットされているため再度トークンを発行してご利用ください。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
}
}
}
}
//------------
$pdo->beginTransaction();
try {
@@ -339,9 +373,9 @@ if( !empty($_POST['send_water_submit']) ) {
$userchk = 'none';
// 通知用SQL作成
$stmt = $pdo->prepare("INSERT INTO notification (touserid, msg, url, datetime, userchk, title) VALUES (:touserid, :msg, :url, :datetime, :userchk, :title)");
$stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title)");
$stmt->bindParam(':fromuserid', htmlentities("uwuzu-fromsys"), PDO::PARAM_STR);
$stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR);
$stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR);
$stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR);
@@ -357,7 +391,7 @@ if( !empty($_POST['send_water_submit']) ) {
$res2 = $pdo->commit();
} catch(Exception $e) {
$error_message[] = "えらー";
$error_message[] = "えらー(ERROR)";
// エラーが発生した時はロールバック
$pdo->rollBack();
}
@@ -366,7 +400,7 @@ if( !empty($_POST['send_water_submit']) ) {
header("Location:useradmin");
exit;
} else {
$error_message[] = '解凍に失敗しました。';
$error_message[] = '解凍に失敗しました。(USER_WATER_DAME)';
}
}
@@ -496,6 +530,21 @@ if( !empty($_POST['send_ban_submit']) ) {
}
}
//BAN通知メール
if(false !== strpos($userdata["mail_settings"], 'important')) {
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')."サーバー上から今までご利用いただいていたアカウントの情報は削除されたためログインなどもできません。 ご理解とご協力のほどよろしくお願いします。";
send_html_mail($userdata["mailadds"],$mail_title,$mail_text,"../");
}
}
}
}
//------------
} catch (Exception $e) {
// エラーが発生した時はロールバック
@@ -506,7 +555,7 @@ if( !empty($_POST['send_ban_submit']) ) {
header("Location:useradmin");
exit;
} else {
$error_message[] = 'アカウント削除に失敗しました。';
$error_message[] = 'アカウント削除に失敗しました。(ACCOUNT_DELETE_DAME)';
}
@@ -520,10 +569,10 @@ require('../logout/logout.php');
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/home.css?<?php echo date('Ymd-Hi'); ?>">
<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/unsupported.js?<?php echo date('Ymd-Hi'); ?>"></script>
<script src="../js/console_notice.js?<?php echo date('Ymd-Hi'); ?>"></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">