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

uwuzu v1.4.15 Funium

This commit is contained in:
Daichimarukana
2025-03-15 18:38:49 +09:00
parent bc8b6cd800
commit 8b7604a90a
31 changed files with 524 additions and 321 deletions
+9 -5
View File
@@ -1,4 +1,5 @@
<?php <?php
header('Content-Type: application/json');
$mojisizefile = "../server/textsize.txt"; $mojisizefile = "../server/textsize.txt";
$banurldomainfile = "../server/banurldomain.txt"; $banurldomainfile = "../server/banurldomain.txt";
@@ -10,12 +11,19 @@ require('../db.php');
require("../function/function.php"); require("../function/function.php");
blockedIP($_SERVER['REMOTE_ADDR']); blockedIP($_SERVER['REMOTE_ADDR']);
if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['abitext'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))) { if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['abitext'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) {
$userid = safetext($_POST['userid']); $userid = safetext($_POST['userid']);
$postUniqid = safetext($_POST['uniqid']); $postUniqid = safetext($_POST['uniqid']);
$abitext = safetext($_POST['abitext']); $abitext = safetext($_POST['abitext']);
$loginid = safetext($_POST['account_id']); $loginid = safetext($_POST['account_id']);
$loginkey = safetext($_COOKIE['loginkey']);
$is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user");
if ($is_login === false) {
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
exit;
}
$abidate = date("Y-m-d H:i:s"); $abidate = date("Y-m-d H:i:s");
@@ -105,21 +113,17 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['abitext'])) && s
} }
if ($res) { if ($res) {
header('Content-Type: application/json');
echo json_encode(['success' => true]); echo json_encode(['success' => true]);
exit; exit;
} else { } else {
header('Content-Type: application/json');
echo json_encode(['success' => false, 'error' => '追加に失敗しました。']); echo json_encode(['success' => false, 'error' => '追加に失敗しました。']);
exit; exit;
} }
} catch(PDOException $e) { } catch(PDOException $e) {
header('Content-Type: application/json');
echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]); echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]);
exit; exit;
} }
}else{ }else{
header('Content-Type: application/json');
echo json_encode(['success' => false, 'error' => 'すでに追記済みです。']); echo json_encode(['success' => false, 'error' => 'すでに追記済みです。']);
exit; exit;
} }
+6 -1
View File
@@ -33,7 +33,12 @@ $res = null;
$option = null; $option = null;
$userid = $_SESSION['userid']; if( !empty($_SESSION['userid']) ) {
$userid = $_SESSION['userid'];
}else{
header("Location: login.php");
exit;
}
try { try {
+6 -1
View File
@@ -28,7 +28,12 @@ $res = null;
$option = null; $option = null;
$userid = $_SESSION['userid']; if( !empty($_SESSION['userid']) ) {
$userid = $_SESSION['userid'];
}else{
header("Location: login.php");
exit;
}
// データベースに接続 // データベースに接続
+22 -2
View File
@@ -36,8 +36,12 @@ session_set_cookie_params([
session_start(); session_start();
session_regenerate_id(true); session_regenerate_id(true);
$userid = $_SESSION['userid']; if( !empty($_SESSION['userid']) ) {
$userid = $_SESSION['userid'];
}else{
header("Location: login.php");
exit;
}
try { try {
$option = array( $option = array(
@@ -61,8 +65,20 @@ if(!($is_login === false)){
exit; exit;
} }
//------------------------------------------------------------- //-------------------------------------------------------------
//パスワード試行回数制限-------------------------------------------
if (!isset($_SESSION['login_passtry'])) {
$_SESSION['login_passtry'] = 0;
}
//-------------------------------------------------------------
if( !empty($_POST['btn_submit']) ) { if( !empty($_POST['btn_submit']) ) {
if ($_SESSION["login_passtry"] <= 5) {
$delay = $_SESSION["login_passtry"] * 2;
} else {
$delay = min(pow(2, $_SESSION["login_passtry"] - 2), 60);
}
sleep($delay);
$useragent = safetext($_SERVER['HTTP_USER_AGENT']); $useragent = safetext($_SERVER['HTTP_USER_AGENT']);
$device = UserAgent_to_Device($useragent); $device = UserAgent_to_Device($useragent);
@@ -170,6 +186,7 @@ if( !empty($_POST['btn_submit']) ) {
$_SESSION['username'] = $username; $_SESSION['username'] = $username;
$_SESSION['password'] = null; $_SESSION['password'] = null;
$_SESSION["login_passtry"] = 0;
// リダイレクト先のURLへ転送する // リダイレクト先のURLへ転送する
$url = '/home'; $url = '/home';
@@ -178,6 +195,7 @@ if( !empty($_POST['btn_submit']) ) {
// すべての出力を終了 // すべての出力を終了
exit; exit;
}else{ }else{
$_SESSION["login_passtry"]++;
$error_message[] = "そのバックアップコードは使用できません。(BACKUPCODE_DAME)"; $error_message[] = "そのバックアップコードは使用できません。(BACKUPCODE_DAME)";
} }
}else{ }else{
@@ -271,6 +289,7 @@ if( !empty($_POST['btn_submit']) ) {
$_SESSION['username'] = $username; $_SESSION['username'] = $username;
$_SESSION['password'] = null; $_SESSION['password'] = null;
$_SESSION["login_passtry"] = 0;
// リダイレクト先のURLへ転送する // リダイレクト先のURLへ転送する
$url = '/home'; $url = '/home';
@@ -280,6 +299,7 @@ if( !empty($_POST['btn_submit']) ) {
exit; exit;
}else { }else {
$_SESSION["login_passtry"]++;
$error_message[] = '二段階認証が出来ませんでした。再度お試しください。(AUTHCODE_CHECK_DAME)'; $error_message[] = '二段階認証が出来ませんでした。再度お試しください。(AUTHCODE_CHECK_DAME)';
} }
} }
+11 -3
View File
@@ -1,12 +1,20 @@
<?php <?php
header('Content-Type: application/json');
require('../db.php'); require('../db.php');
require("../function/function.php"); require("../function/function.php");
blockedIP($_SERVER['REMOTE_ADDR']); blockedIP($_SERVER['REMOTE_ADDR']);
if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))) { if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) {
$postUniqid = safetext($_POST['uniqid']); $postUniqid = safetext($_POST['uniqid']);
$userId = safetext($_POST['userid']); $userId = safetext($_POST['userid']);
$loginid = safetext($_POST['account_id']); $loginid = safetext($_POST['account_id']);
$loginkey = safetext($_COOKIE['loginkey']);
$is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user");
if ($is_login === false) {
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
exit;
}
try { try {
$option = array( $option = array(
@@ -48,10 +56,10 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && sa
$index = array_search($postUniqid, $bookmarkList); $index = array_search($postUniqid, $bookmarkList);
if ($index === false) { if ($index === false) {
// ユーザーIDを追加 // UniqIDを追加
$bookmarkList[] = $postUniqid; $bookmarkList[] = $postUniqid;
} else { } else {
// ユーザーIDを削除 // UniqIDを削除
array_splice($bookmarkList, $index, 1); array_splice($bookmarkList, $index, 1);
} }
+6 -7
View File
@@ -475,7 +475,7 @@ $(document).ready(function () {
var uniqid = $(this).parents().attr('data-uniqid'); var uniqid = $(this).parents().attr('data-uniqid');
$('#ReuseCancelButton').on('click', function (event) { $('#ReuseCancelButton').off('click').on('click', function (event) {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
@@ -483,29 +483,28 @@ $(document).ready(function () {
}, 150); }, 150);
}); });
$('#ReuseButton').on('click', function (event) { $('#ReuseButton').off('click').on('click', function (event) { // ここを修正
event.preventDefault(); event.preventDefault();
var reusetext = $("#reusetexts").val(); var reusetext = $("#reusetexts").val();
if(reusetext == ""){ if (reusetext == "") {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
reuseModal.hide(); reuseModal.hide();
}, 150); }, 150);
}else{ } else {
$.ajax({ $.ajax({
url: '../function/reuse.php', url: '../function/reuse.php',
method: 'POST', method: 'POST',
data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id },
dataType: 'json', dataType: 'json',
success: function (response) { success: function (response) {
if (response.success) {
reuseModal.hide(); reuseModal.hide();
if (response.success) {
view_notify("引用リユーズしました"); view_notify("引用リユーズしました");
} else { } else {
reuseModal.hide();
view_notify("引用リユーズに失敗しました"); view_notify("引用リユーズに失敗しました");
} }
}, },
+5
View File
@@ -42,7 +42,12 @@ try {
); );
$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);
if( !empty($_SESSION['userid']) ) {
$userid = $_SESSION['userid']; $userid = $_SESSION['userid'];
}else{
header("Location: login.php");
exit;
}
$userData = getUserData($pdo, $userid); $userData = getUserData($pdo, $userid);
$roles = explode(',', $userData["role"]); // カンマで区切られたロールを配列に分割 $roles = explode(',', $userData["role"]); // カンマで区切られたロールを配列に分割
+9 -1
View File
@@ -2,11 +2,19 @@
require('../db.php'); require('../db.php');
require("../function/function.php"); require("../function/function.php");
blockedIP($_SERVER['REMOTE_ADDR']); blockedIP($_SERVER['REMOTE_ADDR']);
header('Content-Type: application/json');
if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))){ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) {
$postUserid = safetext($_POST['userid']); $postUserid = safetext($_POST['userid']);
$postUniqid = safetext($_POST['uniqid']); $postUniqid = safetext($_POST['uniqid']);
$loginid = safetext($_POST['account_id']); $loginid = safetext($_POST['account_id']);
$loginkey = safetext($_COOKIE['loginkey']);
$is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user");
if ($is_login === false) {
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
exit;
}
$result = delete_ueuse($postUniqid, $postUserid, $loginid); $result = delete_ueuse($postUniqid, $postUserid, $loginid);
if($result[0] === true){ if($result[0] === true){
+9 -1
View File
@@ -1,12 +1,20 @@
<?php <?php
header('Content-Type: application/json');
require('../db.php'); require('../db.php');
require('../function/function.php'); require('../function/function.php');
blockedIP($_SERVER['REMOTE_ADDR']); blockedIP($_SERVER['REMOTE_ADDR']);
if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))) { if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) {
$postUniqid = safetext($_POST['uniqid']); $postUniqid = safetext($_POST['uniqid']);
$userId = safetext($_POST['userid']); $userId = safetext($_POST['userid']);
$loginid = safetext($_POST['account_id']); $loginid = safetext($_POST['account_id']);
$loginkey = safetext($_COOKIE['loginkey']);
$is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user");
if ($is_login === false) {
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
exit;
}
try { try {
$option = array( $option = array(
+71 -6
View File
@@ -67,6 +67,7 @@ function blockedIP($ip_addr) {
} }
} }
} }
//通常のログイン処理
function uwuzuUserLogin($session, $cookie, $ip_addr, $operation_permission = "user") { function uwuzuUserLogin($session, $cookie, $ip_addr, $operation_permission = "user") {
//セッション,クッキー,IPアドレス,閲覧権限(userかadminかの二種類)を受け取る //セッション,クッキー,IPアドレス,閲覧権限(userかadminかの二種類)を受け取る
$serversettings_file = $_SERVER['DOCUMENT_ROOT']."/server/serversettings.ini"; $serversettings_file = $_SERVER['DOCUMENT_ROOT']."/server/serversettings.ini";
@@ -218,6 +219,66 @@ function uwuzuUserLogin($session, $cookie, $ip_addr, $operation_permission = "us
return false; return false;
} }
} }
//APIなどのログイン処理(loginidとloginkeyが有効かを確かめる)
function uwuzuUserLoginCheck($loginid, $loginkey, $operation_permission = "user") {
//セッション,クッキー,IPアドレス,閲覧権限(userかadminかの二種類)を受け取る
$serversettings_file = $_SERVER['DOCUMENT_ROOT']."/server/serversettings.ini";
$serversettings = parse_ini_file($serversettings_file, true);
// データベースに接続
try {
$option = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::MYSQL_ATTR_MULTI_STATEMENTS => false
);
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option);
} catch(PDOException $e) {
actionLog(null, "error", "uwuzuUserLogin", null, $e, 4);
return false;
}
if(!(isset($loginid))){
return false;
exit;
}
if(!(isset($loginkey))){
return false;
exit;
}
$loginQuery = $pdo->prepare("SELECT * FROM account WHERE loginid = :loginid");
$loginQuery->bindValue(':loginid', $loginid);
$loginQuery->execute();
$loginResponse = $loginQuery->fetch();
if(empty($loginResponse["userid"])){
return false;
}elseif($loginid === $loginResponse["loginid"]){
$userEncKey = GenUserEnckey($loginResponse["datetime"]);
$userLoginKey = hash_hmac('sha256', $loginResponse["loginid"], $userEncKey);
if(!(empty($loginkey))){
if(hash_equals($loginkey, $userLoginKey)){
if($operation_permission == "admin"){
if($loginResponse["admin"] == "yes"){
$is_login = true;
}else{
$is_login = false;
}
}else{
$is_login = true;
}
}else{
$is_login = false;
}
}else{
$is_login = false;
}
return $is_login;
}else{
return false;
}
}
//---------UNIQID-MAKER--------- //---------UNIQID-MAKER---------
function createUniqId(){ function createUniqId(){
list($msec, $sec) = explode(" ", microtime()); list($msec, $sec) = explode(" ", microtime());
@@ -1620,10 +1681,11 @@ function follow_user($pdo, $to_userid, $userid){
$pdo->beginTransaction(); $pdo->beginTransaction();
try { try {
// フォローボタンが押された場合の処理 // フォローボタンが押された場合の処理
$followerList = explode(',', $userData['follower']); $followerList = explode(',', $userData['follower'] ?? '');
if (!(in_array($userid, $followerList))) { if (!(in_array($userid, $followerList))) {
// 自分が相手をフォローしていない場合、相手のfollowerカラムと自分のfollowカラムを更新 // 自分が相手をフォローしていない場合、相手のfollowerカラムと自分のfollowカラムを更新
$followerList[] = $userid; $followerList[] = $userid;
$followerList = array_values(array_unique(array_filter($followerList)));
$newFollowerList = implode(',', $followerList); $newFollowerList = implode(',', $followerList);
// UPDATE文を実行してフォロー情報を更新 // UPDATE文を実行してフォロー情報を更新
@@ -1635,7 +1697,8 @@ function follow_user($pdo, $to_userid, $userid){
// 自分のfollowカラムを更新 // 自分のfollowカラムを更新
$myflwlist = explode(',', $myData["follow"]); $myflwlist = explode(',', $myData["follow"]);
$myflwlist[] = $userData['userid']; $myflwlist[] = $userData['userid'];
$newFollowList = implode(',', array_unique($myflwlist)); $myflwlist = array_values(array_unique(array_filter($myflwlist)));
$newFollowList = implode(',', $myflwlist);
$updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid"); $updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid");
$updateQuery->bindValue(':follow', $newFollowList, PDO::PARAM_STR); $updateQuery->bindValue(':follow', $newFollowList, PDO::PARAM_STR);
@@ -1649,16 +1712,16 @@ function follow_user($pdo, $to_userid, $userid){
return true; return true;
} else { } else {
$pdo->rollBack(); $pdo->rollBack();
actionLog($userid, "error", "unfollow_user", $to_userid, "フォロー解除に失敗", 3); actionLog($userid, "error", "follow_user", $to_userid, "フォローに失敗", 3);
return false; return false;
} }
}else{ }else{
$pdo->rollBack(); $pdo->commit();
return true; return true;
} }
} catch (Exception $e) { } catch (Exception $e) {
$pdo->rollBack(); $pdo->rollBack();
actionLog($userid, "error", "unfollow_user", $to_userid, $e, 4); actionLog($userid, "error", "follow_user", $to_userid, $e, 4);
return false; return false;
} }
}else{ }else{
@@ -1688,6 +1751,7 @@ function unfollow_user($pdo, $to_userid, $userid){
if (in_array($userid, $followerList)) { if (in_array($userid, $followerList)) {
// 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新 // 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新
$followerList = array_diff($followerList, array($userid)); $followerList = array_diff($followerList, array($userid));
$followerList = array_values(array_unique(array_filter($followerList)));
$newFollowerList = implode(',', $followerList); $newFollowerList = implode(',', $followerList);
// UPDATE文を実行してフォロー情報を更新 // UPDATE文を実行してフォロー情報を更新
@@ -1698,6 +1762,7 @@ function unfollow_user($pdo, $to_userid, $userid){
$myflwlist = explode(',', $myData["follow"]); $myflwlist = explode(',', $myData["follow"]);
$delfollowList = array_diff($myflwlist, array($userData['userid'])); $delfollowList = array_diff($myflwlist, array($userData['userid']));
$delfollowList = array_values(array_unique(array_filter($delfollowList)));
$deluserid = implode(',', $delfollowList); $deluserid = implode(',', $delfollowList);
// 自分のfollowカラムから相手のユーザーIDを削除 // 自分のfollowカラムから相手のユーザーIDを削除
@@ -1717,7 +1782,7 @@ function unfollow_user($pdo, $to_userid, $userid){
return false; return false;
} }
}else{ }else{
$pdo->rollBack(); $pdo->commit();
return true; return true;
} }
} catch (Exception $e) { } catch (Exception $e) {
+8 -1
View File
@@ -4,7 +4,7 @@ header('Content-Type: application/json');
require('../db.php'); require('../db.php');
require("function.php"); require("function.php");
blockedIP($_SERVER['REMOTE_ADDR']); blockedIP($_SERVER['REMOTE_ADDR']);
if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['reusetext'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))) { if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['reusetext'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) {
try { try {
$option = array( $option = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
@@ -21,6 +21,13 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['reusetext'])) &&
$postUniqid = safetext($_POST['uniqid']); $postUniqid = safetext($_POST['uniqid']);
$reusetext = safetext($_POST['reusetext']); $reusetext = safetext($_POST['reusetext']);
$loginid = safetext($_POST['account_id']); $loginid = safetext($_POST['account_id']);
$loginkey = safetext($_COOKIE['loginkey']);
$is_login = uwuzuUserLoginCheck($loginid, $loginkey, "user");
if ($is_login === false) {
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
exit;
}
$reusedate = date("Y-m-d H:i:s"); $reusedate = date("Y-m-d H:i:s");
+10 -8
View File
@@ -410,7 +410,10 @@ $(document).ready(function() {
return null; return null;
} }
var now_time = new Date().toUTCString();
function loadPosts() { function loadPosts() {
now_time = new Date().toUTCString();
if (isLoading) return; if (isLoading) return;
isLoading = true; isLoading = true;
$("#loading").show(); $("#loading").show();
@@ -725,7 +728,7 @@ $(document).ready(function() {
var uniqid = $(this).parents().attr('data-uniqid'); var uniqid = $(this).parents().attr('data-uniqid');
$('#ReuseCancelButton').on('click', function (event) { $('#ReuseCancelButton').off('click').on('click', function (event) {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
@@ -733,29 +736,28 @@ $(document).ready(function() {
}, 150); }, 150);
}); });
$('#ReuseButton').on('click', function (event) { $('#ReuseButton').off('click').on('click', function (event) { // ここを修正
event.preventDefault(); event.preventDefault();
var reusetext = $("#reusetexts").val(); var reusetext = $("#reusetexts").val();
if(reusetext == ""){ if (reusetext == "") {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
reuseModal.hide(); reuseModal.hide();
}, 150); }, 150);
}else{ } else {
$.ajax({ $.ajax({
url: '../function/reuse.php', url: '../function/reuse.php',
method: 'POST', method: 'POST',
data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id },
dataType: 'json', dataType: 'json',
success: function (response) { success: function (response) {
if (response.success) {
reuseModal.hide(); reuseModal.hide();
if (response.success) {
view_notify("引用リユーズしました"); view_notify("引用リユーズしました");
} else { } else {
reuseModal.hide();
view_notify("引用リユーズに失敗しました"); view_notify("引用リユーズに失敗しました");
} }
}, },
@@ -768,6 +770,7 @@ $(document).ready(function() {
}); });
}); });
$(document).on('click', '#normal_reuse_btn', function (event) { $(document).on('click', '#normal_reuse_btn', function (event) {
event.preventDefault(); event.preventDefault();
var uniqid = $(this).parents().attr('data-uniqid'); var uniqid = $(this).parents().attr('data-uniqid');
@@ -867,7 +870,6 @@ $(document).ready(function() {
osho_gats.style.display = 'none'; osho_gats.style.display = 'none';
}); });
var now_time = new Date().toUTCString();
setInterval(() => { setInterval(() => {
$.ajax({ $.ajax({
url: '../nextpage/newueuse_chk.php', url: '../nextpage/newueuse_chk.php',
+20 -4
View File
@@ -66,6 +66,12 @@ if(!($is_login === false)){
} }
//------------------------------------------------------------- //-------------------------------------------------------------
//パスワード試行回数制限-------------------------------------------
if (!isset($_SESSION['login_passtry'])) {
$_SESSION['login_passtry'] = 0;
}
//-------------------------------------------------------------
if( !empty($_POST['btn_submit']) ) { if( !empty($_POST['btn_submit']) ) {
$_SESSION['form_data'] = $_POST; $_SESSION['form_data'] = $_POST;
@@ -157,6 +163,13 @@ if( !empty($_POST['btn_submit']) ) {
} }
if(empty($error_message)){ if(empty($error_message)){
if ($_SESSION["login_passtry"] <= 5) {
$delay = $_SESSION["login_passtry"] * 2;
} else {
$delay = min(pow(2, $_SESSION["login_passtry"] - 2), 60);
}
sleep($delay);
if($result->rowCount() > 0) { if($result->rowCount() > 0) {
$row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する $row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する
@@ -164,6 +177,7 @@ if( !empty($_POST['btn_submit']) ) {
if(uwuzu_password_verify($password,$row["password"])){ if(uwuzu_password_verify($password,$row["password"])){
if(empty($row["authcode"])){ if(empty($row["authcode"])){
$_SESSION['userid'] = $userid; $_SESSION['userid'] = $userid;
$_SESSION["login_passtry"] = 0;
$_SESSION['form_data'] = array();//フォーム初期化 $_SESSION['form_data'] = array();//フォーム初期化
// リダイレクト先のURLへ転送する // リダイレクト先のURLへ転送する
@@ -174,6 +188,7 @@ if( !empty($_POST['btn_submit']) ) {
exit; exit;
}else{ }else{
$_SESSION['userid'] = $userid; $_SESSION['userid'] = $userid;
$_SESSION["login_passtry"] = 0;
$_SESSION['form_data'] = array();//フォーム初期化 $_SESSION['form_data'] = array();//フォーム初期化
$url = 'authlogin.php'; $url = 'authlogin.php';
@@ -182,15 +197,16 @@ if( !empty($_POST['btn_submit']) ) {
// すべての出力を終了 // すべての出力を終了
exit; exit;
} }
} }else{
else{ $_SESSION["login_passtry"]++;
$error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)'; $error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)';
} }
}else{ }else{
$_SESSION["login_passtry"]++;
$error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)'; $error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)';
} }
} }else {
else { $_SESSION["login_passtry"]++;
$error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)'; $error_message[] = 'IDまたはパスワードが違います(PASS_AND_ID_CHIGAUYANKE)';
} }
} }
+1 -1
View File
@@ -139,7 +139,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
if(!empty($messages)){ if(!empty($messages)){
foreach ($messages as $value) { foreach ($messages as $value) {
if (false === strpos($myblocklist, ','.safetext($value['account']))) { if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){
if(!($value["role"] === "ice")){ if(!($value["role"] === "ice")){
$value["bookmark"] = $mybookmark; $value["bookmark"] = $mybookmark;
+1 -1
View File
@@ -256,7 +256,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
if(!empty($messages)){ if(!empty($messages)){
foreach ($messages as $value) { foreach ($messages as $value) {
if (false === strpos($myblocklist, ','.safetext($value['account']))) { if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){
if(!($value["role"] === "ice")){ if(!($value["role"] === "ice")){
$fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数
+1 -1
View File
@@ -138,7 +138,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
if(!empty($messages)){ if(!empty($messages)){
foreach ($messages as $value) { foreach ($messages as $value) {
if (false === strpos($myblocklist, ','.safetext($value['account']))) { if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){
if(!($value["role"] === "ice")){ if(!($value["role"] === "ice")){
$value["bookmark"] = $mybookmark; $value["bookmark"] = $mybookmark;
+1 -1
View File
@@ -122,7 +122,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
if(!empty($messages)){ if(!empty($messages)){
foreach ($messages as $value) { foreach ($messages as $value) {
if (false === strpos($myblocklist, ','.safetext($value['account']))) { if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){
if(!($value["role"] === "ice")){ if(!($value["role"] === "ice")){
$fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数
+1 -1
View File
@@ -137,7 +137,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
if(!empty($messages)){ if(!empty($messages)){
foreach ($messages as $value) { foreach ($messages as $value) {
if (false === strpos($myblocklist, ','.safetext($value['account']))) { if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){
$value["bookmark"] = $mybookmark; $value["bookmark"] = $mybookmark;
$fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数
+12 -4
View File
@@ -56,19 +56,27 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
$userQuery->execute(); $userQuery->execute();
$userData = $userQuery->fetch(); $userData = $userQuery->fetch();
$itemsPerPage = 15; // 取得件数の基準
$offset = ($pageNumber - 1) * $itemsPerPage;
$message_array = [];
$sql = "SELECT ueuse.* $sql = "SELECT ueuse.*
FROM ueuse FROM ueuse
LEFT JOIN account ON ueuse.account = account.userid LEFT JOIN account ON ueuse.account = account.userid
WHERE ueuse.favorite LIKE :userid AND account.role != 'ice' WHERE FIND_IN_SET(:userid, REPLACE(ueuse.favorite, ' ', '')) > 0
AND account.role != 'ice'
ORDER BY ueuse.datetime DESC ORDER BY ueuse.datetime DESC
LIMIT :offset, :itemsPerPage"; LIMIT :offset, :itemsPerPage";
$stmt = $pdo->prepare($sql); $stmt = $pdo->prepare($sql);
$stmt->bindValue(':userid', '%,' . $uwuzuid . '%', PDO::PARAM_STR); $stmt->bindValue(':userid', $uwuzuid, PDO::PARAM_STR);
$stmt->bindValue(':offset', $offset, PDO::PARAM_INT); $stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
$stmt->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT); $stmt->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT);
$stmt->execute(); $stmt->execute();
$message_array = $stmt->fetchAll(); $results = $stmt->fetchAll();
// 結果を追加
$message_array = array_merge($message_array, $results);
$messages = array(); $messages = array();
foreach ($message_array as $row) { foreach ($message_array as $row) {
@@ -129,7 +137,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
if(!empty($messages)){ if(!empty($messages)){
foreach ($messages as $value) { foreach ($messages as $value) {
if (false === strpos($myblocklist, ','.safetext($value['account']))) { if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){
$value["bookmark"] = $mybookmark; $value["bookmark"] = $mybookmark;
$fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数
+1 -1
View File
@@ -129,7 +129,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
if(!empty($messages)){ if(!empty($messages)){
foreach ($messages as $value) { foreach ($messages as $value) {
if (false === strpos($myblocklist, ','.safetext($value['account']))) { if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){
$value["bookmark"] = $mybookmark; $value["bookmark"] = $mybookmark;
$fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数
+1 -1
View File
@@ -122,7 +122,7 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
if(!empty($messages)){ if(!empty($messages)){
foreach ($messages as $value) { foreach ($messages as $value) {
if (false === strpos($myblocklist, ','.safetext($value['account']))) { if (!(in_array(safetext($value['account']), explode(",", $myblocklist)))){
$value["bookmark"] = $mybookmark; $value["bookmark"] = $mybookmark;
$fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数 $fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数
+6 -7
View File
@@ -495,7 +495,7 @@ $(document).ready(function() {
var uniqid = $(this).parents().attr('data-uniqid'); var uniqid = $(this).parents().attr('data-uniqid');
$('#ReuseCancelButton').on('click', function (event) { $('#ReuseCancelButton').off('click').on('click', function (event) {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
@@ -503,29 +503,28 @@ $(document).ready(function() {
}, 150); }, 150);
}); });
$('#ReuseButton').on('click', function (event) { $('#ReuseButton').off('click').on('click', function (event) { // ここを修正
event.preventDefault(); event.preventDefault();
var reusetext = $("#reusetexts").val(); var reusetext = $("#reusetexts").val();
if(reusetext == ""){ if (reusetext == "") {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
reuseModal.hide(); reuseModal.hide();
}, 150); }, 150);
}else{ } else {
$.ajax({ $.ajax({
url: '../function/reuse.php', url: '../function/reuse.php',
method: 'POST', method: 'POST',
data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id },
dataType: 'json', dataType: 'json',
success: function (response) { success: function (response) {
if (response.success) {
reuseModal.hide(); reuseModal.hide();
if (response.success) {
view_notify("引用リユーズしました"); view_notify("引用リユーズしました");
} else { } else {
reuseModal.hide();
view_notify("引用リユーズに失敗しました"); view_notify("引用リユーズに失敗しました");
} }
}, },
+2 -2
View File
@@ -1,4 +1,4 @@
uwuzu uwuzu
1.4.14 1.4.15
2025/01/26 2025/03/15
daichimarukana,putonfps daichimarukana,putonfps
+12
View File
@@ -1,6 +1,18 @@
## リリースノートだぜぇぇぇぇぇぇい!!!!!!! ## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...) ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
## Version 1.4.15 (Funium)
2025/03/15
fix: フォロー・フォロー解除の安定化を行いました。
fix: ブロックしていないユーザーがブロックされていると判定されてしまう問題を修正しました!
fix: 引用リユーズが勝手に複数回行われてしまう問題を修正しました!
fix: 最新のユーズが読み込まれているのにもかかわらず、"🍊新しいユーズがあります!"が表示されてしまう問題を修正しました!
fix: ログインに関するバグを修正しました!
fix: ユーザーページにていいね欄に他のユーザーのいいねしたユーズが表示されてしまう問題を修正しました
fix: 管理者がユーザーに個別で通知を送信する機能で本文の最大文字数が128文字に制限されてしまう問題を修正しました!
new: 総当たり攻撃を防ぐためログイン時に失敗回数に応じて遅延させる機能を追加しました!
new: 内部APIのセキュリティ認証を強化しました!
## Version 1.4.14 (Funium) ## Version 1.4.14 (Funium)
2025/01/26 2025/01/26
fix: その他ページでのバグを修正しました。 fix: その他ページでのバグを修正しました。
+8 -1
View File
@@ -6,10 +6,17 @@ blockedIP($_SERVER['REMOTE_ADDR']);
header("Content-Type: application/json; charset=utf-8"); header("Content-Type: application/json; charset=utf-8");
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Origin: *");
if (safetext(isset($_POST['code'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))){ if (safetext(isset($_POST['code'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id'])) && safetext(isset($_COOKIE['loginkey']))) {
$postUserid = safetext($_POST['userid']); $postUserid = safetext($_POST['userid']);
$postCode= safetext($_POST['code']); $postCode= safetext($_POST['code']);
$loginid = safetext($_POST['account_id']); $loginid = safetext($_POST['account_id']);
$loginkey = safetext($_COOKIE['loginkey']);
$is_login = uwuzuUserLoginCheck($loginid, $loginkey, "admin");
if ($is_login === false) {
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
exit;
}
try { try {
$option = array( $option = array(
+8 -1
View File
@@ -6,10 +6,17 @@ blockedIP($_SERVER['REMOTE_ADDR']);
header("Content-Type: application/json; charset=utf-8"); header("Content-Type: application/json; charset=utf-8");
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Origin: *");
if (isset($_FILES['update_zip']) && isset($_POST['userid']) && isset($_POST['account_id'])){ if (isset($_FILES['update_zip']) && isset($_POST['userid']) && isset($_POST['account_id']) && isset($_COOKIE['loginkey'])) {
$postUserid = safetext($_POST['userid']); $postUserid = safetext($_POST['userid']);
$postZip= $_FILES['update_zip']; $postZip= $_FILES['update_zip'];
$loginid = safetext($_POST['account_id']); $loginid = safetext($_POST['account_id']);
$loginkey = safetext($_COOKIE['loginkey']);
$is_login = uwuzuUserLoginCheck($loginid, $loginkey, "admin");
if ($is_login === false) {
echo json_encode(['success' => false, 'error' => '認証に失敗しました。(AUTH_INVALID)']);
exit;
}
try { try {
$option = array( $option = array(
+2 -2
View File
@@ -130,7 +130,7 @@ if( !empty($_POST['send_notification_submit']) ) {
} }
if(empty($notice_msg)){ if(empty($notice_msg)){
$error_message[] = "通知の本文を空欄にすることはできません。(INPUT_PLEASE)"; $error_message[] = "通知の本文を空欄にすることはできません。(INPUT_PLEASE)";
}elseif(mb_strlen($notice_msg) > 128){ }elseif(mb_strlen($notice_msg) > 16777216){
$error_message[] = "通知の本文を16777216文字以上にすることはできません。(INPUT_OVER_MAX_COUNT)"; $error_message[] = "通知の本文を16777216文字以上にすることはできません。(INPUT_OVER_MAX_COUNT)";
} }
if(empty($error_message)){ if(empty($error_message)){
@@ -710,7 +710,7 @@ $(document).ready(function() {
}, 150); }, 150);
}); });
cancelButton3.addEventListener('click', () => { // 追加 cancelButton4.addEventListener('click', () => { // 追加
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
+6 -7
View File
@@ -606,7 +606,7 @@ $(document).ready(function() {
var uniqid = $(this).parents().attr('data-uniqid'); var uniqid = $(this).parents().attr('data-uniqid');
$('#ReuseCancelButton').on('click', function (event) { $('#ReuseCancelButton').off('click').on('click', function (event) {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
@@ -614,29 +614,28 @@ $(document).ready(function() {
}, 150); }, 150);
}); });
$('#ReuseButton').on('click', function (event) { $('#ReuseButton').off('click').on('click', function (event) { // ここを修正
event.preventDefault(); event.preventDefault();
var reusetext = $("#reusetexts").val(); var reusetext = $("#reusetexts").val();
if(reusetext == ""){ if (reusetext == "") {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
reuseModal.hide(); reuseModal.hide();
}, 150); }, 150);
}else{ } else {
$.ajax({ $.ajax({
url: '../function/reuse.php', url: '../function/reuse.php',
method: 'POST', method: 'POST',
data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id },
dataType: 'json', dataType: 'json',
success: function (response) { success: function (response) {
if (response.success) {
reuseModal.hide(); reuseModal.hide();
if (response.success) {
view_notify("引用リユーズしました"); view_notify("引用リユーズしました");
} else { } else {
reuseModal.hide();
view_notify("引用リユーズに失敗しました"); view_notify("引用リユーズに失敗しました");
} }
}, },
+23 -10
View File
@@ -1,27 +1,40 @@
{ {
"software": "uwuzu", "software": "uwuzu",
"version": "1.4.14", "version": "1.4.15",
"release_date": "2025/01/26", "release_date": "2025/03/15",
"release_notes": "このアップデートではいくつかのバグ修正と個別でユーザーに通知を送信する新機能が含まれます。", "release_notes": "このアップデートではいくつかのバグ修正セキュリティの更新が含まれます。",
"notices": "アップデート前にベースの構造の更新をしてください!加えて、データのバックアップを行うことをおすすめします!", "notices": "アップデート前にデータのバックアップを行うことをおすすめします!",
"files": { "files": {
"overwrite": [ "overwrite": [
"/api/ueuse/create.php", "/abi/addabi.php",
"/bookmark/bookmark.php", "/bookmark/bookmark.php",
"/bookmark/index.php", "/bookmark/index.php",
"/delete/delete.php", "/delete/delete.php",
"/favorite/favorite.php",
"/function/function.php", "/function/function.php",
"/function/reuse.php",
"/home/index.php", "/home/index.php",
"/js/nsfw_event.js",
"/js/unsupported.js",
"/nextpage/bookmark.php", "/nextpage/bookmark.php",
"/nextpage/foryoupage.php", "/nextpage/foryoupage.php",
"/others/index.php", "/nextpage/ftlpage.php",
"/settings_admin/actionlog_admin.php", "/nextpage/nextpage.php",
"/settings_admin/ipblock_admin.php", "/nextpage/ueusepage.php",
"/nextpage/userlikepage.php",
"/nextpage/usermediapage.php",
"/nextpage/userpage.php",
"/search/index.php",
"/settings_admin/userinfo.php", "/settings_admin/userinfo.php",
"/settings_admin/api/code_delete.php",
"/settings_admin/api/update_query.php",
"/ueuse/index.php", "/ueuse/index.php",
"/user/index.php", "/user/index.php",
"/addauthcode.php",
"/authcodechk.php",
"/authlogin.php",
"/check.php",
"/login.php",
"/new.php",
"/uwuzu_error_code.txt",
"/server/uwuzuabout.txt", "/server/uwuzuabout.txt",
"/server/uwuzuinfo.txt", "/server/uwuzuinfo.txt",
"/server/uwuzurelease.txt" "/server/uwuzurelease.txt"
+20 -16
View File
@@ -110,8 +110,8 @@ if (!empty($pdo)) {
$follow = $userdata['follow']; // コンマで区切られたユーザーIDを含む変数 $follow = $userdata['follow']; // コンマで区切られたユーザーIDを含む変数
// コンマで区切って配列に分割し、要素数を数える // コンマで区切って配列に分割し、要素数を数える
$followIds = array_reverse(explode(',', $follow)); $followIds = array_reverse(array_values(array_filter(explode(',', $follow))));
$followCount = count($followIds) - 1; $followCount = count($followIds);
$follow_on_me = array_search($userid, $followIds); $follow_on_me = array_search($userid, $followIds);
@@ -125,8 +125,8 @@ if (!empty($pdo)) {
$follower = $userdata['follower']; // コンマで区切られたユーザーIDを含む変数 $follower = $userdata['follower']; // コンマで区切られたユーザーIDを含む変数
// コンマで区切って配列に分割し、要素数を数える // コンマで区切って配列に分割し、要素数を数える
$followerIds = array_reverse(explode(',', $follower)); $followerIds = array_reverse(array_values(array_filter(explode(',', $follower))));
$followerCount = count($followerIds) - 1; $followerCount = count($followerIds);
$profileText = safetext($userData['profile']); $profileText = safetext($userData['profile']);
@@ -138,13 +138,14 @@ if (!empty($pdo)) {
//-------フォロワー取得--------- //-------フォロワー取得---------
$follower_userdata = array();
if(!(empty($followerIds))){
// フォロワーのユーザーIDを $follower_userids 配列に追加 // フォロワーのユーザーIDを $follower_userids 配列に追加
foreach ($followerIds as $follower_userid) { foreach ($followerIds as $follower_userid) {
$follower_userids[] = $follower_userid; $follower_userids[] = $follower_userid;
} }
// フォロワーのユーザー情報を取得 // フォロワーのユーザー情報を取得
$follower_userdata = array();
foreach ($follower_userids as $follower_userid) { foreach ($follower_userids as $follower_userid) {
$follower_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid"); $follower_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid");
@@ -157,15 +158,17 @@ if (!empty($pdo)) {
$follower_userdata[] = $follower_userinfo; $follower_userdata[] = $follower_userinfo;
} }
} }
}
//-------フォロー取得--------- //-------フォロー取得---------
$follow_userdata = array();
if(!(empty($followIds))){
foreach ($followIds as $follow_userid) { foreach ($followIds as $follow_userid) {
$follow_userids[] = $follow_userid; $follow_userids[] = $follow_userid;
} }
$follow_userdata = array();
foreach ($follow_userids as $follow_userid) { foreach ($follow_userids as $follow_userid) {
$follow_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid"); $follow_userQuery = $pdo->prepare("SELECT username, userid, iconname, headname, sacinfo FROM account WHERE userid = :userid");
$follow_userQuery->bindValue(':userid', $follow_userid); $follow_userQuery->bindValue(':userid', $follow_userid);
@@ -177,10 +180,12 @@ if (!empty($pdo)) {
$follow_userdata[] = $follow_userinfo; $follow_userdata[] = $follow_userinfo;
} }
} }
}
} else { } else {
$userData["userid"] = "none"; $userData["userid"] = "none";
$userData['username'] = "でふぉると"; $userData['username'] = "でふぉると";
$isAIBlock = false;
$ueuse_cnt = "zero"; $ueuse_cnt = "zero";
$followCount = "zero"; $followCount = "zero";
$followerCount = "zero"; $followerCount = "zero";
@@ -370,7 +375,7 @@ $pdo = null;
</div> </div>
<div class="fzone"> <div class="fzone">
<div class="time"> <div class="time">
<p><?php echo date('Y年m月d日 H:i:s', strtotime($userdata['datetime'])); ?>からuwuzuを利用しています。</p> <p><?php echo date('Y年m月d日 H:i', strtotime($userdata['datetime'])); ?>からuwuzuを利用しています。</p>
<p><?php if (safetext($userdata['role']) === "ice") { <p><?php if (safetext($userdata['role']) === "ice") {
echo "このアカウントは凍結されています。"; echo "このアカウントは凍結されています。";
}; ?></p> }; ?></p>
@@ -432,7 +437,7 @@ $pdo = null;
<div class="sp_time_area"> <div class="sp_time_area">
<div class="time"> <div class="time">
<p><?php echo date('Y年m月d日 H:i:s', strtotime($userdata['datetime'])); ?>からuwuzuを利用しています。</p> <p><?php echo date('Y年m月d日 H:i', strtotime($userdata['datetime'])); ?>からuwuzuを利用しています。</p>
<p><?php if (safetext($userdata['role']) === "ice") { <p><?php if (safetext($userdata['role']) === "ice") {
echo "このアカウントは凍結されています。"; echo "このアカウントは凍結されています。";
}; ?></p> }; ?></p>
@@ -1047,7 +1052,7 @@ $pdo = null;
var uniqid = $(this).parents().attr('data-uniqid'); var uniqid = $(this).parents().attr('data-uniqid');
$('#ReuseCancelButton').on('click', function (event) { $('#ReuseCancelButton').off('click').on('click', function (event) {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
@@ -1055,29 +1060,28 @@ $pdo = null;
}, 150); }, 150);
}); });
$('#ReuseButton').on('click', function (event) { $('#ReuseButton').off('click').on('click', function (event) { // ここを修正
event.preventDefault(); event.preventDefault();
var reusetext = $("#reusetexts").val(); var reusetext = $("#reusetexts").val();
if(reusetext == ""){ if (reusetext == "") {
modalMain.removeClass("slideUp"); modalMain.removeClass("slideUp");
modalMain.addClass("slideDown"); modalMain.addClass("slideDown");
window.setTimeout(function(){ window.setTimeout(function(){
reuseModal.hide(); reuseModal.hide();
}, 150); }, 150);
}else{ } else {
$.ajax({ $.ajax({
url: '../function/reuse.php', url: '../function/reuse.php',
method: 'POST', method: 'POST',
data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id}, data: { uniqid: uniqid, reusetext: reusetext, userid: userid, account_id: account_id },
dataType: 'json', dataType: 'json',
success: function (response) { success: function (response) {
if (response.success) {
reuseModal.hide(); reuseModal.hide();
if (response.success) {
view_notify("引用リユーズしました"); view_notify("引用リユーズしました");
} else { } else {
reuseModal.hide();
view_notify("引用リユーズに失敗しました"); view_notify("引用リユーズに失敗しました");
} }
}, },
+2
View File
@@ -28,6 +28,7 @@ migration_bad_success - アカウントの移行後に移行の完了処理が
already_been_completed - 処理が既に完了している場合に表示されます。 already_been_completed - 処理が既に完了している場合に表示されます。
you_cant_it_to_yourself - 自分に対して行えない処理を行おうとした際に表示されます。 you_cant_it_to_yourself - 自分に対して行えない処理を行おうとした際に表示されます。
could_not_complete - 処理を完了できなかった場合に表示されます。 could_not_complete - 処理を完了できなかった場合に表示されます。
this_API_is_ws_only - WebsocketAPIがWebsocket以外の方法でアクセスされた場合に表示されます。
----------(UWUZU ERR CODE)---------- ----------(UWUZU ERR CODE)----------
FILE_DEKASUGUI_PHP_INI_KAKUNIN - php.iniで設定されているファイルサイズ上限を上回っている時に表示されます。 FILE_DEKASUGUI_PHP_INI_KAKUNIN - php.iniで設定されているファイルサイズ上限を上回っている時に表示されます。
@@ -144,6 +145,7 @@ DELETE_FILE_NOT_FOUND - アップデート作業時に、zipファイル内で
UPDATE_FILE_NOT_FOUND - アップデート作業時に、zipファイル内にあるはずの更新用のファイルが存在しなかった際に表示されます。 UPDATE_FILE_NOT_FOUND - アップデート作業時に、zipファイル内にあるはずの更新用のファイルが存在しなかった際に表示されます。
BAD_REQUEST - 不正なリクエストが送信されてきた際に表示されます。 BAD_REQUEST - 不正なリクエストが送信されてきた際に表示されます。
AUTH_INVALID - アカウントの認証に失敗した際に表示されます。
DON'T_TOUCH_SYSTEM_ROLE - システムロールをべたべた触ったり削除しようとしたりすると表示されます。 DON'T_TOUCH_SYSTEM_ROLE - システムロールをべたべた触ったり削除しようとしたりすると表示されます。