mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu v1.6.7 Hapuego
This commit is contained in:
+61
-31
@@ -33,8 +33,36 @@ $pdo = null;
|
|||||||
$stmt = null;
|
$stmt = null;
|
||||||
$res = null;
|
$res = null;
|
||||||
$option = null;
|
$option = null;
|
||||||
|
$db_error = false;
|
||||||
|
|
||||||
if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
if(!(defined("DB_NAME")) || !(defined("DB_HOST")) || !(defined("DB_USER")) || !(defined("DB_PASS"))){
|
||||||
|
$db_new_settings = "
|
||||||
|
<?php // データベースの接続情報
|
||||||
|
define( 'DB_HOST', '');
|
||||||
|
define( 'DB_USER', '');
|
||||||
|
define( 'DB_PASS', '');
|
||||||
|
define( 'DB_NAME', '');
|
||||||
|
|
||||||
|
// ENC_KEYは操作しないでください。ユーザーデータを使用できなくなるおそれがあります。
|
||||||
|
define( 'ENC_KEY', '');
|
||||||
|
|
||||||
|
define( 'RATE_LM', ''); // レートリミット(ユーズ/分)
|
||||||
|
define( 'STOP_LA', ''); // 自動停止ロードアベレージ上限
|
||||||
|
// タイムゾーン設定
|
||||||
|
date_default_timezone_set('Asia/Tokyo');
|
||||||
|
?>
|
||||||
|
";
|
||||||
|
|
||||||
|
//サーバー設定上書き
|
||||||
|
$file = fopen("../db.php", 'w');
|
||||||
|
$data = $db_new_settings;
|
||||||
|
fputs($file, $data);
|
||||||
|
fclose($file);
|
||||||
|
|
||||||
|
$error_message[] = "db.phpを初期化しました。ページを再読込してください。";
|
||||||
|
$db_error = true;
|
||||||
|
$db_php = false;
|
||||||
|
}else if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$option = array(
|
$option = array(
|
||||||
@@ -44,9 +72,8 @@ if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
|||||||
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
|
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
|
||||||
|
|
||||||
} catch(PDOException $e) {
|
} catch(PDOException $e) {
|
||||||
|
|
||||||
// 接続エラーのときエラー内容を取得する
|
|
||||||
$error_message[] = $e->getMessage();
|
$error_message[] = $e->getMessage();
|
||||||
|
$db_error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($error_message)){
|
if(empty($error_message)){
|
||||||
@@ -66,34 +93,24 @@ if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
|||||||
if ($exists) {
|
if ($exists) {
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$aduser = "yes";
|
||||||
|
|
||||||
|
$query = $pdo->prepare('SELECT * FROM account WHERE admin = :adminuser limit 1');
|
||||||
|
|
||||||
|
$query->execute(array(':adminuser' => $aduser));
|
||||||
|
|
||||||
|
$result2 = $query->fetch();
|
||||||
|
|
||||||
|
if($result2 > 0){
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$db_php = true;
|
||||||
|
}else{
|
||||||
|
$db_php = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
|
||||||
|
|
||||||
$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=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
|
|
||||||
|
|
||||||
$query = $dbh->prepare('SELECT * FROM account WHERE admin = :adminuser limit 1');
|
|
||||||
|
|
||||||
$query->execute(array(':adminuser' => $aduser));
|
|
||||||
|
|
||||||
$result2 = $query->fetch();
|
|
||||||
|
|
||||||
if($result2 > 0){
|
|
||||||
header("Location: ../login.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$db_php = true;
|
|
||||||
}else{
|
}else{
|
||||||
$db_php = false;
|
$db_php = false;
|
||||||
}
|
}
|
||||||
@@ -156,11 +173,22 @@ $pdo = null;
|
|||||||
|
|
||||||
<p>おめでとうございます!!!</p>
|
<p>おめでとうございます!!!</p>
|
||||||
<p>uwuzuの導入が完了しました!</p>
|
<p>uwuzuの導入が完了しました!</p>
|
||||||
|
|
||||||
|
<?php if($db_error === true){?>
|
||||||
|
<p>uwuzuのセットアップをしたいところですが...<br>
|
||||||
|
データベースの接続にエラーが発生しているようです。<br>
|
||||||
|
上の赤枠のエラーコードへの対応をお願いします。<br>
|
||||||
|
<br>
|
||||||
|
なお、データベースの接続設定をやり直す場合は、db.phpを空欄のファイルにしてください。
|
||||||
|
</p>
|
||||||
|
<div class="p2">正常動作中のuwuzuのdb.phpを空欄のファイルにすると、これまで正常にデータベースに接続できていてデータを既に保存していた場合に、データの復号に問題が発生してしまい、uwuzuを使用できなくなるおそれがございます。<br>
|
||||||
|
操作は慎重に...!</div>
|
||||||
|
<?php }else{?>
|
||||||
<p>これよりuwuzuのセットアップを開始します!<br>
|
<p>これよりuwuzuのセットアップを開始します!<br>
|
||||||
セットアップを始める前に、PHPの必須モジュールがインストールされているか、以下の欄をみてご確認ください。<br>
|
セットアップを始める前に、PHPの必須モジュールがインストールされているか、以下の欄をみてご確認ください。<br>
|
||||||
Not setが一つでもある場合は再度モジュールの設定を行ってください!<br>
|
Not setが一つでもある場合は再度モジュールの設定を行ってください!<br>
|
||||||
<br>
|
<br>
|
||||||
<?php if($db_php == true){?>
|
<?php if($db_php === true){?>
|
||||||
db.phpの設定は済んでいるようですね、それでは早速セットアップを開始しましょう!
|
db.phpの設定は済んでいるようですね、それでは早速セットアップを開始しましょう!
|
||||||
<?php }else{?>
|
<?php }else{?>
|
||||||
また、uwuzuのセットアップを始める前に、以下の情報をあなたが知っている必要があります!<br>
|
また、uwuzuのセットアップを始める前に、以下の情報をあなたが知っている必要があります!<br>
|
||||||
@@ -194,6 +222,8 @@ $pdo = null;
|
|||||||
<a href="setup_db_php.php" class="irobutton">セットアップ開始!</a>
|
<a href="setup_db_php.php" class="irobutton">セットアップ開始!</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+4
-13
@@ -66,23 +66,14 @@ if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
|||||||
if ($exists) {
|
if ($exists) {
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
header("Location: index.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
$aduser = "yes";
|
||||||
|
|
||||||
$options = array(
|
$query = $pdo->prepare('SELECT * FROM account WHERE admin = :adminuser limit 1');
|
||||||
// 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=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
|
|
||||||
|
|
||||||
$query = $dbh->prepare('SELECT * FROM account WHERE admin = :adminuser limit 1');
|
|
||||||
|
|
||||||
$query->execute(array(':adminuser' => $aduser));
|
$query->execute(array(':adminuser' => $aduser));
|
||||||
|
|
||||||
|
|||||||
@@ -65,28 +65,18 @@ if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
|||||||
if ($exists) {
|
if ($exists) {
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
header("Location: index.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
$aduser = "yes";
|
||||||
|
|
||||||
$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=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$table_query = $dbh->prepare('SELECT 1 FROM role LIMIT 1;');
|
$table_query = $pdo->query("SHOW TABLES LIKE 'account'");
|
||||||
$table_query->execute();
|
|
||||||
$table_result = $table_query->fetch();
|
$table_result = $table_query->fetch();
|
||||||
if($table_result > 0){
|
if($table_result){
|
||||||
$query = $dbh->prepare('SELECT * FROM account WHERE admin = :adminuser limit 1');
|
$query = $pdo->prepare('SELECT * FROM account WHERE admin = :adminuser limit 1');
|
||||||
|
|
||||||
$query->execute(array(':adminuser' => $aduser));
|
$query->execute(array(':adminuser' => $aduser));
|
||||||
|
|
||||||
@@ -100,7 +90,7 @@ if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
} catch(PDOException $e) {
|
} catch(PDOException $e) {
|
||||||
|
$error_message[] = "データベースの操作に失敗しました。(".$e.")";
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_php = true;
|
$db_php = true;
|
||||||
|
|||||||
+4
-13
@@ -56,23 +56,14 @@ if(empty($error_message)){
|
|||||||
if ($exists) {
|
if ($exists) {
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
header("Location: index.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
$aduser = "yes";
|
||||||
|
|
||||||
$options = array(
|
$query = $pdo->prepare('SELECT * FROM account WHERE admin = :adminuser limit 1');
|
||||||
// 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=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
|
|
||||||
|
|
||||||
$query = $dbh->prepare('SELECT * FROM account WHERE admin = :adminuser limit 1');
|
|
||||||
|
|
||||||
$query->execute(array(':adminuser' => $aduser));
|
$query->execute(array(':adminuser' => $aduser));
|
||||||
|
|
||||||
|
|||||||
+14
-9
@@ -69,16 +69,21 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && sa
|
|||||||
|
|
||||||
// 新しいいいね情報を更新
|
// 新しいいいね情報を更新
|
||||||
$newbookmark = implode(',', $bookmarkList);
|
$newbookmark = implode(',', $bookmarkList);
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET bookmark = :bookmark WHERE userid = :userid");
|
if(!(mb_strlen($newbookmark) >= 16777215)){
|
||||||
$updateQuery->bindValue(':bookmark', $newbookmark, PDO::PARAM_STR);
|
$updateQuery = $pdo->prepare("UPDATE account SET bookmark = :bookmark WHERE userid = :userid");
|
||||||
$updateQuery->bindValue(':userid', $userId, PDO::PARAM_STR);
|
$updateQuery->bindValue(':bookmark', $newbookmark, PDO::PARAM_STR);
|
||||||
$res = $updateQuery->execute();
|
$updateQuery->bindValue(':userid', $userId, PDO::PARAM_STR);
|
||||||
|
$res = $updateQuery->execute();
|
||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
echo json_encode(['success' => true, 'newbookmark' => 'success']);
|
echo json_encode(['success' => true, 'newbookmark' => 'success']);
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
echo json_encode(['success' => false, 'error' => 'ブックマークの更新に失敗しました。']);
|
echo json_encode(['success' => false, 'error' => 'ブックマークの更新に失敗しました。']);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
echo json_encode(['success' => false, 'error' => 'ブックマーク数が多すぎます。']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+6
-5
@@ -344,12 +344,13 @@ $(document).ready(function () {
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
// いいね成功時の処理
|
|
||||||
if (isLiked) {
|
if (isLiked) {
|
||||||
$this.removeClass('bookmark_after'); // クラスを削除していいねを取り消す
|
$this.removeClass('bookmark_after'); // クラスを削除していいねを取り消す
|
||||||
} else {
|
view_notify("ブックマークを解除しました");
|
||||||
$this.addClass('bookmark_after'); // クラスを追加していいねを追加する
|
} else {
|
||||||
}
|
$this.addClass('bookmark_after'); // クラスを追加していいねを追加する
|
||||||
|
view_notify("ユーズをブックマークしました!");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// いいね失敗時の処理
|
// いいね失敗時の処理
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4459,7 +4459,7 @@ label>input {
|
|||||||
.notification .flebox .username img {
|
.notification .flebox .username img {
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
width: 14px;
|
width: fit-content;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -566,8 +566,10 @@ function resizeImage($filePath, $maxWidth, $maxHeight) {
|
|||||||
list($originalWidth, $originalHeight) = getimagesize($filePath);
|
list($originalWidth, $originalHeight) = getimagesize($filePath);
|
||||||
|
|
||||||
if ($originalWidth <= $maxWidth && $originalHeight <= $maxHeight) {
|
if ($originalWidth <= $maxWidth && $originalHeight <= $maxHeight) {
|
||||||
imagewebp($originalImage, $filePath, 90);
|
$originalImage_webp = imagecreatetruecolor($originalWidth, $originalHeight);
|
||||||
imagedestroy($originalImage);
|
imagecopyresampled($originalImage_webp, $originalImage, 0, 0, 0, 0, $originalWidth, $originalHeight, $originalWidth, $originalHeight);
|
||||||
|
|
||||||
|
imagewebp($originalImage_webp, $filePath, 90);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,11 +590,8 @@ function resizeImage($filePath, $maxWidth, $maxHeight) {
|
|||||||
// 画像をリサイズ
|
// 画像をリサイズ
|
||||||
imagecopyresampled($resizedImage, $originalImage, 0, 0, 0, 0, $newWidth, $newHeight, $originalWidth, $originalHeight);
|
imagecopyresampled($resizedImage, $originalImage, 0, 0, 0, 0, $newWidth, $newHeight, $originalWidth, $originalHeight);
|
||||||
// リサイズされた画像を表示
|
// リサイズされた画像を表示
|
||||||
imagewebp($resizedImage, $filePath);
|
imagewebp($resizedImage, $filePath, 90);
|
||||||
// メモリの解放
|
|
||||||
imagedestroy($originalImage);
|
|
||||||
imagedestroy($resizedImage);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -638,11 +638,12 @@ $(document).ready(function() {
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
// いいね成功時の処理
|
|
||||||
if (isLiked) {
|
if (isLiked) {
|
||||||
$this.removeClass('bookmark_after'); // クラスを削除していいねを取り消す
|
$this.removeClass('bookmark_after'); // クラスを削除していいねを取り消す
|
||||||
|
view_notify("ブックマークを解除しました");
|
||||||
} else {
|
} else {
|
||||||
$this.addClass('bookmark_after'); // クラスを追加していいねを追加する
|
$this.addClass('bookmark_after'); // クラスを追加していいねを追加する
|
||||||
|
view_notify("ユーズをブックマークしました!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// いいね失敗時の処理
|
// いいね失敗時の処理
|
||||||
@@ -686,6 +687,7 @@ $(document).ready(function() {
|
|||||||
success: function (response) {
|
success: function (response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
postElement.remove();
|
postElement.remove();
|
||||||
|
view_notify("ユーズを削除しました!");
|
||||||
} else {
|
} else {
|
||||||
view_notify("ユーズの削除に失敗しました");
|
view_notify("ユーズの削除に失敗しました");
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
+74
-44
@@ -198,7 +198,7 @@ async function replaceCustomEmojis(text) {
|
|||||||
if (url === undefined) return `:${name}:`; // 未取得
|
if (url === undefined) return `:${name}:`; // 未取得
|
||||||
if (url === null) return `:${name}:`; // 存在しない
|
if (url === null) return `:${name}:`; // 存在しない
|
||||||
|
|
||||||
return `<img src="${url}" alt=":${name}:">`; // ここで生成
|
return `<img src="${url}" alt=":${name}:" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/emoji_404.png'">`; // ここで生成
|
||||||
});
|
});
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
@@ -265,6 +265,7 @@ function deleteLocalstorage(key, pagepath) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
function a_link(text) {
|
function a_link(text) {
|
||||||
const placeholders = {};
|
const placeholders = {};
|
||||||
let placeholderIndex = 0;
|
let placeholderIndex = 0;
|
||||||
@@ -298,54 +299,74 @@ function a_link(text) {
|
|||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
function formatMarkdown(text) {
|
function formatMarkdown(text) {
|
||||||
const placeholders = {};
|
const placeholders = {};
|
||||||
let placeholderIndex = 0;
|
let placeholderIndex = 0;
|
||||||
|
|
||||||
// URLをプレースホルダーに退避
|
// ヘルパー関数: プレースホルダーを作成して保存
|
||||||
text = text.replace(/<a\b[^>]*>[\s\S]*?<\/a>/g, (match) => {
|
function createPlaceholder(content) {
|
||||||
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
||||||
placeholders[key] = match; // 元の文字列を保存
|
placeholders[key] = content;
|
||||||
return key;
|
return key;
|
||||||
});
|
}
|
||||||
|
|
||||||
// 複数行インラインコード(バッククォート3つ)を検出して、<pre><code>で囲む
|
// 複数行コードブロック (```)
|
||||||
text = text.replace(/```([\s\S]+?)```/g, (match, code) => {
|
text = text.replace(/```([\s\S]+?)```/g, (match, code) => {
|
||||||
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
// 先頭の改行のみ削除
|
||||||
placeholders[key] = `<pre class="codeblock"><code>${code.replace(/^\s*\n/, '')}</code></pre>`;
|
const cleanCode = code.replace(/^\s*\n/, '');
|
||||||
return key;
|
// <pre><code> で包んで退避
|
||||||
|
return createPlaceholder(`<pre class="codeblock"><code>${cleanCode}</code></pre>`);
|
||||||
});
|
});
|
||||||
|
|
||||||
// コードブロックの退避
|
// インラインコード (`)
|
||||||
text = text.replace(/`([^`\n]+)`/g, (_, code) => {
|
text = text.replace(/`([^`\n]+)`/g, (_, code) => {
|
||||||
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
return createPlaceholder(`<span class="inline">${code}</span>`);
|
||||||
placeholders[key] = `<span class="inline">${code}</span>`;
|
|
||||||
return key;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// コロンで囲まれた絵文字をプレースホルダーに退避
|
// 既存のaタグ
|
||||||
|
text = text.replace(/<a\b[^>]*>[\s\S]*?<\/a>/gi, (match) => {
|
||||||
|
return createPlaceholder(match);
|
||||||
|
});
|
||||||
|
|
||||||
|
// ユーザーメンション (@user)
|
||||||
|
text = text.replace(/@([a-zA-Z0-9_]+)(?:@([a-zA-Z0-9_.-]+))?/g, (match) => {
|
||||||
|
return createPlaceholder(match);
|
||||||
|
});
|
||||||
|
|
||||||
|
// カスタム絵文字 (:emoji:)
|
||||||
text = text.replace(/:([a-zA-Z0-9_]+):/g, (match) => {
|
text = text.replace(/:([a-zA-Z0-9_]+):/g, (match) => {
|
||||||
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
return createPlaceholder(match);
|
||||||
placeholders[key] = match; // 元の文字列を保存
|
|
||||||
return key;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// ユーザーIDをプレースホルダーに退避
|
// a_link
|
||||||
text = text.replace(/@([a-zA-Z0-9_]+)/g, (match) => {
|
text = text.replace(/(https:\/\/[\w!?\/+\-_~;.,*&@#$%()+|https:\/\/[ぁ-んァ-ヶ一ー-龠々\w\-\/?=&%.]+)/g, function (url) {
|
||||||
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
const escapedUrl = url;
|
||||||
placeholders[key] = match; // 元の文字列を保存
|
const no_https_link = escapedUrl.replace("https://", "");
|
||||||
return key;
|
let linkText = no_https_link;
|
||||||
|
|
||||||
|
if (no_https_link.length > 48) {
|
||||||
|
linkText = no_https_link.substring(0, 48) + '...';
|
||||||
|
}
|
||||||
|
|
||||||
|
return `<a href="${escapedUrl}" target="_blank" rel="noopener">${linkText}</a>`;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 独自構文などの装飾
|
// ハッシュタグ
|
||||||
|
text = text.replace(/(^|[^a-zA-Z0-9_])#([a-zA-Z0-9ぁ-んァ-ン一-龥ー_]+)/gu, function (match, before, tag) {
|
||||||
|
const encodedTag = encodeURIComponent("#" + tag);
|
||||||
|
return `${before}<a href="/search?q=${encodedTag}" class="hashtags">#${tag}</a>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 独自構文
|
||||||
text = text.replace(/\[\[buruburu (.+?)\]\]/g, '<span class="buruburu">$1</span>');
|
text = text.replace(/\[\[buruburu (.+?)\]\]/g, '<span class="buruburu">$1</span>');
|
||||||
text = text.replace(/\[\[time (\d+)\]\]/g, (_, ts) => {
|
text = text.replace(/\[\[time (\d+)\]\]/g, (_, ts) => {
|
||||||
const d = new Date(parseInt(ts, 10) * 1000);
|
const d = new Date(parseInt(ts, 10) * 1000);
|
||||||
return `<span class="unixtime" title="${d.toLocaleString()}">${d.toLocaleString()}</span>`;
|
return `<span class="unixtime" title="${d.toLocaleString()}">${d.toLocaleString()}</span>`;
|
||||||
});
|
});
|
||||||
|
|
||||||
// マークダウン風装飾
|
// 文字装飾
|
||||||
text = text
|
text = text
|
||||||
.replace(/\*\*\*(.+?)\*\*\*/g, '<b><i>$1</i></b>')
|
.replace(/\*\*\*(.+?)\*\*\*/g, '<b><i>$1</i></b>')
|
||||||
.replace(/___(.+?)___/g, '<b><i>$1</i></b>')
|
.replace(/___(.+?)___/g, '<b><i>$1</i></b>')
|
||||||
@@ -354,7 +375,7 @@ function formatMarkdown(text) {
|
|||||||
.replace(/\*(.+?)\*/g, '<i>$1</i>')
|
.replace(/\*(.+?)\*/g, '<i>$1</i>')
|
||||||
.replace(/_(.+?)_/g, '<i>$1</i>')
|
.replace(/_(.+?)_/g, '<i>$1</i>')
|
||||||
.replace(/~~(.+?)~~/g, '<s>$1</s>')
|
.replace(/~~(.+?)~~/g, '<s>$1</s>')
|
||||||
.replace(/^>>> ?(.*)$/gm, '<span class="quote">$1</span>') // ここを修正
|
.replace(/^>>> ?(.*)$/gm, '<span class="quote">$1</span>')
|
||||||
.replace(/\|\|(.+?)\|\|/g, '<span class="blur">$1</span>')
|
.replace(/\|\|(.+?)\|\|/g, '<span class="blur">$1</span>')
|
||||||
.replace(/^# (.+)/gm, '<h1>$1</h1>')
|
.replace(/^# (.+)/gm, '<h1>$1</h1>')
|
||||||
.replace(/^## (.+)/gm, '<h2>$1</h2>')
|
.replace(/^## (.+)/gm, '<h2>$1</h2>')
|
||||||
@@ -366,10 +387,11 @@ function formatMarkdown(text) {
|
|||||||
line = line.trim();
|
line = line.trim();
|
||||||
return line === '' ? '<br>' : `<p>${line}</p>`;
|
return line === '' ? '<br>' : `<p>${line}</p>`;
|
||||||
});
|
});
|
||||||
|
|
||||||
// プレースホルダーを戻す
|
|
||||||
let final = lines.join('');
|
let final = lines.join('');
|
||||||
|
|
||||||
for (const key in placeholders) {
|
for (const key in placeholders) {
|
||||||
|
// キー自体に正規表現の特殊文字が含まれるためエスケープ
|
||||||
const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||||
final = final.replace(new RegExp(escapedKey, 'g'), placeholders[key]);
|
final = final.replace(new RegExp(escapedKey, 'g'), placeholders[key]);
|
||||||
}
|
}
|
||||||
@@ -541,14 +563,14 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
reuse = ``;
|
reuse = ``;
|
||||||
if (!(ueuse["reuse"] == null)) {
|
if (!(ueuse["reuse"] == null)) {
|
||||||
// カスタム絵文字を非同期に差し替え
|
// カスタム絵文字を非同期に差し替え
|
||||||
var inyoreuseHtml = formatMarkdown(a_link(ueuse["reuse"]["ueuse"]));
|
var inyoreuseHtml = formatMarkdown(ueuse["reuse"]["ueuse"]);
|
||||||
inyoreuseHtml = await replaceMentions(inyoreuseHtml);
|
inyoreuseHtml = await replaceMentions(inyoreuseHtml);
|
||||||
inyoreuseHtml = await replaceCustomEmojis(inyoreuseHtml);
|
inyoreuseHtml = await replaceCustomEmojis(inyoreuseHtml);
|
||||||
|
|
||||||
inyo = `<div class="reuse_box" data-uniqid="` + ueuse["reuse"]["uniqid"] + `" id="quote_reuse">
|
inyo = `<div class="reuse_box" data-uniqid="` + ueuse["reuse"]["uniqid"] + `" id="quote_reuse">
|
||||||
<div class="reuse_flebox">
|
<div class="reuse_flebox">
|
||||||
<a href="/!`+ ueuse["reuse"]["uniqid"] + `">
|
<a href="/!`+ ueuse["reuse"]["uniqid"] + `">
|
||||||
<img src="`+ ueuse["reuse"]["userdata"]["iconurl"] + `">
|
<img src="`+ ueuse["reuse"]["userdata"]["iconurl"] + `" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/icon_404.png'">
|
||||||
</a>
|
</a>
|
||||||
<a href="/!`+ ueuse["reuse"]["uniqid"] + `">
|
<a href="/!`+ ueuse["reuse"]["uniqid"] + `">
|
||||||
<div class="u_name">
|
<div class="u_name">
|
||||||
@@ -574,7 +596,7 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
contentHtml = formatMarkdown(a_link(ueuse["ueuse"]));
|
contentHtml = formatMarkdown(ueuse["ueuse"]);
|
||||||
|
|
||||||
uniqid = ueuse["uniqid"];
|
uniqid = ueuse["uniqid"];
|
||||||
userid = ueuse["userdata"]["userid"];
|
userid = ueuse["userdata"]["userid"];
|
||||||
@@ -601,12 +623,12 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
if (!(ueuse["reuse"] == null)) {
|
if (!(ueuse["reuse"] == null)) {
|
||||||
reuse = `<div class="ru">
|
reuse = `<div class="ru">
|
||||||
<a href="/@`+ ueuse["userdata"]["userid"] + `">
|
<a href="/@`+ ueuse["userdata"]["userid"] + `">
|
||||||
<img src="`+ ueuse["userdata"]["iconurl"] + `">
|
<img src="`+ ueuse["userdata"]["iconurl"] + `" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/icon_404.png'">
|
||||||
<p>`+ await replaceCustomEmojis(ueuse["userdata"]["username"]) + `さんがリユーズ</p>
|
<p>`+ await replaceCustomEmojis(ueuse["userdata"]["username"]) + `さんがリユーズ</p>
|
||||||
</a>
|
</a>
|
||||||
</div>`;
|
</div>`;
|
||||||
inyo = ``;
|
inyo = ``;
|
||||||
contentHtml = formatMarkdown(a_link(ueuse["reuse"]["ueuse"]));
|
contentHtml = formatMarkdown(ueuse["reuse"]["ueuse"]);
|
||||||
|
|
||||||
uniqid = ueuse["reuse"]["uniqid"];
|
uniqid = ueuse["reuse"]["uniqid"];
|
||||||
userid = ueuse["reuse"]["userdata"]["userid"];
|
userid = ueuse["reuse"]["userdata"]["userid"];
|
||||||
@@ -632,7 +654,7 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
} else {
|
} else {
|
||||||
reuse = `<div class="ru">
|
reuse = `<div class="ru">
|
||||||
<a href="/@`+ ueuse["userdata"]["userid"] + `">
|
<a href="/@`+ ueuse["userdata"]["userid"] + `">
|
||||||
<img src="`+ ueuse["userdata"]["iconurl"] + `">
|
<img src="`+ ueuse["userdata"]["iconurl"] + `" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/icon_404.png'">
|
||||||
<p>`+ await replaceCustomEmojis(ueuse["userdata"]["username"]) + `さんがリユーズ</p>
|
<p>`+ await replaceCustomEmojis(ueuse["userdata"]["username"]) + `さんがリユーズ</p>
|
||||||
</a>
|
</a>
|
||||||
</div>`;
|
</div>`;
|
||||||
@@ -679,7 +701,7 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inyo = ``;
|
inyo = ``;
|
||||||
contentHtml = formatMarkdown(a_link(ueuse["ueuse"]));
|
contentHtml = formatMarkdown(ueuse["ueuse"]);
|
||||||
|
|
||||||
uniqid = ueuse["uniqid"];
|
uniqid = ueuse["uniqid"];
|
||||||
userid = ueuse["userdata"]["userid"];
|
userid = ueuse["userdata"]["userid"];
|
||||||
@@ -707,13 +729,13 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
<div class="ueuse">
|
<div class="ueuse">
|
||||||
<div class="headbox">
|
<div class="headbox">
|
||||||
<a href="/@`+ ueuse["userdata"]["userid"] + `">
|
<a href="/@`+ ueuse["userdata"]["userid"] + `">
|
||||||
<img src="`+ ueuse["userdata"]["headurl"] + `">
|
<img src="`+ ueuse["userdata"]["headurl"] + `" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/image_404.png'">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flebox">
|
<div class="flebox">
|
||||||
<div class="user">
|
<div class="user">
|
||||||
<a href="/@`+ ueuse["userdata"]["userid"] + `">
|
<a href="/@`+ ueuse["userdata"]["userid"] + `">
|
||||||
<img src="`+ ueuse["userdata"]["iconurl"] + `">
|
<img src="`+ ueuse["userdata"]["iconurl"] + `" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/icon_404.png'">
|
||||||
</a>
|
</a>
|
||||||
<div class="u_name">
|
<div class="u_name">
|
||||||
<a href="/@`+ ueuse["userdata"]["userid"] + `">` + ueuse["userdata"]["username"] + `</a>
|
<a href="/@`+ ueuse["userdata"]["userid"] + `">` + ueuse["userdata"]["username"] + `</a>
|
||||||
@@ -738,7 +760,7 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
|
|
||||||
reuse = ``;
|
reuse = ``;
|
||||||
inyo = ``;
|
inyo = ``;
|
||||||
contentHtml = formatMarkdown(a_link(ueuse["ueuse"]));
|
contentHtml = formatMarkdown(ueuse["ueuse"]);
|
||||||
|
|
||||||
uniqid = ueuse["uniqid"];
|
uniqid = ueuse["uniqid"];
|
||||||
userid = ueuse["userdata"]["userid"];
|
userid = ueuse["userdata"]["userid"];
|
||||||
@@ -764,7 +786,7 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (abi != "" && typeof abi === "string") {
|
if (abi != "" && typeof abi === "string") {
|
||||||
abi = formatMarkdown(a_link(abi));
|
abi = formatMarkdown(abi);
|
||||||
abi = await replaceMentions(abi);
|
abi = await replaceMentions(abi);
|
||||||
abi = await replaceCustomEmojis(abi);
|
abi = await replaceCustomEmojis(abi);
|
||||||
|
|
||||||
@@ -935,7 +957,7 @@ async function createUeuseHtml(ueuse, selectedUniqid = null) {
|
|||||||
<div class="ueuse" id="ueuse-`+ ueuse["uniqid"] + `">
|
<div class="ueuse" id="ueuse-`+ ueuse["uniqid"] + `">
|
||||||
`+ reuse + `
|
`+ reuse + `
|
||||||
<div class="flebox">
|
<div class="flebox">
|
||||||
<a href="/@`+ userid + `"><img src="` + iconurl + `"></a>
|
<a href="/@`+ userid + `"><img src="` + iconurl + `" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/icon_404.png'"></a>
|
||||||
<a href="/@`+ userid + `"><div class="u_name">` + await replaceCustomEmojis(username) + `</div></a>
|
<a href="/@`+ userid + `"><div class="u_name">` + await replaceCustomEmojis(username) + `</div></a>
|
||||||
<div class="idbox">
|
<div class="idbox">
|
||||||
<a href="/@`+ userid + `">@` + userid + `</a>
|
<a href="/@`+ userid + `">@` + userid + `</a>
|
||||||
@@ -970,7 +992,7 @@ function createAdsHtml(ads) {
|
|||||||
if (!(ads == null || ads == "")) {
|
if (!(ads == null || ads == "")) {
|
||||||
var ads_html = `<div class="ads">
|
var ads_html = `<div class="ads">
|
||||||
<a href="`+ ads["url"] + `" target="_blank">
|
<a href="`+ ads["url"] + `" target="_blank">
|
||||||
<img src="`+ ads["imgurl"] + `" title="` + ads["memo"] + `">
|
<img src="`+ ads["imgurl"] + `" title="` + ads["memo"] + `" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/image_404.png'">
|
||||||
</a>
|
</a>
|
||||||
</div>`;
|
</div>`;
|
||||||
return ads_html;
|
return ads_html;
|
||||||
@@ -1017,10 +1039,18 @@ async function createNotificationHtml(notification) {
|
|||||||
let is_readclass = "";
|
let is_readclass = "";
|
||||||
let datetime = notification["datetime"];
|
let datetime = notification["datetime"];
|
||||||
let userid = notification["userdata"]["userid"];
|
let userid = notification["userdata"]["userid"];
|
||||||
|
|
||||||
|
let userid_url = "";
|
||||||
|
if(userid == "uwuzu-fromsys"){
|
||||||
|
userid_url = "/rule/serverabout";
|
||||||
|
}else{
|
||||||
|
userid_url = "/@"+userid;
|
||||||
|
}
|
||||||
|
|
||||||
let username = notification["userdata"]["username"];
|
let username = notification["userdata"]["username"];
|
||||||
let iconurl = notification["userdata"]["iconurl"];
|
let iconurl = notification["userdata"]["iconurl"];
|
||||||
let title = notification["title"];
|
let title = notification["title"];
|
||||||
let content = formatMarkdown(a_link(notification["message"]));
|
let content = formatMarkdown(notification["message"]);
|
||||||
content = await replaceMentions(content);
|
content = await replaceMentions(content);
|
||||||
content = await replaceCustomEmojis(content);
|
content = await replaceCustomEmojis(content);
|
||||||
|
|
||||||
@@ -1037,12 +1067,12 @@ async function createNotificationHtml(notification) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="flebox">
|
<div class="flebox">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<a href="/@`+ userid + `">
|
<a href="`+ userid_url + `">
|
||||||
<img src="`+ iconurl + `">
|
<img src="`+ iconurl + `" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/icon_404.png'">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="username">
|
<div class="username">
|
||||||
<a href="/@`+ userid + `">` + await replaceCustomEmojis(username) + `</a>
|
<a href="`+ userid_url + `">` + await replaceCustomEmojis(username) + `</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h3>`+ await replaceCustomEmojis(title) + `</h3>
|
<h3>`+ await replaceCustomEmojis(title) + `</h3>
|
||||||
|
|||||||
@@ -78,8 +78,13 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
|||||||
$value['fromusername'] = "でふぉると";
|
$value['fromusername'] = "でふぉると";
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$value['fromusericon'] = safetext($value["servericon"]);
|
if(!empty($value["servericon"])){
|
||||||
$value['fromusername'] = "uwuzu";
|
$value['fromusericon'] = safetext($value["servericon"]);
|
||||||
|
$value['fromusername'] = "uwuzu";
|
||||||
|
}else{
|
||||||
|
$value['fromusericon'] = "../img/uwuzuicon.png";
|
||||||
|
$value['fromusername'] = "uwuzu";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ if(!($is_login === false)){
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
if(isset($_SESSION['auth_status'])){
|
||||||
|
if($_SESSION['auth_status'] === "go_recovery"){
|
||||||
|
header("Location: startrecovery.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|||||||
@@ -24,6 +24,20 @@ if(!($is_login === false)){
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
if(isset($_SESSION['auth_status'])){
|
||||||
|
if(!($_SESSION['auth_status'] === "done_recovery")){
|
||||||
|
if($_SESSION['auth_status'] === "bad_recovery"){
|
||||||
|
$_SESSION = array();
|
||||||
|
header("Location: badrecovery.php");
|
||||||
|
exit;
|
||||||
|
}else{
|
||||||
|
$_SESSION = array();
|
||||||
|
header("Location: index.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|||||||
+29
-10
@@ -73,6 +73,10 @@ if(!($is_login === false)){
|
|||||||
header("Location: ../home/");
|
header("Location: ../home/");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
//パスワード試行回数制限-------------------------------------------
|
||||||
|
if (!isset($_SESSION['login_passtry'])) {
|
||||||
|
$_SESSION['login_passtry'] = 0;
|
||||||
|
}
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
|
||||||
if( !empty($_POST['btn_submit']) ) {
|
if( !empty($_POST['btn_submit']) ) {
|
||||||
@@ -153,10 +157,6 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
// SQL実行
|
// SQL実行
|
||||||
$result->execute();
|
$result->execute();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ... (前略)
|
|
||||||
// IDの入力チェック
|
|
||||||
if( empty($userid) ) {
|
if( empty($userid) ) {
|
||||||
$error_message[] = 'ユーザーIDを入力してください。(USERID_INPUT_PLEASE)';
|
$error_message[] = 'ユーザーIDを入力してください。(USERID_INPUT_PLEASE)';
|
||||||
} else {
|
} else {
|
||||||
@@ -167,6 +167,21 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
if(!(preg_match("/^[a-zA-Z0-9_]+$/", $userid))){
|
if(!(preg_match("/^[a-zA-Z0-9_]+$/", $userid))){
|
||||||
$error_message[] = "IDは半角英数字で入力してください。(「_」は使用可能です。)(USERID_DONT_USE_WORD)";
|
$error_message[] = "IDは半角英数字で入力してください。(「_」は使用可能です。)(USERID_DONT_USE_WORD)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_SESSION["login_passtry"] <= 5) {
|
||||||
|
$delay = $_SESSION["login_passtry"] * 2;
|
||||||
|
} else {
|
||||||
|
$delay = min(pow(2, $_SESSION["login_passtry"] - 2), 60);
|
||||||
|
}
|
||||||
|
sleep($delay);
|
||||||
|
|
||||||
|
$locknow_loginLog = isUserLockedByloginLog($pdo, $userid, $_SERVER['REMOTE_ADDR']);
|
||||||
|
if($locknow_loginLog[0] === true){
|
||||||
|
$_SESSION["login_passtry"]++;
|
||||||
|
addloginLog($pdo, $userid, $_SERVER['REMOTE_ADDR']);
|
||||||
|
$error_message[] = '現在あなたのアカウントは保護のためロックされています。しばらく時間を開けてから再度お試しください。';
|
||||||
|
}
|
||||||
|
|
||||||
if(empty($error_message)){
|
if(empty($error_message)){
|
||||||
if($result->rowCount() > 0) {
|
if($result->rowCount() > 0) {
|
||||||
$row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する
|
$row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する
|
||||||
@@ -184,40 +199,44 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
if(MAIL_CHKS == "true"){
|
if(MAIL_CHKS == "true"){
|
||||||
$_SESSION['userid'] = $userid;
|
$_SESSION['userid'] = $userid;
|
||||||
$_SESSION['mailadds'] = $dec_mailadds;
|
$_SESSION['mailadds'] = $dec_mailadds;
|
||||||
|
$_SESSION['auth_status'] = 'go_recovery';
|
||||||
$url = 'startrecovery.php';
|
$url = 'startrecovery.php';
|
||||||
header('Location: ' . $url, true, 303);
|
header('Location: ' . $url, true, 303);
|
||||||
|
|
||||||
// すべての出力を終了
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($row["authcode"])){
|
if(empty($row["authcode"])){
|
||||||
|
|
||||||
$_SESSION['userid'] = "";
|
$_SESSION['userid'] = "";
|
||||||
|
$_SESSION['auth_status'] = 'bad_recovery';
|
||||||
$url = 'badrecovery.php';
|
$url = 'badrecovery.php';
|
||||||
header('Location: ' . $url, true, 303);
|
header('Location: ' . $url, true, 303);
|
||||||
|
|
||||||
// すべての出力を終了
|
|
||||||
exit;
|
exit;
|
||||||
}else{
|
}else{
|
||||||
$_SESSION['userid'] = $userid;
|
$_SESSION['userid'] = $userid;
|
||||||
$_SESSION['mailadds'] = $dec_mailadds;
|
$_SESSION['mailadds'] = $dec_mailadds;
|
||||||
|
$_SESSION['auth_status'] = 'go_recovery';
|
||||||
$url = 'startrecovery.php';
|
$url = 'startrecovery.php';
|
||||||
header('Location: ' . $url, true, 303);
|
header('Location: ' . $url, true, 303);
|
||||||
|
|
||||||
// すべての出力を終了
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}else{
|
||||||
else{
|
$_SESSION["login_passtry"]++;
|
||||||
|
addloginLog($pdo, $userid, $_SERVER['REMOTE_ADDR']);
|
||||||
$error_message[] = 'IDまたはメールアドレスが違います(ID_OR_MAILADDS_CHIGAUYANKE)';
|
$error_message[] = 'IDまたはメールアドレスが違います(ID_OR_MAILADDS_CHIGAUYANKE)';
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
$_SESSION["login_passtry"]++;
|
||||||
|
addloginLog($pdo, $userid, $_SERVER['REMOTE_ADDR']);
|
||||||
$error_message[] = 'IDまたはメールアドレスが違います(ID_OR_MAILADDS_CHIGAUYANKE)';
|
$error_message[] = 'IDまたはメールアドレスが違います(ID_OR_MAILADDS_CHIGAUYANKE)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
$_SESSION["login_passtry"]++;
|
||||||
|
addloginLog($pdo, $userid, $_SERVER['REMOTE_ADDR']);
|
||||||
$error_message[] = 'IDまたはメールアドレスが違います(ID_OR_MAILADDS_CHIGAUYANKE)';
|
$error_message[] = 'IDまたはメールアドレスが違います(ID_OR_MAILADDS_CHIGAUYANKE)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,25 @@ if(!($is_login === false)){
|
|||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
|
||||||
if(!($userid == null)){
|
if(!($userid == null)){
|
||||||
|
if($_SESSION['auth_status'] === "go_recovery"){
|
||||||
|
$userData = getUserData($pdo, $_SESSION['userid']);
|
||||||
|
if(!(empty($userData))){
|
||||||
|
$userid = $userData["userid"];
|
||||||
|
}else{
|
||||||
|
$_SESSION = array();
|
||||||
|
header("Location: badrecovery.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}elseif($_SESSION['auth_status'] === "bad_recovery"){
|
||||||
|
$_SESSION = array();
|
||||||
|
header("Location: badrecovery.php");
|
||||||
|
exit;
|
||||||
|
}else{
|
||||||
|
$_SESSION = array();
|
||||||
|
header("Location: badrecovery.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if( !empty($_SESSION['mailadds']) ) {
|
if( !empty($_SESSION['mailadds']) ) {
|
||||||
$result = $pdo->prepare("SELECT userid, username, mailadds, loginid, authcode, encryption_ivkey, datetime FROM account WHERE userid = :userid");
|
$result = $pdo->prepare("SELECT userid, username, mailadds, loginid, authcode, encryption_ivkey, datetime FROM account WHERE userid = :userid");
|
||||||
$result->bindValue(':userid', $userid);
|
$result->bindValue(':userid', $userid);
|
||||||
@@ -157,6 +176,7 @@ if(!($userid == null)){
|
|||||||
send_notification($userid,"uwuzu-fromsys","🔴アカウントのパスワードが復元により変更されました。🔴",$msg,"/others", "system");
|
send_notification($userid,"uwuzu-fromsys","🔴アカウントのパスワードが復元により変更されました。🔴",$msg,"/others", "system");
|
||||||
|
|
||||||
$_SESSION['userid'] = "";
|
$_SESSION['userid'] = "";
|
||||||
|
$_SESSION['auth_status'] = 'done_recovery';
|
||||||
$url = 'donerecovery.php';
|
$url = 'donerecovery.php';
|
||||||
header('Location: ' . $url, true, 303);
|
header('Location: ' . $url, true, 303);
|
||||||
|
|
||||||
@@ -258,6 +278,7 @@ if(!($userid == null)){
|
|||||||
send_notification($userid,"uwuzu-fromsys","🔴アカウントのパスワードが復元により変更されました。🔴",$msg,"/others", "system");
|
send_notification($userid,"uwuzu-fromsys","🔴アカウントのパスワードが復元により変更されました。🔴",$msg,"/others", "system");
|
||||||
|
|
||||||
$_SESSION['userid'] = "";
|
$_SESSION['userid'] = "";
|
||||||
|
$_SESSION['auth_status'] = 'done_recovery';
|
||||||
$url = 'donerecovery.php';
|
$url = 'donerecovery.php';
|
||||||
header('Location: ' . $url, true, 303);
|
header('Location: ' . $url, true, 303);
|
||||||
|
|
||||||
@@ -306,6 +327,7 @@ if(!($userid == null)){
|
|||||||
}else{
|
}else{
|
||||||
$_SESSION['mailadds'] = "";
|
$_SESSION['mailadds'] = "";
|
||||||
$_SESSION['userid'] = "";
|
$_SESSION['userid'] = "";
|
||||||
|
$_SESSION['auth_status'] = 'bad_recovery';
|
||||||
$url = 'badrecovery.php';
|
$url = 'badrecovery.php';
|
||||||
header('Location: ' . $url, true, 303);
|
header('Location: ' . $url, true, 303);
|
||||||
exit;
|
exit;
|
||||||
@@ -346,7 +368,8 @@ $pdo = null;
|
|||||||
<div class="textbox">
|
<div class="textbox">
|
||||||
<h1>二段階認証</h1>
|
<h1>二段階認証</h1>
|
||||||
|
|
||||||
<p>二段階認証コードと新しいパスワードを入力してください。</p>
|
<p>二段階認証コードと新しいパスワードを入力してください。<br>メールで認証することも可能です。</p>
|
||||||
|
<div class="p2">二段階認証コードを設定していない場合、メールで認証をしてください。</div>
|
||||||
|
|
||||||
<?php if( !empty($error_message) ): ?>
|
<?php if( !empty($error_message) ): ?>
|
||||||
<ul class="errmsg">
|
<ul class="errmsg">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uwuzu
|
uwuzu
|
||||||
1.6.6
|
1.6.7
|
||||||
2025/11/08
|
2025/12/26
|
||||||
daichimarukana,putonfps
|
daichimarukana,putonfps
|
||||||
@@ -1,6 +1,18 @@
|
|||||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||||
|
|
||||||
|
## Version 1.6.7 (Hapuego)
|
||||||
|
2025/12/26
|
||||||
|
fix: 通知ページにてユーザー名に含まれるカスタム絵文字が横にぎゅっと表示されてしまう問題を修正しました!
|
||||||
|
fix: パレットイメージがアップロードできない問題を修正しました!
|
||||||
|
fix: サーバーアイコンが設定されていない状態でuwuzuから通知が届くとアイコンが表示されない問題を修正しました!
|
||||||
|
fix: ユーズの装飾のコードブロック内でURLやハッシュタグなどを使用した際にPLACEHOLER(数字)と表示されてしまう問題を修正しました。
|
||||||
|
fix: パスワードの復元に関する脆弱性を修正しました!
|
||||||
|
new: uwuzuのセットアップ時に、データベース周りでエラーが発生した際に簡単なエラーで伝え、db.phpの中身が空になった際には自動で再生成する機能を追加しました!
|
||||||
|
new: ブックマーク追加時に画面上からお知らせするようにしました!
|
||||||
|
chg: uwuzuから通知を受け取った際に、ユーザー名部分のリンク先をサーバー情報ページに変更しました!
|
||||||
|
chg: その他微調整を行いました!
|
||||||
|
|
||||||
## Version 1.6.6 (Hapuego)
|
## Version 1.6.6 (Hapuego)
|
||||||
2025/11/08
|
2025/11/08
|
||||||
fix: アカウント削除時にフォロー情報が削除されない問題を修正しました!
|
fix: アカウント削除時にフォロー情報が削除されない問題を修正しました!
|
||||||
|
|||||||
+3
-3
@@ -545,7 +545,7 @@ $pdo = null;
|
|||||||
<!--ユーザーネーム関係-->
|
<!--ユーザーネーム関係-->
|
||||||
<div>
|
<div>
|
||||||
<p>ユーザーネーム</p>
|
<p>ユーザーネーム</p>
|
||||||
<input id="username" placeholder="" class="inbox" type="text" name="username" value="<?php if( !empty($userData['username']) ){ echo safetext( $userData['username']); } ?>">
|
<input id="username" placeholder="" class="inbox" type="text" name="username" value="<?php if( !empty($userData['username']) ){ echo safetext( $userData['username']); } ?>" autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>メールアドレス</p>
|
<p>メールアドレス</p>
|
||||||
@@ -621,11 +621,11 @@ $pdo = null;
|
|||||||
<h1>パスワード</h1>
|
<h1>パスワード</h1>
|
||||||
<div>
|
<div>
|
||||||
<p>ユーザーid</p>
|
<p>ユーザーid</p>
|
||||||
<input id="passchk_userid" type="text" class="inbox" name="passchk_userid" oncopy="return false" onpaste="return false" oncontextmenu="return false" value="">
|
<input id="passchk_userid" type="text" class="inbox" name="passchk_userid" value="">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>新しいパスワード</p>
|
<p>新しいパスワード</p>
|
||||||
<input id="password" type="password" class="inbox" name="password" oncopy="return false" onpaste="return false" oncontextmenu="return false" value="" autocomplete="new-password">
|
<input id="password" type="password" class="inbox" name="password" value="" autocomplete="new-password">
|
||||||
<div id="password_zxcvbn" class="p2" style="display: none;"></div>
|
<div id="password_zxcvbn" class="p2" style="display: none;"></div>
|
||||||
<p>パスワードを表示する</p>
|
<p>パスワードを表示する</p>
|
||||||
<div class="switch_button">
|
<div class="switch_button">
|
||||||
|
|||||||
@@ -25,61 +25,68 @@ if (isset($_FILES['update_zip']) && isset($_POST['userid']) && isset($_POST['acc
|
|||||||
);
|
);
|
||||||
$pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option);
|
$pdo = new PDO('mysql:charset=utf8mb4;dbname=' . DB_NAME . ';host=' . DB_HOST, DB_USER, DB_PASS, $option);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
// 接続エラーのときエラー内容を取得する
|
|
||||||
$error_message[] = $e->getMessage();
|
$error_message[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
if(empty($error_message)){
|
||||||
|
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||||
|
$query->execute(array(':userid' => $postUserid));
|
||||||
|
$result2 = $query->fetch();
|
||||||
|
|
||||||
$query->execute(array(':userid' => $postUserid));
|
if($result2["loginid"] === $loginid){
|
||||||
|
if($result2["admin"] === "yes"){
|
||||||
|
|
||||||
$result2 = $query->fetch();
|
$uploadDir = sys_get_temp_dir();
|
||||||
|
$uploadFile = $uploadDir . '/' . basename($_FILES['update_zip']['name']);
|
||||||
|
|
||||||
if($result2["loginid"] === $loginid){
|
if (move_uploaded_file($_FILES['update_zip']['tmp_name'], $uploadFile)) {
|
||||||
if($result2["admin"] === "yes"){
|
$extractPath = $uploadDir . '/uwuzu_update_' . createUniqId();
|
||||||
|
|
||||||
$uploadDir = sys_get_temp_dir();
|
$zip = new ZipArchive;
|
||||||
$uploadFile = $uploadDir . '/' . basename($_FILES['update_zip']['name']);
|
if ($zip->open($uploadFile) == true) {
|
||||||
|
$zip->extractTo($extractPath);
|
||||||
|
$zip->close();
|
||||||
|
|
||||||
if (move_uploaded_file($_FILES['update_zip']['tmp_name'], $uploadFile)) {
|
// JSONファイルを読み込む
|
||||||
$extractPath = $uploadDir . '/uwuzu_update_' . createUniqId();
|
$jsonFile = $extractPath . '/update.json';
|
||||||
|
if (file_exists($jsonFile)) {
|
||||||
$zip = new ZipArchive;
|
$jsonData = json_decode(file_get_contents($jsonFile), true);
|
||||||
if ($zip->open($uploadFile) == true) {
|
if (json_last_error() === JSON_ERROR_NONE) {
|
||||||
$zip->extractTo($extractPath);
|
$response = [
|
||||||
$zip->close();
|
'success' => true,
|
||||||
|
'software_name' => safetext($jsonData['software']) ?? '名前がありません',
|
||||||
// JSONファイルを読み込む
|
'version' => safetext($jsonData['version']) ?? 'バージョン情報がありません',
|
||||||
$jsonFile = $extractPath . '/update.json';
|
'release_notes' => safetext($jsonData['release_notes']) ?? 'リリースノートが見つかりません。',
|
||||||
if (file_exists($jsonFile)) {
|
'notices' => safetext($jsonData['notices']) ?? '注意事項が見つかりません。',
|
||||||
$jsonData = json_decode(file_get_contents($jsonFile), true);
|
'file_path' => safetext($extractPath)
|
||||||
if (json_last_error() === JSON_ERROR_NONE) {
|
];
|
||||||
$response = [
|
echo json_encode($response);
|
||||||
'success' => true,
|
} else {
|
||||||
'software_name' => safetext($jsonData['software']) ?? '名前がありません',
|
echo json_encode(['success' => false, 'error' => 'JSONファイルの読み込みに失敗しました。(ROADING_JSON_ERROR)']);
|
||||||
'version' => safetext($jsonData['version']) ?? 'バージョン情報がありません',
|
}
|
||||||
'release_notes' => safetext($jsonData['release_notes']) ?? 'リリースノートが見つかりません。',
|
|
||||||
'notices' => safetext($jsonData['notices']) ?? '注意事項が見つかりません。',
|
|
||||||
'file_path' => safetext($extractPath)
|
|
||||||
];
|
|
||||||
echo json_encode($response);
|
|
||||||
} else {
|
} else {
|
||||||
echo json_encode(['success' => false, 'error' => 'JSONファイルの読み込みに失敗しました。(ROADING_JSON_ERROR)']);
|
echo json_encode(['success' => false, 'error' => 'JSONファイルの読み込みに失敗しました。(ROADING_JSON_ERROR)']);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo json_encode(['success' => false, 'error' => 'JSONファイルの読み込みに失敗しました。(ROADING_JSON_ERROR)']);
|
echo json_encode(['success' => false, 'error' => '読み込みに失敗しました。1(ROADING_ERROR)']);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
echo json_encode(['success' => false, 'error' => '読み込みに失敗しました。1(ROADING_ERROR)']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists($uploadFile)) {
|
if (file_exists($uploadFile)) {
|
||||||
if (is_file($uploadFile)) {
|
if (is_file($uploadFile)) {
|
||||||
unlink($uploadFile);
|
unlink($uploadFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
echo json_encode(['success' => false, 'error' => 'ファイルの移動に失敗しました。(ROADING_ERROR)']);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
echo json_encode(['success' => false, 'error' => 'データベースの接続に失敗しました。(ERROR)']);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
echo json_encode(['success' => false, 'error' => '読み込みに失敗しました。2(ROADING_ERROR)']);
|
echo json_encode(['success' => false, 'error' => '読み込みに失敗しました。2(ROADING_ERROR)']);
|
||||||
|
|||||||
+2
-1
@@ -512,11 +512,12 @@ $(document).ready(function() {
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
// いいね成功時の処理
|
|
||||||
if (isLiked) {
|
if (isLiked) {
|
||||||
$this.removeClass('bookmark_after'); // クラスを削除していいねを取り消す
|
$this.removeClass('bookmark_after'); // クラスを削除していいねを取り消す
|
||||||
|
view_notify("ブックマークを解除しました");
|
||||||
} else {
|
} else {
|
||||||
$this.addClass('bookmark_after'); // クラスを追加していいねを追加する
|
$this.addClass('bookmark_after'); // クラスを追加していいねを追加する
|
||||||
|
view_notify("ユーズをブックマークしました!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// いいね失敗時の処理
|
// いいね失敗時の処理
|
||||||
|
|||||||
+22
-4
@@ -1,15 +1,33 @@
|
|||||||
{
|
{
|
||||||
"software": "uwuzu",
|
"software": "uwuzu",
|
||||||
"version": "1.6.6",
|
"version": "1.6.7",
|
||||||
"release_date": "2025/11/08",
|
"release_date": "2025/12/26",
|
||||||
"release_notes": "このアップデートでは、フォローに関するバグの修正などが含まれます。\n詳細はリリースノートをご確認ください。",
|
"release_notes": "このアップデートには、パスワードの復元に関する脆弱性の修正が含まれます。\nまた、パレットイメージが投稿できない問題など、いくつかのバグ修正が含まれます!\n詳細はリリースノートをご確認ください。",
|
||||||
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!",
|
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!",
|
||||||
"files": {
|
"files": {
|
||||||
"overwrite": [
|
"overwrite": [
|
||||||
|
"/admin/addadmin.php",
|
||||||
|
"/admin/index.php",
|
||||||
|
"/admin/setup_db_php.php",
|
||||||
|
"/admin/setup_uwuzu_db.php",
|
||||||
|
"/admin/success.php",
|
||||||
|
"/css/home.css",
|
||||||
|
"/js/view_function.js",
|
||||||
|
"/settings_admin/api/update_query.php",
|
||||||
|
"/uwuzu_error_code.txt",
|
||||||
"/function/function.php",
|
"/function/function.php",
|
||||||
|
"/nextpage/notification.php",
|
||||||
|
"/bookmark/bookmark.php",
|
||||||
|
"/bookmark/index.php",
|
||||||
|
"/home/index.php",
|
||||||
|
"/settings/index.php",
|
||||||
|
"/ueuse/index.php",
|
||||||
|
"/user/index.php",
|
||||||
|
"/img/sysimage/errorimage/icon_404.png",
|
||||||
"/passrecovery/badrecovery.php",
|
"/passrecovery/badrecovery.php",
|
||||||
"/passrecovery/donerecovery.php",
|
"/passrecovery/donerecovery.php",
|
||||||
"/user/index.php",
|
"/passrecovery/index.php",
|
||||||
|
"/passrecovery/startrecovery.php",
|
||||||
"/server/uwuzuabout.txt",
|
"/server/uwuzuabout.txt",
|
||||||
"/server/uwuzuinfo.txt",
|
"/server/uwuzuinfo.txt",
|
||||||
"/server/uwuzurelease.txt"
|
"/server/uwuzurelease.txt"
|
||||||
|
|||||||
+4
-3
@@ -347,10 +347,10 @@ require('../logout/logout.php');
|
|||||||
<!--ここまで!--->
|
<!--ここまで!--->
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="hed">
|
<div class="hed">
|
||||||
<img src="<?php echo safetext($userdata['headname']); ?>">
|
<img src="<?php echo safetext($userdata['headname']); ?>" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/image_404.png'">
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<img src="<?php echo safetext($userdata['iconname']); ?>">
|
<img src="<?php echo safetext($userdata['iconname']); ?>" onerror="this.onerror=null;this.src='../img/sysimage/errorimage/icon_404.png'">
|
||||||
<h2><?php echo replaceProfileEmojiImages(safetext($userData['username'])); ?></h2>
|
<h2><?php echo replaceProfileEmojiImages(safetext($userData['username'])); ?></h2>
|
||||||
<p>@<?php echo safetext($userData['userid']); ?><?php if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){echo "<span>@".safetext($activity_domain)."</span>";} ?></p>
|
<p>@<?php echo safetext($userData['userid']); ?><?php if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){echo "<span>@".safetext($activity_domain)."</span>";} ?></p>
|
||||||
</div>
|
</div>
|
||||||
@@ -917,11 +917,12 @@ require('../logout/logout.php');
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
// いいね成功時の処理
|
|
||||||
if (isLiked) {
|
if (isLiked) {
|
||||||
$this.removeClass('bookmark_after'); // クラスを削除していいねを取り消す
|
$this.removeClass('bookmark_after'); // クラスを削除していいねを取り消す
|
||||||
|
view_notify("ブックマークを解除しました");
|
||||||
} else {
|
} else {
|
||||||
$this.addClass('bookmark_after'); // クラスを追加していいねを追加する
|
$this.addClass('bookmark_after'); // クラスを追加していいねを追加する
|
||||||
|
view_notify("ユーズをブックマークしました!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// いいね失敗時の処理
|
// いいね失敗時の処理
|
||||||
|
|||||||
Reference in New Issue
Block a user