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