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
+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">