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

uwuzu version 1.3.1 new_planet

This commit is contained in:
Daichimarukana
2024-03-02 22:27:25 +09:00
parent 1597041471
commit 15758bf040
16 changed files with 104 additions and 78 deletions
+5 -6
View File
@@ -249,15 +249,14 @@ $pdo = null;
<script type="text/javascript"> <script type="text/javascript">
function checkForm($this) { function checkForm(inputElement) {
var str = $this.value; var str = inputElement.value;
while (str.match(/[^A-Za-z\d]/)) { while (str.match(/[^A-Za-z\d_]/)) {
str = str.replace(/[^A-Za-z\d]/, ""); str = str.replace(/[^A-Za-z\d_]/, "");
} }
$this.value = str; inputElement.value = str;
} }
window.addEventListener('DOMContentLoaded', function(){ window.addEventListener('DOMContentLoaded', function(){
// ファイルが選択されたら実行 // ファイルが選択されたら実行
+5 -5
View File
@@ -178,12 +178,12 @@ $pdo = null;
<script type="text/javascript"> <script type="text/javascript">
function checkForm($this) { function checkForm(inputElement) {
var str = $this.value; var str = inputElement.value;
while (str.match(/[^A-Za-z\d]/)) { while (str.match(/[^A-Za-z\d_]/)) {
str = str.replace(/[^A-Za-z\d]/, ""); str = str.replace(/[^A-Za-z\d_]/, "");
} }
$this.value = str; inputElement.value = str;
} }
+5 -7
View File
@@ -346,14 +346,12 @@ $pdo = null;
<script type="text/javascript"> <script type="text/javascript">
function checkForm($this) function checkForm(inputElement) {
{ var str = inputElement.value;
var str=$this.value; while (str.match(/[^A-Za-z\d_]/)) {
while(str.match(/[^A-Z^a-z\d\-]/)) str = str.replace(/[^A-Za-z\d_]/, "");
{
str=str.replace(/[^A-Z^a-z\d\-]/,"");
} }
$this.value=str; inputElement.value = str;
} }
+5 -9
View File
@@ -339,17 +339,13 @@ $pdo = null;
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
<!-- function checkForm(inputElement) {
function checkForm($this) var str = inputElement.value;
{ while (str.match(/[^A-Za-z\d_]/)) {
var str=$this.value; str = str.replace(/[^A-Za-z\d_]/, "");
while(str.match(/[^A-Z^a-z\d\-]/))
{
str=str.replace(/[^A-Z^a-z\d\-]/,"");
} }
$this.value=str; inputElement.value = str;
} }
//-->
+14 -4
View File
@@ -2130,7 +2130,7 @@ main h1{
} }
.sendbox textarea{ .sendbox textarea{
background-color: var(--background-color); background-color: var(--ueuse-color);
text-align: left; text-align: left;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@@ -5806,10 +5806,10 @@ summary {
margin-bottom: 0px; margin-bottom: 0px;
} }
.modal-content { .modal-content {
margin-top:40dvh; margin-top:35dvh;
width: calc(100% - 48px); width: calc(100% - 48px);
margin-bottom: 0px; margin-bottom: 0px;
height: 55dvh; height: 60dvh;
max-height: 55dvh; max-height: 55dvh;
overflow: scroll; overflow: scroll;
padding: 24px; padding: 24px;
@@ -6797,6 +6797,16 @@ summary {
font-weight: bold; font-weight: bold;
vertical-align: top; vertical-align: top;
} }
.notification h1{
color:var(--dark-text-color);
}
.notification h2{
color:var(--dark-text-color);
}
.notification h3{
color:var(--dark-text-color);
}
.notification .quote{ .notification .quote{
width: fit-content; width: fit-content;
@@ -6808,7 +6818,7 @@ summary {
padding-right: 6px; padding-right: 6px;
padding-top: 4px; padding-top: 4px;
padding-bottom: 4px; padding-bottom: 4px;
color:var(--text-color); color:var(--dark-text-color);
text-decoration: none; text-decoration: none;
font-family: 'BIZ UDPGothic', sans-serif; font-family: 'BIZ UDPGothic', sans-serif;
font-weight: normal; font-weight: normal;
+7 -9
View File
@@ -90,8 +90,8 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true && isset
if( !empty($_POST['btn_submit']) ) { if( !empty($_POST['btn_submit']) ) {
$userid = $_POST['userid']; $userid = htmlentities($_POST['userid']);
$password = $_POST['password']; $password = htmlentities($_POST['password']);
$options = array( $options = array(
@@ -120,11 +120,14 @@ if( !empty($_POST['btn_submit']) ) {
if( empty($userid) ) { if( empty($userid) ) {
$error_message[] = 'ユーザーIDを入力してください。(USERID_INPUT_PLEASE)'; $error_message[] = 'ユーザーIDを入力してください。(USERID_INPUT_PLEASE)';
} else { } else {
if(!(preg_match("/^[a-zA-Z0-9_]+$/", $userid))){
$error_message[] = "IDは半角英数字で入力してください。(「_」は使用可能です。)(USERID_DONT_USE_WORD)";
}
if( empty($password) ) { if( empty($password) ) {
$error_message[] = 'パスワードを入力してください。(PASSWORD_INPUT_PLEASE)'; $error_message[] = 'パスワードを入力してください。(PASSWORD_INPUT_PLEASE)';
} else { }
if(empty($error_message)){
if($result->rowCount() > 0) { if($result->rowCount() > 0) {
$row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する
@@ -161,13 +164,8 @@ if( !empty($_POST['btn_submit']) ) {
$error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)'; $error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)';
} }
} }
} }
// ... (後略)
} }
// データベースの接続を閉じる // データベースの接続を閉じる
+10 -6
View File
@@ -101,14 +101,14 @@ if( !empty($_POST['btn_submit']) ) {
//$row['userid'] = "daichimarukn"; //$row['userid'] = "daichimarukn";
// 空白除去 // 空白除去
$username = $_POST['username']; $username = htmlentities($_POST['username']);
$userid = $_POST['userid']; $userid = htmlentities($_POST['userid']);
$password = $_POST['password']; $password = htmlentities($_POST['password']);
$chkpass = $_POST['chkpass']; $chkpass = htmlentities($_POST['chkpass']);
$mailadds = $_POST['mailadds']; $mailadds = htmlentities($_POST['mailadds']);
$profile = $_POST['profile']; $profile = htmlentities($_POST['profile']);
if(htmlspecialchars($serversettings["serverinfo"]["server_invitation"], ENT_QUOTES, 'UTF-8') === "true"){ if(htmlspecialchars($serversettings["serverinfo"]["server_invitation"], ENT_QUOTES, 'UTF-8') === "true"){
$invitationcode = $_POST['invitationcode']; $invitationcode = $_POST['invitationcode'];
@@ -273,6 +273,10 @@ if( !empty($_POST['btn_submit']) ) {
$error_message[] = 'このID('.$userid.')は既に使用されています。他のIDを作成してください。(USERID_SHIYOUZUMI)'; //このE-mailは既に使用されています。 $error_message[] = 'このID('.$userid.')は既に使用されています。他のIDを作成してください。(USERID_SHIYOUZUMI)'; //このE-mailは既に使用されています。
} }
if(!(preg_match("/^[a-zA-Z0-9_]+$/", $userid))){
$error_message[] = "IDは半角英数字で入力してください。(「_」は使用可能です。)(USERID_DONT_USE_WORD)";
}
} }
// パスワードの入力チェック // パスワードの入力チェック
+1 -8
View File
@@ -31,14 +31,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
$userid = htmlentities($_GET['userid']); $userid = htmlentities($_GET['userid']);
$loginid = htmlentities($_GET['account_id']); $loginid = htmlentities($_GET['account_id']);
// データベース接続の設定 $query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
));
$query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
$query->execute(array(':userid' => $userid)); $query->execute(array(':userid' => $userid));
+1 -1
View File
@@ -293,7 +293,7 @@ class MessageDisplay {
echo ' <div class="nsfw_main" data-uniqid="' . htmlentities($this->value['uniqid']) . '">'; echo ' <div class="nsfw_main" data-uniqid="' . htmlentities($this->value['uniqid']) . '">';
echo ' <div class="block">'; echo ' <div class="block">';
} }
echo ' <p>' . processMarkdownAndWrapEmptyLines(replaceEmojisWithImages(replaceURLsWithLinks(nl2br($this->value['ueuse'])))) . '</h1></h2></h3></font></center></p>'; echo ' <p>' . replaceEmojisWithImages(processMarkdownAndWrapEmptyLines(replaceURLsWithLinks(nl2br($this->value['ueuse'])))) . '</h1></h2></h3></font></center></p>';
if (!empty($this->value['photo4']) && $this->value['photo4'] !== 'none') { if (!empty($this->value['photo4']) && $this->value['photo4'] !== 'none') {
echo ' <div class="photo4">'; echo ' <div class="photo4">';
+12 -1
View File
@@ -222,6 +222,10 @@ $pdo = null;
<div id="loading" class="loading" style="display: none;"> <div id="loading" class="loading" style="display: none;">
🤔 🤔
</div> </div>
<div id="error" class="error" style="display: none;">
<h1>エラー</h1>
<p>サーバーの応答がなかったか不完全だったようです。<br>ネットワークの接続が正常かを確認の上再読み込みしてください。<br>(NETWORK_HUKANZEN_STOP)</p>
</div>
</main> </main>
@@ -251,12 +255,19 @@ $(document).ready(function() {
method: 'GET', method: 'GET',
data: { page: pageNumber, userid: userid , account_id: account_id }, data: { page: pageNumber, userid: userid , account_id: account_id },
dataType: 'html', dataType: 'html',
timeout: 300000,
success: function(response) { success: function(response) {
$('#postContainer').append(response); $('#postContainer').append(response);
pageNumber++; pageNumber++;
isLoading = false; isLoading = false;
$("#loading").hide(); $("#loading").hide();
} $("#error").hide();
},
error: function (xhr, textStatus, errorThrown) { // エラーと判定された場合
isLoading = false;
$("#loading").hide();
$("#error").show();
},
}); });
} }
+10 -9
View File
@@ -84,8 +84,11 @@ if( !empty($_POST['btn_submit']) ) {
if( empty($mailadds) ) { if( empty($mailadds) ) {
$error_message[] = 'メールアドレスを入力してください。(INPUT_PLEASE)'; $error_message[] = 'メールアドレスを入力してください。(INPUT_PLEASE)';
} else { }
if(!(preg_match("/^[a-zA-Z0-9_]+$/", $userid))){
$error_message[] = "IDは半角英数字で作成してください。(「_」は使用可能です。)(USERID_DONT_USE_WORD)";
}
if(empty($error_message)){
if($result->rowCount() > 0) { if($result->rowCount() > 0) {
$row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する
@@ -196,14 +199,12 @@ $pdo = null;
<script type="text/javascript"> <script type="text/javascript">
function checkForm($this) function checkForm(inputElement) {
{ var str = inputElement.value;
var str=$this.value; while (str.match(/[^A-Za-z\d_]/)) {
while(str.match(/[^A-Z^a-z\d\-]/)) str = str.replace(/[^A-Za-z\d_]/, "");
{
str=str.replace(/[^A-Z^a-z\d\-]/,"");
} }
$this.value=str; inputElement.value = str;
} }
</script> </script>
+2 -2
View File
@@ -1,4 +1,4 @@
uwuzu uwuzu
1.3.0 1.3.1
2024/02/24 2024/03/02
daichimarukana,putonfps daichimarukana,putonfps
+8
View File
@@ -1,6 +1,14 @@
## リリースノートだぜぇぇぇぇぇぇい!!!!!!! ## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...) ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
## Version 1.3.1 (new_Planet)
リリース日:2024/03/02
fix: 絵文字が正常に表示されなくなる問題を修正しました。
fix: ダークモード使用時に通知のMarkdownで文字の色が変わらない問題を修正しました。
fix: ユーザーIDに半角英数字以外の文字列が使用できる問題を修正しました。
fix: 一部UIを変更しました
fix: その他微調整を行いました。
## Version 1.3.0 (new_Planet) ## Version 1.3.0 (new_Planet)
リリース日:2024/02/24 リリース日:2024/02/24
fix: サーバーロゴ未設定の状態でuwuzuロゴが表示されない問題を修正しました。 fix: サーバーロゴ未設定の状態でuwuzuロゴが表示されない問題を修正しました。
+6 -2
View File
@@ -338,8 +338,12 @@ if( !empty($_POST['pass_submit']) ) {
if(empty($pass_chk)){ if(empty($pass_chk)){
$error_message[] = 'ユーザーidを入力してください。(USERID_INPUT_PLEASE)'; $error_message[] = 'ユーザーidを入力してください。(USERID_INPUT_PLEASE)';
}else{ }else{
if(!($pass_chk === $userData["userid"])){ if(!(preg_match("/^[a-zA-Z0-9_]+$/", $pass_chk))){
$error_message[] = 'ユーザーidが不正です。(USERID_CHIGAUYANKE)'; $error_message[] = "IDは半角英数字で作成してください。(「_」は使用可能です。)(USERID_DONT_USE_WORD)";
}else{
if(!($pass_chk === $userData["userid"])){
$error_message[] = 'ユーザーidが不正です。(USERID_CHIGAUYANKE)';
}
} }
} }
+12 -9
View File
@@ -522,20 +522,22 @@ if( !empty($_POST['btn_submit']) ) {
$pdo->beginTransaction(); $pdo->beginTransaction();
$fromuserid = $userid;
$msg = ''.$ueuse.''; $msg = ''.$ueuse.'';
$title = ''.$userid.'さんが返信しました!'; $title = ''.$userid.'さんが返信しました!';
$url = $_SERVER['REQUEST_URI']; $url = $_SERVER['REQUEST_URI'];
$userchk = 'none'; $userchk = 'none';
// 通知用SQL作成 // 通知用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(':touserid', $touserid, PDO::PARAM_STR); $stmt->bindParam(':fromuserid', htmlentities($fromuserid), PDO::PARAM_STR);
$stmt->bindParam(':msg', $msg, PDO::PARAM_STR); $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR);
$stmt->bindParam(':url', $url, PDO::PARAM_STR); $stmt->bindParam(':msg', htmlentities($msg), PDO::PARAM_STR);
$stmt->bindParam(':userchk', $userchk, PDO::PARAM_STR); $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR);
$stmt->bindParam(':title', $title, PDO::PARAM_STR); $stmt->bindParam(':userchk', htmlentities($userchk), PDO::PARAM_STR);
$stmt->bindParam(':title', htmlentities($title), PDO::PARAM_STR);
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR); $stmt->bindParam(':datetime', htmlentities($datetime), PDO::PARAM_STR);
// SQLクエリの実行 // SQLクエリの実行
$res = $stmt->execute(); $res = $stmt->execute();
@@ -552,6 +554,7 @@ if( !empty($_POST['btn_submit']) ) {
$pdo->beginTransaction(); $pdo->beginTransaction();
try { try {
$fromuserid = $userid;
$touserid = $mentionedUser; $touserid = $mentionedUser;
$datetime = date("Y-m-d H:i:s"); $datetime = date("Y-m-d H:i:s");
$msg = "" . $ueuse . ""; $msg = "" . $ueuse . "";
@@ -560,9 +563,9 @@ if( !empty($_POST['btn_submit']) ) {
$userchk = 'none'; $userchk = 'none';
// 通知用SQL作成 // 通知用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($fromuserid), PDO::PARAM_STR);
$stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR); $stmt->bindParam(':touserid', htmlentities($touserid), PDO::PARAM_STR);
$stmt->bindParam(':msg', $msg, PDO::PARAM_STR); $stmt->bindParam(':msg', $msg, PDO::PARAM_STR);
$stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR); $stmt->bindParam(':url', htmlentities($url), PDO::PARAM_STR);
+1
View File
@@ -45,6 +45,7 @@ USERID_SHIYOUZUMI - ユーザーIDがすでに使用されている時に表示
USERID_CHECK_INPUT_PLEASE - ユーザーID確認用IDが入力されていない場合に表示されます。 USERID_CHECK_INPUT_PLEASE - ユーザーID確認用IDが入力されていない場合に表示されます。
USERID_CHIGAUYANKE - ユーザーID確認用IDがアカウント作成時のものと違う場合に表示されます。 USERID_CHIGAUYANKE - ユーザーID確認用IDがアカウント作成時のものと違う場合に表示されます。
USERID_CONTAINS_PROHIBITED - 登録禁止ユーザーIDが入力された場合に表示されます。 USERID_CONTAINS_PROHIBITED - 登録禁止ユーザーIDが入力された場合に表示されます。
USERID_DONT_USE_WORD - 使用禁止文字が入力されている際に表示されます。
PASSWORD_INPUT_PLEASE - パスワードが入力されていない時に表示されます。 PASSWORD_INPUT_PLEASE - パスワードが入力されていない時に表示されます。
PASSWORD_NEW_INPUT_PLEASE - 新しいパスワードが入力されていない場合に表示されます。 PASSWORD_NEW_INPUT_PLEASE - 新しいパスワードが入力されていない場合に表示されます。