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:
+11
-3
@@ -1,12 +1,20 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
require('../db.php');
|
||||
require("../function/function.php");
|
||||
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']);
|
||||
$userId = safetext($_POST['userid']);
|
||||
$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 {
|
||||
$option = array(
|
||||
@@ -48,10 +56,10 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && sa
|
||||
$index = array_search($postUniqid, $bookmarkList);
|
||||
|
||||
if ($index === false) {
|
||||
// ユーザーIDを追加
|
||||
// UniqIDを追加
|
||||
$bookmarkList[] = $postUniqid;
|
||||
} else {
|
||||
// ユーザーIDを削除
|
||||
// UniqIDを削除
|
||||
array_splice($bookmarkList, $index, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user