mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu v1.4.8 Funium
This commit is contained in:
+9
-5
@@ -104,7 +104,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$localFilePathhead = '../img/deficon/icon.png';
|
$localFilePathhead = '../img/deficon/icon.png';
|
||||||
|
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.png';
|
$newFilename = createUniqId() . '-'.$userid.'.png';
|
||||||
|
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'usericons/' . $newFilename;
|
$uploadedPath = 'usericons/' . $newFilename;
|
||||||
@@ -142,10 +142,10 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
|
|
||||||
if(check_mime($uploadedFile['tmp_name']) == "image/webp"){
|
if(check_mime($uploadedFile['tmp_name']) == "image/webp"){
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.webp';
|
$newFilename = createUniqId() . '-'.$userid.'.webp';
|
||||||
}else{
|
}else{
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.' . $extension;
|
$newFilename = createUniqId() . '-'.$userid.'.' . $extension;
|
||||||
}
|
}
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'usericons/' . $newFilename;
|
$uploadedPath = 'usericons/' . $newFilename;
|
||||||
@@ -178,7 +178,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$localFilePathhead = '../img/defhead/head.png';
|
$localFilePathhead = '../img/defhead/head.png';
|
||||||
|
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.png';
|
$newFilename = createUniqId() . '-'.$userid.'.png';
|
||||||
|
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'userheads/' . $newFilename;
|
$uploadedPath = 'userheads/' . $newFilename;
|
||||||
@@ -314,6 +314,9 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$enc_mailadds = "";
|
$enc_mailadds = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$other_settings = [];
|
||||||
|
$other_settings_json = json_encode($other_settings);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$role = "official";
|
$role = "official";
|
||||||
@@ -325,7 +328,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$loginid = hash('sha3-512', $LoginIdBytes);
|
$loginid = hash('sha3-512', $LoginIdBytes);
|
||||||
|
|
||||||
// SQL作成
|
// SQL作成
|
||||||
$stmt = $pdo->prepare("INSERT INTO account (username, userid, password, loginid, mailadds, profile, iconname, headname, role, datetime, admin, encryption_ivkey) VALUES (:username, :userid, :password, :loginid, :mailadds, :profile, :iconname, :headname, :role, :datetime, :admin ,:encryption_ivkey)");
|
$stmt = $pdo->prepare("INSERT INTO account (username, userid, password, loginid, mailadds, profile, iconname, headname, role, datetime, admin, encryption_ivkey, other_settings) VALUES (:username, :userid, :password, :loginid, :mailadds, :profile, :iconname, :headname, :role, :datetime, :admin, :encryption_ivkey, :other_settings)");
|
||||||
|
|
||||||
// アイコン画像
|
// アイコン画像
|
||||||
$stmt->bindValue(':iconname', $iconName, PDO::PARAM_STR);
|
$stmt->bindValue(':iconname', $iconName, PDO::PARAM_STR);
|
||||||
@@ -342,6 +345,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$stmt->bindParam(':profile', $profile, PDO::PARAM_STR);
|
$stmt->bindParam(':profile', $profile, PDO::PARAM_STR);
|
||||||
$stmt->bindParam(':role', $role, PDO::PARAM_STR);
|
$stmt->bindParam(':role', $role, PDO::PARAM_STR);
|
||||||
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':other_settings', $other_settings_json, PDO::PARAM_STR);
|
||||||
|
|
||||||
$stmt->bindParam(':encryption_ivkey', $iv, PDO::PARAM_STR);
|
$stmt->bindParam(':encryption_ivkey', $iv, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -167,7 +167,7 @@ $pdo = null;
|
|||||||
これらのデータをあなたが知っているのであれば早速セットアップを開始しましょう!<br>
|
これらのデータをあなたが知っているのであれば早速セットアップを開始しましょう!<br>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
<br>
|
<br>
|
||||||
セットアップ中にエラーに遭遇した場合はuwuzu.comを確認し、解消に向けて取り組みましょう!</p>
|
セットアップ中にエラーに遭遇した場合はdocs.uwuzu.xyzを確認し、解消に向けて取り組みましょう!</p>
|
||||||
|
|
||||||
<div class="module_chk">
|
<div class="module_chk">
|
||||||
<div class="p2">Already setが設定済みでNot setが未設定です。</div>
|
<div class="p2">Already setが設定済みでNot setが未設定です。</div>
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$domain = $_SERVER['HTTP_HOST'];
|
||||||
|
require('../../db.php');
|
||||||
|
//関数呼び出し
|
||||||
|
//- Base64_mime
|
||||||
|
require('../../function/function.php');
|
||||||
|
//投稿及び返信レート制限↓(分):デフォで60件/分まで
|
||||||
|
$max_ueuse_rate_limit = 60;
|
||||||
|
|
||||||
|
$mojisizefile = "../../server/textsize.txt";
|
||||||
|
|
||||||
|
$banurldomainfile = "../../server/banurldomain.txt";
|
||||||
|
$banurl_info = file_get_contents($banurldomainfile);
|
||||||
|
$banurl = preg_split("/\r\n|\n|\r/", $banurl_info);
|
||||||
|
|
||||||
|
header("Content-Type: application/json");
|
||||||
|
header("charset=utf-8");
|
||||||
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$pdo = null;
|
||||||
|
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) {
|
||||||
|
// 接続エラーのときエラー内容を取得する
|
||||||
|
$error_message[] = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$Get_Post_Json = file_get_contents("php://input");
|
||||||
|
if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
||||||
|
//トークン取得
|
||||||
|
if(!(empty($_GET['token']))){
|
||||||
|
$token = safetext($_GET['token']);
|
||||||
|
}else{
|
||||||
|
$post_json = json_decode($Get_Post_Json, true);
|
||||||
|
if(isset($post_json["token"])){
|
||||||
|
$token = safetext($post_json["token"]);
|
||||||
|
}else{
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($token == ""){
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
if( !empty($pdo) ) {
|
||||||
|
$userQuery = $pdo->prepare("SELECT username, userid, role, follow, follower FROM account WHERE token = :token");
|
||||||
|
$userQuery->bindValue(':token', $token);
|
||||||
|
$userQuery->execute();
|
||||||
|
$userData = $userQuery->fetch();
|
||||||
|
|
||||||
|
if(empty($userData["userid"])){
|
||||||
|
$err = "token_invalid";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
exit;
|
||||||
|
}elseif($userData["role"] === "ice"){
|
||||||
|
$err = "this_account_has_been_frozen";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
exit;
|
||||||
|
}else{
|
||||||
|
//本文取得
|
||||||
|
if(!(empty($_GET['uniqid']))){
|
||||||
|
$fav_uniqid = safetext($_GET['uniqid']);
|
||||||
|
}elseif(!(empty($post_json["uniqid"]))){
|
||||||
|
$fav_uniqid = safetext($post_json["uniqid"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(empty($fav_uniqid))){
|
||||||
|
$res = addFavorite($pdo, $fav_uniqid, $userData["userid"]);
|
||||||
|
if($res[0] === true){
|
||||||
|
$response = array(
|
||||||
|
'favorite_list' => decode_yajirushi(htmlspecialchars_decode($res[2])),
|
||||||
|
'success' => true
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
}else{
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$domain = $_SERVER['HTTP_HOST'];
|
||||||
|
require('../../db.php');
|
||||||
|
//関数呼び出し
|
||||||
|
//- Base64_mime
|
||||||
|
require('../../function/function.php');
|
||||||
|
//投稿及び返信レート制限↓(分):デフォで60件/分まで
|
||||||
|
$max_ueuse_rate_limit = 60;
|
||||||
|
|
||||||
|
$mojisizefile = "../../server/textsize.txt";
|
||||||
|
|
||||||
|
$banurldomainfile = "../../server/banurldomain.txt";
|
||||||
|
$banurl_info = file_get_contents($banurldomainfile);
|
||||||
|
$banurl = preg_split("/\r\n|\n|\r/", $banurl_info);
|
||||||
|
|
||||||
|
header("Content-Type: application/json");
|
||||||
|
header("charset=utf-8");
|
||||||
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$pdo = null;
|
||||||
|
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) {
|
||||||
|
// 接続エラーのときエラー内容を取得する
|
||||||
|
$error_message[] = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$Get_Post_Json = file_get_contents("php://input");
|
||||||
|
if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
||||||
|
//トークン取得
|
||||||
|
if(!(empty($_GET['token']))){
|
||||||
|
$token = safetext($_GET['token']);
|
||||||
|
}else{
|
||||||
|
$post_json = json_decode($Get_Post_Json, true);
|
||||||
|
if(isset($post_json["token"])){
|
||||||
|
$token = safetext($post_json["token"]);
|
||||||
|
}else{
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($token == ""){
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
if( !empty($pdo) ) {
|
||||||
|
$userQuery = $pdo->prepare("SELECT username, userid, role, follow, follower FROM account WHERE token = :token");
|
||||||
|
$userQuery->bindValue(':token', $token);
|
||||||
|
$userQuery->execute();
|
||||||
|
$userData = $userQuery->fetch();
|
||||||
|
|
||||||
|
if(empty($userData["userid"])){
|
||||||
|
$err = "token_invalid";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
exit;
|
||||||
|
}elseif($userData["role"] === "ice"){
|
||||||
|
$err = "this_account_has_been_frozen";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
exit;
|
||||||
|
}else{
|
||||||
|
//本文取得
|
||||||
|
if(!(empty($_GET['uniqid']))){
|
||||||
|
$fav_uniqid = safetext($_GET['uniqid']);
|
||||||
|
}elseif(!(empty($post_json["uniqid"]))){
|
||||||
|
$fav_uniqid = safetext($post_json["uniqid"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(empty($fav_uniqid))){
|
||||||
|
$res = getFavorite($pdo, $fav_uniqid);
|
||||||
|
if($res[0] === true){
|
||||||
|
$response = array(
|
||||||
|
'favorite_list' => decode_yajirushi(htmlspecialchars_decode($res[2])),
|
||||||
|
'success' => true
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
}else{
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$err = "input_not_found";
|
||||||
|
$response = array(
|
||||||
|
'error_code' => $err,
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
|
}
|
||||||
|
?>
|
||||||
+1
-7
@@ -8,13 +8,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -4,13 +4,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
function random_iv($length = 16){
|
function random_iv($length = 16){
|
||||||
return substr(str_shuffle('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'), 0, $length);
|
return substr(str_shuffle('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'), 0, $length);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,13 +24,7 @@ for( $i=0;$i<$cnt;$i++ ){
|
|||||||
$uwuzuinfo[$i] = ($softwaredata[$i]);
|
$uwuzuinfo[$i] = ($softwaredata[$i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
require('../db.php');
|
require('../db.php');
|
||||||
|
|
||||||
$datetime = array();
|
$datetime = array();
|
||||||
|
|||||||
@@ -18,13 +18,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -8,13 +8,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
+1
-7
@@ -8,13 +8,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
+1
-7
@@ -8,13 +8,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
|
|||||||
@@ -8,13 +8,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
|
|||||||
@@ -8,13 +8,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
|
|||||||
@@ -8,13 +8,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
|
|||||||
+10
-50
@@ -18,13 +18,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
@@ -107,50 +101,16 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
|
|
||||||
if(!(empty($Follow_userdata))){
|
if(!(empty($Follow_userdata))){
|
||||||
if(!($userid == $Follow_userdata['userid'])){
|
if(!($userid == $Follow_userdata['userid'])){
|
||||||
$followerList = explode(',', $Follow_userdata['follower']);
|
$res = follow_user($pdo, $Follow_userdata['userid'], $userid);
|
||||||
if (!(in_array($userid, $followerList))) {
|
if($res === true){
|
||||||
// 自分が相手をフォローしていない場合、相手のfollowerカラムと自分のfollowカラムを更新
|
//フォロー完了
|
||||||
$followerList[] = $userid;
|
$response = array(
|
||||||
$newFollowerList = implode(',', $followerList);
|
'userid' => decode_yajirushi(htmlspecialchars_decode($Follow_userdata["userid"])),
|
||||||
|
'success' => true
|
||||||
// UPDATE文を実行してフォロー情報を更新
|
);
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid");
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
$updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $Follow_userdata['userid'], PDO::PARAM_STR);
|
|
||||||
$res = $updateQuery->execute();
|
|
||||||
|
|
||||||
// 自分のfollowカラムを更新
|
|
||||||
$myflwlist = explode(',', $userData['follow']);
|
|
||||||
$myflwlist[] = $userData['userid'];
|
|
||||||
$newFollowList = implode(',', array_unique($myflwlist));
|
|
||||||
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':follow', $newFollowList, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
|
||||||
$res_follow = $updateQuery->execute();
|
|
||||||
|
|
||||||
$datetime = date("Y-m-d H:i:s");
|
|
||||||
$pdo->beginTransaction();
|
|
||||||
|
|
||||||
send_notification($follow_userid, $userid, "🎉" . $userid . "さんにフォローされました!🎉", "" . $userid . "さんにフォローされました。", "/@" . $userid . "", "follow");
|
|
||||||
|
|
||||||
if ($res && $res_follow) {
|
|
||||||
//フォロー完了
|
|
||||||
$response = array(
|
|
||||||
'userid' => decode_yajirushi(htmlspecialchars_decode($Follow_userdata["userid"])),
|
|
||||||
'success' => true
|
|
||||||
);
|
|
||||||
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
|
||||||
} else {
|
|
||||||
$err = "db_error_".$e->getMessage();
|
|
||||||
$response = array(
|
|
||||||
'error_code' => $err,
|
|
||||||
);
|
|
||||||
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
|
||||||
}
|
|
||||||
$stmt = null;
|
|
||||||
}else{
|
}else{
|
||||||
$err = "already_been_completed";
|
$err = "could_not_complete";
|
||||||
$response = array(
|
$response = array(
|
||||||
'error_code' => $err,
|
'error_code' => $err,
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-7
@@ -8,13 +8,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
|
|||||||
+10
-48
@@ -18,13 +18,7 @@ header("Content-Type: application/json");
|
|||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$pdo = null;
|
$pdo = null;
|
||||||
@@ -108,52 +102,20 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
|
|
||||||
if(!(empty($Follow_userdata))){
|
if(!(empty($Follow_userdata))){
|
||||||
if(!($userid == $Follow_userdata['userid'])){
|
if(!($userid == $Follow_userdata['userid'])){
|
||||||
$followerList = explode(',', $Follow_userdata['follower']);
|
$res = follow_user($pdo, $Follow_userdata['userid'], $userid);
|
||||||
if (in_array($userid, $followerList)) {
|
if($res === true){
|
||||||
// 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新
|
//フォロー完了
|
||||||
$followerList = array_diff($followerList, array($userid));
|
$response = array(
|
||||||
$newFollowerList = implode(',', $followerList);
|
'userid' => decode_yajirushi(htmlspecialchars_decode($Follow_userdata["userid"])),
|
||||||
|
'success' => true
|
||||||
// UPDATE文を実行してフォロー情報を更新
|
);
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid");
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
$updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $Follow_userdata['userid'], PDO::PARAM_STR);
|
|
||||||
$res = $updateQuery->execute();
|
|
||||||
|
|
||||||
$myflwlist = explode(',', $myfollowlist);
|
|
||||||
$delfollowList = array_diff($myflwlist, array($Follow_userdata['userid']));
|
|
||||||
$deluserid = implode(',', $delfollowList);
|
|
||||||
|
|
||||||
// 自分のfollowカラムから相手のユーザーIDを削除
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':follow', $deluserid, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
|
||||||
$res_follow = $updateQuery->execute();
|
|
||||||
|
|
||||||
if ($res && $res_follow) {
|
|
||||||
$response = array(
|
|
||||||
'userid' => decode_yajirushi(htmlspecialchars_decode($Follow_userdata["userid"])),
|
|
||||||
'success' => true
|
|
||||||
);
|
|
||||||
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$err = "db_error_".$e->getMessage();
|
|
||||||
$response = array(
|
|
||||||
'error_code' => $err,
|
|
||||||
);
|
|
||||||
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$stmt = null;
|
|
||||||
}else{
|
}else{
|
||||||
$err = "already_been_completed";
|
$err = "could_not_complete";
|
||||||
$response = array(
|
$response = array(
|
||||||
'error_code' => $err,
|
'error_code' => $err,
|
||||||
);
|
);
|
||||||
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
echo json_encode($response, JSON_UNESCAPED_UNICODE);
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$err = "you_cant_it_to_yourself";
|
$err = "you_cant_it_to_yourself";
|
||||||
|
|||||||
+1
-7
@@ -2,13 +2,7 @@
|
|||||||
require("../../function/function.php");
|
require("../../function/function.php");
|
||||||
$serversettings_file = "../../server/serversettings.ini";
|
$serversettings_file = "../../server/serversettings.ini";
|
||||||
$serversettings = parse_ini_file($serversettings_file, true);
|
$serversettings = parse_ini_file($serversettings_file, true);
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
||||||
header("Content-Type: application/json");
|
header("Content-Type: application/json");
|
||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
|
|||||||
+8
-8
@@ -181,28 +181,28 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $row["loginid"],[
|
setcookie('loginid', $row["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $row["username"],[
|
setcookie('username', $row["username"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -293,28 +293,28 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $row["loginid"],[
|
setcookie('loginid', $row["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $row["username"],[
|
setcookie('username', $row["username"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
+8
-8
@@ -65,28 +65,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -121,28 +121,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -193,28 +193,28 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $userData["loginid"],[
|
setcookie('loginid', $userData["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
+126
-13
@@ -3270,7 +3270,12 @@ label>input {
|
|||||||
transform: translateY(-1%);
|
transform: translateY(-1%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.modal-content .modal-follow-area{
|
||||||
|
max-height: 220px;
|
||||||
|
overflow: scroll;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
.Image_modal {
|
.Image_modal {
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -4490,7 +4495,7 @@ hr{
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.tlchange .btn{
|
.tlchange .btn{
|
||||||
width: 45%;
|
width: 30%;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
@@ -5724,6 +5729,85 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.actionlog {
|
||||||
|
margin-top: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 0px 12px;
|
||||||
|
background-color: var(--background-color);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
width: auto;
|
||||||
|
min-height: 32px; /* 閉じた状態での最小高さ */
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actionlog details {
|
||||||
|
padding: 0px;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
text-align: left;
|
||||||
|
color: var(--text-color);
|
||||||
|
font-family: var(--Mono-fonts), sans-serif;
|
||||||
|
word-wrap: break-word;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.actionlog details span {
|
||||||
|
margin: 0px 6px 0px 4px;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 32px;
|
||||||
|
font-family: var(--Mono-fonts), sans-serif;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.actionlog details .INFO {
|
||||||
|
background-color: color-mix(in srgb, var(--background-color) 90%, var(--success));
|
||||||
|
border: solid 1px var(--success);
|
||||||
|
color: var(--success);
|
||||||
|
}
|
||||||
|
.actionlog details .NOTICE {
|
||||||
|
background-color: color-mix(in srgb, var(--background-color) 90%, var(--good));
|
||||||
|
border: solid 1px var(--good);
|
||||||
|
color: var(--good);
|
||||||
|
}
|
||||||
|
.actionlog details .WARNING {
|
||||||
|
background-color: color-mix(in srgb, var(--background-color) 90%, var(--warn));
|
||||||
|
border: solid 1px var(--warn);
|
||||||
|
color: var(--warn);
|
||||||
|
}
|
||||||
|
.actionlog details .ERROR {
|
||||||
|
background-color: color-mix(in srgb, var(--background-color) 90%, var(--danger));
|
||||||
|
border: solid 1px var(--danger);
|
||||||
|
color: var(--danger);
|
||||||
|
}
|
||||||
|
.actionlog details .CRITICAL {
|
||||||
|
background-color: color-mix(in srgb, var(--background-color) 90%, var(--error));
|
||||||
|
border: solid 1px var(--error);
|
||||||
|
color: var(--error);
|
||||||
|
}
|
||||||
|
.actionlog summary {
|
||||||
|
display: block;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0px;
|
||||||
|
line-height: 32px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.actionlog summary::-webkit-details-marker {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.actionlog p {
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
text-align: left;
|
||||||
|
color: var(--text-color);
|
||||||
|
font-family: var(--Mono-fonts), sans-serif;
|
||||||
|
word-wrap: break-word;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------------------------------------*/
|
||||||
/*--------------------------------------------------スマホ向け--------------------------------------------------*/
|
/*--------------------------------------------------スマホ向け--------------------------------------------------*/
|
||||||
/*--------------------------------------------------ここから--------------------------------------------------*/
|
/*--------------------------------------------------ここから--------------------------------------------------*/
|
||||||
@@ -6597,7 +6681,7 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
margin-bottom: auto;
|
margin-bottom: auto;
|
||||||
margin-left: -6px;
|
margin-left: 0px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color:var(--text-color);
|
color:var(--text-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -6609,7 +6693,7 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
margin-left: -6px;
|
margin-left: 0px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color:var(--text-color);
|
color:var(--text-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -6622,7 +6706,7 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
margin-bottom: auto;
|
margin-bottom: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: -6px;
|
margin-right: 0px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color:var(--subtext-color);
|
color:var(--subtext-color);
|
||||||
@@ -6677,7 +6761,7 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
margin-bottom: auto;
|
margin-bottom: auto;
|
||||||
margin-left: -6px;
|
margin-left: 0px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color:var(--text-color);
|
color:var(--text-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -6689,7 +6773,7 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
margin-left: -6px;
|
margin-left: 0px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color:var(--text-color);
|
color:var(--text-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -6702,7 +6786,7 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
margin-bottom: auto;
|
margin-bottom: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: -6px;
|
margin-right: 0px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color:var(--subtext-color);
|
color:var(--subtext-color);
|
||||||
@@ -6713,7 +6797,7 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
margin-bottom: auto;
|
margin-bottom: auto;
|
||||||
margin-left: -6px;
|
margin-left: 0px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color:var(--link-color);
|
color:var(--link-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -6846,6 +6930,9 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
transform: translateY(-1%);
|
transform: translateY(-1%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.modal-content .modal-follow-area{
|
||||||
|
max-height: 40dvh;
|
||||||
|
}
|
||||||
.Image_modal{
|
.Image_modal{
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -6890,24 +6977,24 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.tlchange .off{
|
.tlchange .off{
|
||||||
width: 45%;
|
width: 30%;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
font-size: 20px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
.tlchange .on{
|
.tlchange .on{
|
||||||
width: 45%;
|
width: 30%;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
font-size: 20px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hny{
|
.hny{
|
||||||
@@ -8224,4 +8311,30 @@ noscript .noscript_modal .inner .center_text p{
|
|||||||
.emoji_admin p{
|
.emoji_admin p{
|
||||||
color:var(--dark-text-color);
|
color:var(--dark-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.actionlog {
|
||||||
|
background-color: var(--dark-background-color);
|
||||||
|
border: solid 1px var(--dark-background-color);
|
||||||
|
}
|
||||||
|
.actionlog details {
|
||||||
|
color: var(--dark-text-color);
|
||||||
|
}
|
||||||
|
.actionlog details .INFO {
|
||||||
|
background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--success));
|
||||||
|
}
|
||||||
|
.actionlog details .NOTICE {
|
||||||
|
background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--good));
|
||||||
|
}
|
||||||
|
.actionlog details .WARNING {
|
||||||
|
background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--warn));
|
||||||
|
}
|
||||||
|
.actionlog details .ERROR {
|
||||||
|
background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--danger));
|
||||||
|
}
|
||||||
|
.actionlog details .CRITICAL {
|
||||||
|
background-color: color-mix(in srgb, var(--dark-background-color) 90%, var(--error));
|
||||||
|
}
|
||||||
|
.actionlog p {
|
||||||
|
color: var(--dark-text-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+8
-8
@@ -69,28 +69,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -125,28 +125,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
+7
-53
@@ -19,66 +19,20 @@ if (safetext(isset($_POST['uniqid'])) && safetext(isset($_POST['userid'])) && sa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// データベース接続の設定
|
// データベース接続の設定
|
||||||
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
|
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
|
||||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
|
||||||
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
|
|
||||||
));
|
|
||||||
|
|
||||||
$query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
|
||||||
|
|
||||||
$query->execute(array(':userid' => $userId));
|
$query->execute(array(':userid' => $userId));
|
||||||
|
|
||||||
$result2 = $query->fetch();
|
$result2 = $query->fetch();
|
||||||
|
|
||||||
if($result2["loginid"] === $loginid){
|
if($result2["loginid"] === $loginid){
|
||||||
|
$res = addFavorite($pdo, $postUniqid, $userId);
|
||||||
|
|
||||||
try {
|
if ($res[0] === true) {
|
||||||
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS);
|
echo json_encode(['success' => true, 'newFavorite' => $res[2]]);
|
||||||
|
exit;
|
||||||
// 投稿のいいね情報を取得
|
} else {
|
||||||
$stmt = $pdo->prepare("SELECT account,ueuse,favorite FROM ueuse WHERE uniqid = :uniqid");
|
echo json_encode(['success' => false, 'error' => 'いいねの更新に失敗しました。']);
|
||||||
$stmt->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR);
|
|
||||||
$stmt->execute();
|
|
||||||
$post = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
||||||
|
|
||||||
if (!(empty($post))) {
|
|
||||||
$favoriteList = explode(',', $post['favorite']);
|
|
||||||
$index = array_search($userId, $favoriteList);
|
|
||||||
|
|
||||||
if ($index === false) {
|
|
||||||
// ユーザーIDを追加
|
|
||||||
$favoriteList[] = $userId;
|
|
||||||
|
|
||||||
send_notification(safetext($post['account']),$userId,"".$userId."さんがいいねしました!",safetext($post['ueuse']),"/!".$postUniqid."","favorite");
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// ユーザーIDを削除
|
|
||||||
array_splice($favoriteList, $index, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新しいいいね情報を更新
|
|
||||||
$newFavorite = implode(',', $favoriteList);
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE ueuse SET favorite = :favorite WHERE uniqid = :uniqid");
|
|
||||||
$updateQuery->bindValue(':favorite', $newFavorite, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR);
|
|
||||||
$res = $updateQuery->execute();
|
|
||||||
|
|
||||||
if ($res) {
|
|
||||||
echo json_encode(['success' => true, 'newFavorite' => $newFavorite]);
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
echo json_encode(['success' => false, 'error' => 'いいねの更新に失敗しました。']);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
echo json_encode(['success' => false, 'error' => '投稿が見つかりません。']);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
} catch(PDOException $e) {
|
|
||||||
echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]);
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+487
-7
@@ -131,7 +131,7 @@ function base64_mime($Base64,$userid){
|
|||||||
|
|
||||||
delete_exif($extension, $temp_file);
|
delete_exif($extension, $temp_file);
|
||||||
|
|
||||||
$newFilename = uniqid() . '-' . $userid . '.' . $extension;
|
$newFilename = createUniqId() . '-' . $userid . '.' . $extension;
|
||||||
$uploadedPath = '../ueuseimages/' . $newFilename;
|
$uploadedPath = '../ueuseimages/' . $newFilename;
|
||||||
|
|
||||||
$result = copy($temp_file, "../".$uploadedPath);
|
$result = copy($temp_file, "../".$uploadedPath);
|
||||||
@@ -624,10 +624,11 @@ function send_notification($to,$from,$title,$message,$url,$category){
|
|||||||
);
|
);
|
||||||
$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) {
|
||||||
|
actionLog($from, "error", "send_notification", $to, $e, 4);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!($to == $from)){
|
if(!($to == $from) || $category === "system" || $category === "other"){
|
||||||
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||||
$query->execute(array(':userid' => $from));
|
$query->execute(array(':userid' => $from));
|
||||||
$result = $query->fetch();
|
$result = $query->fetch();
|
||||||
@@ -722,6 +723,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
);
|
);
|
||||||
$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) {
|
||||||
|
actionLog($userid, "error", "send_ueuse", null, $e, 4);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -780,7 +782,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
// アップロードされたファイルの拡張子を取得
|
// アップロードされたファイルの拡張子を取得
|
||||||
$extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION);
|
$extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION);
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.' . $extension;
|
$newFilename = createUniqId() . '-'.$userid.'.' . $extension;
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = '../ueuseimages/' . $newFilename;
|
$uploadedPath = '../ueuseimages/' . $newFilename;
|
||||||
// EXIF削除
|
// EXIF削除
|
||||||
@@ -823,7 +825,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
// アップロードされたファイルの拡張子を取得
|
// アップロードされたファイルの拡張子を取得
|
||||||
$extension2 = pathinfo($uploadedFile2['name'], PATHINFO_EXTENSION);
|
$extension2 = pathinfo($uploadedFile2['name'], PATHINFO_EXTENSION);
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename2 = uniqid() . '-'.$userid.'.' . $extension2;
|
$newFilename2 = createUniqId() . '-'.$userid.'.' . $extension2;
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath2 = '../ueuseimages/' . $newFilename2;
|
$uploadedPath2 = '../ueuseimages/' . $newFilename2;
|
||||||
// EXIF削除
|
// EXIF削除
|
||||||
@@ -865,7 +867,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
// アップロードされたファイルの拡張子を取得
|
// アップロードされたファイルの拡張子を取得
|
||||||
$extension3 = pathinfo($uploadedFile3['name'], PATHINFO_EXTENSION);
|
$extension3 = pathinfo($uploadedFile3['name'], PATHINFO_EXTENSION);
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename3 = uniqid() . '-'.$userid.'.' . $extension3;
|
$newFilename3 = createUniqId() . '-'.$userid.'.' . $extension3;
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath3 = '../ueuseimages/' . $newFilename3;
|
$uploadedPath3 = '../ueuseimages/' . $newFilename3;
|
||||||
// EXIF削除
|
// EXIF削除
|
||||||
@@ -906,7 +908,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
// アップロードされたファイルの拡張子を取得
|
// アップロードされたファイルの拡張子を取得
|
||||||
$extension4 = pathinfo($uploadedFile4['name'], PATHINFO_EXTENSION);
|
$extension4 = pathinfo($uploadedFile4['name'], PATHINFO_EXTENSION);
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename4 = uniqid() . '-'.$userid.'.' . $extension4;
|
$newFilename4 = createUniqId() . '-'.$userid.'.' . $extension4;
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath4 = '../ueuseimages/' . $newFilename4;
|
$uploadedPath4 = '../ueuseimages/' . $newFilename4;
|
||||||
// EXIF削除
|
// EXIF削除
|
||||||
@@ -945,7 +947,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
// アップロードされたファイルの拡張子を取得
|
// アップロードされたファイルの拡張子を取得
|
||||||
$extensionVideo = strtolower(pathinfo($uploadedVideo['name'], PATHINFO_EXTENSION)); // 小文字に変換
|
$extensionVideo = strtolower(pathinfo($uploadedVideo['name'], PATHINFO_EXTENSION)); // 小文字に変換
|
||||||
// 正しい拡張子の場合、新しいファイル名を生成
|
// 正しい拡張子の場合、新しいファイル名を生成
|
||||||
$newFilenameVideo = uniqid() . '-'.$userid.'.' . $extensionVideo;
|
$newFilenameVideo = createUniqId() . '-'.$userid.'.' . $extensionVideo;
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPathVideo = '../ueusevideos/' . $newFilenameVideo;
|
$uploadedPathVideo = '../ueusevideos/' . $newFilenameVideo;
|
||||||
// ファイルを移動
|
// ファイルを移動
|
||||||
@@ -1033,6 +1035,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "send_ueuse", null, $e, 4);
|
||||||
}
|
}
|
||||||
}elseif((!empty($rpUniqid)) && empty($ruUniqid)){
|
}elseif((!empty($rpUniqid)) && empty($ruUniqid)){
|
||||||
$toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1");
|
$toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1");
|
||||||
@@ -1086,6 +1089,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "send_ueuse", null, $e, 4);
|
||||||
}
|
}
|
||||||
}elseif(empty($rpUniqid) && (!empty($ruUniqid))){
|
}elseif(empty($rpUniqid) && (!empty($ruUniqid))){
|
||||||
$toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1");
|
$toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1");
|
||||||
@@ -1140,6 +1144,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "send_ueuse", null, $e, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( $res ) {
|
if( $res ) {
|
||||||
@@ -1152,10 +1157,12 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
// プリペアドステートメントを削除
|
// プリペアドステートメントを削除
|
||||||
$stmt = null;
|
$stmt = null;
|
||||||
}else{
|
}else{
|
||||||
|
actionLog($userid, "error", "send_ueuse", null, $error_message, 0);
|
||||||
return $error_message;
|
return $error_message;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$error_message[] = "投稿回数のレート制限を超過しています。(OVER_RATE_LIMIT)";
|
$error_message[] = "投稿回数のレート制限を超過しています。(OVER_RATE_LIMIT)";
|
||||||
|
actionLog($userid, "error", "send_ueuse", null, $error_message, 0);
|
||||||
return $error_message;
|
return $error_message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1176,6 +1183,7 @@ function delete_ueuse($uniqid, $userid, $account_id){
|
|||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
// 接続エラーのときエラー内容を取得する
|
// 接続エラーのときエラー内容を取得する
|
||||||
$error_message[] = $e->getMessage();
|
$error_message[] = $e->getMessage();
|
||||||
|
actionLog($userid, "error", "delete_ueuse", null, $e, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $pdo->prepare('SELECT * FROM ueuse WHERE uniqid = :uniqid limit 1');
|
$query = $pdo->prepare('SELECT * FROM ueuse WHERE uniqid = :uniqid limit 1');
|
||||||
@@ -1250,10 +1258,12 @@ function delete_ueuse($uniqid, $userid, $account_id){
|
|||||||
if (!($res)){
|
if (!($res)){
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
$error_message[] = "リユーズの削除ができませんでした。";
|
$error_message[] = "リユーズの削除ができませんでした。";
|
||||||
|
actionLog($userid, "error", "delete_ueuse", null, $error_message, 3);
|
||||||
}
|
}
|
||||||
} catch(PDOException $e) {
|
} catch(PDOException $e) {
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
$error_message[] = 'データベースエラー:' . $e->getMessage();
|
$error_message[] = 'データベースエラー:' . $e->getMessage();
|
||||||
|
actionLog($userid, "error", "delete_ueuse", null, $e, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1272,6 +1282,7 @@ function delete_ueuse($uniqid, $userid, $account_id){
|
|||||||
}
|
}
|
||||||
} catch(PDOException $e) {
|
} catch(PDOException $e) {
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "delete_ueuse", null, $e, 4);
|
||||||
return [false, "削除に失敗しました!"];
|
return [false, "削除に失敗しました!"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1285,11 +1296,442 @@ function delete_ueuse($uniqid, $userid, $account_id){
|
|||||||
return [true, "削除に成功しました!"];
|
return [true, "削除に成功しました!"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// SQL操作関数pdo引っ張ってくるように変更(あとでほかもする)
|
||||||
|
function follow_user($pdo, $to_userid, $userid){
|
||||||
|
if (!(empty($pdo)) && !(empty($to_userid)) && !(empty($userid))){
|
||||||
|
$myData = getUserData($pdo, $userid);
|
||||||
|
$userData = getUserData($pdo, $to_userid);
|
||||||
|
|
||||||
|
if (empty($myData) || empty($userData)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$other_settings_me = is_OtherSettings($pdo, $userid);
|
||||||
|
$other_settings_user = is_OtherSettings($pdo, $to_userid);
|
||||||
|
if($other_settings_me === true && $other_settings_user === true){
|
||||||
|
// トランザクションを開始
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
try {
|
||||||
|
// フォローボタンが押された場合の処理
|
||||||
|
$followerList = explode(',', $userData['follower']);
|
||||||
|
if (!(in_array($userid, $followerList))) {
|
||||||
|
// 自分が相手をフォローしていない場合、相手のfollowerカラムと自分のfollowカラムを更新
|
||||||
|
$followerList[] = $userid;
|
||||||
|
$newFollowerList = implode(',', $followerList);
|
||||||
|
|
||||||
|
// UPDATE文を実行してフォロー情報を更新
|
||||||
|
$updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid");
|
||||||
|
$updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR);
|
||||||
|
$updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR);
|
||||||
|
$res = $updateQuery->execute();
|
||||||
|
|
||||||
|
// 自分のfollowカラムを更新
|
||||||
|
$myflwlist = explode(',', $myData["follow"]);
|
||||||
|
$myflwlist[] = $userData['userid'];
|
||||||
|
$newFollowList = implode(',', array_unique($myflwlist));
|
||||||
|
|
||||||
|
$updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid");
|
||||||
|
$updateQuery->bindValue(':follow', $newFollowList, PDO::PARAM_STR);
|
||||||
|
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||||
|
$res_follow = $updateQuery->execute();
|
||||||
|
|
||||||
|
send_notification($userData["userid"], $userid, "🎉" . $userid . "さんにフォローされました!🎉", "" . $userid . "さんにフォローされました。", "/@" . $userid . "", "follow");
|
||||||
|
|
||||||
|
if ($res && $res_follow) {
|
||||||
|
$pdo->commit();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "unfollow_user", $to_userid, "フォロー解除に失敗", 3);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "unfollow_user", $to_userid, $e, 4);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function unfollow_user($pdo, $to_userid, $userid){
|
||||||
|
if (!(empty($pdo)) && !(empty($to_userid)) && !(empty($userid))){
|
||||||
|
$myData = getUserData($pdo, $userid);
|
||||||
|
$userData = getUserData($pdo, $to_userid);
|
||||||
|
|
||||||
|
if (empty($myData) || empty($userData)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$other_settings_me = is_OtherSettings($pdo, $userid);
|
||||||
|
$other_settings_user = is_OtherSettings($pdo, $to_userid);
|
||||||
|
if($other_settings_me === true && $other_settings_user === true){
|
||||||
|
// トランザクションを開始
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
try {
|
||||||
|
// フォロー解除ボタンが押された場合の処理
|
||||||
|
$followerList = explode(',', $userData['follower']);
|
||||||
|
if (in_array($userid, $followerList)) {
|
||||||
|
// 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新
|
||||||
|
$followerList = array_diff($followerList, array($userid));
|
||||||
|
$newFollowerList = implode(',', $followerList);
|
||||||
|
|
||||||
|
// UPDATE文を実行してフォロー情報を更新
|
||||||
|
$updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid");
|
||||||
|
$updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR);
|
||||||
|
$updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR);
|
||||||
|
$res = $updateQuery->execute();
|
||||||
|
|
||||||
|
$myflwlist = explode(',', $myData["follow"]);
|
||||||
|
$delfollowList = array_diff($myflwlist, array($userData['userid']));
|
||||||
|
$deluserid = implode(',', $delfollowList);
|
||||||
|
|
||||||
|
// 自分のfollowカラムから相手のユーザーIDを削除
|
||||||
|
$updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid");
|
||||||
|
$updateQuery->bindValue(':follow', $deluserid, PDO::PARAM_STR);
|
||||||
|
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||||
|
$res_follow = $updateQuery->execute();
|
||||||
|
|
||||||
|
if ($res && $res_follow) {
|
||||||
|
// コミット
|
||||||
|
$pdo->commit();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "unfollow_user", $to_userid, "フォロー解除に失敗", 3);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "unfollow_user", $to_userid, $e, 4);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function block_user($pdo, $to_userid, $userid){
|
||||||
|
if (!(empty($pdo)) && !(empty($to_userid)) && !(empty($userid))){
|
||||||
|
$myData = getUserData($pdo, $userid);
|
||||||
|
$userData = getUserData($pdo, $to_userid);
|
||||||
|
|
||||||
|
if (empty($myData) || empty($userData)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$other_settings_me = is_OtherSettings($pdo, $userid);
|
||||||
|
$other_settings_user = is_OtherSettings($pdo, $to_userid);
|
||||||
|
if($other_settings_me === true && $other_settings_user === true){
|
||||||
|
// トランザクションを開始
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
try {
|
||||||
|
// フォロー解除ボタンが押された場合の処理
|
||||||
|
$blockList = explode(',', $myData['blocklist']);
|
||||||
|
if (!(in_array($userData['userid'], $blockList))) {
|
||||||
|
$blockList[] = $userData['userid'];
|
||||||
|
$newBlockList = implode(',', array_unique($blockList));
|
||||||
|
|
||||||
|
// UPDATE文を実行してフォロー情報を更新
|
||||||
|
$updateQuery = $pdo->prepare("UPDATE account SET blocklist = :blocklist WHERE userid = :userid");
|
||||||
|
$updateQuery->bindValue(':blocklist', $newBlockList, PDO::PARAM_STR);
|
||||||
|
$updateQuery->bindValue(':userid', $myData['userid'], PDO::PARAM_STR);
|
||||||
|
$res = $updateQuery->execute();
|
||||||
|
|
||||||
|
if ($res) {
|
||||||
|
// コミット
|
||||||
|
$pdo->commit();
|
||||||
|
|
||||||
|
$unfollow = unfollow_user($pdo, $to_userid, $userid);
|
||||||
|
if($unfollow === true){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "block_user", $to_userid, "ブロックに失敗", 3);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "block_user", $to_userid, $e, 4);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function unblock_user($pdo, $to_userid, $userid){
|
||||||
|
if (!(empty($pdo)) && !(empty($to_userid)) && !(empty($userid))){
|
||||||
|
$myData = getUserData($pdo, $userid);
|
||||||
|
$userData = getUserData($pdo, $to_userid);
|
||||||
|
|
||||||
|
if (empty($myData) || empty($userData)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$other_settings_me = is_OtherSettings($pdo, $userid);
|
||||||
|
$other_settings_user = is_OtherSettings($pdo, $to_userid);
|
||||||
|
if($other_settings_me === true && $other_settings_user === true){
|
||||||
|
// トランザクションを開始
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
try {
|
||||||
|
// フォロー解除ボタンが押された場合の処理
|
||||||
|
$blockList = explode(',', $myData['blocklist']);
|
||||||
|
if (in_array($userData['userid'], $blockList)) {
|
||||||
|
$blockList = array_diff($blockList, array($userData['userid']));
|
||||||
|
$newBlockList = implode(',', $blockList);
|
||||||
|
|
||||||
|
// UPDATE文を実行してフォロー情報を更新
|
||||||
|
$updateQuery = $pdo->prepare("UPDATE account SET blocklist = :blocklist WHERE userid = :userid");
|
||||||
|
$updateQuery->bindValue(':blocklist', $newBlockList, PDO::PARAM_STR);
|
||||||
|
$updateQuery->bindValue(':userid', $myData['userid'], PDO::PARAM_STR);
|
||||||
|
$res = $updateQuery->execute();
|
||||||
|
|
||||||
|
if ($res) {
|
||||||
|
// コミット
|
||||||
|
$pdo->commit();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "unblock_user", $to_userid, "ブロック解除に失敗", 3);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "unblock_user", $to_userid, $e, 4);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function addFavorite($pdo, $uniqid, $userid){
|
||||||
|
if (!(empty($pdo)) && !(empty($uniqid)) && !(empty($userid))){
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
try {
|
||||||
|
// 投稿のいいね情報を取得
|
||||||
|
$stmt = $pdo->prepare("SELECT account,ueuse,favorite FROM ueuse WHERE uniqid = :uniqid");
|
||||||
|
$stmt->bindValue(':uniqid', $uniqid, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$post = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
if (!(empty($post))) {
|
||||||
|
$favoriteList = explode(',', $post['favorite']);
|
||||||
|
$index = array_search($userid, $favoriteList);
|
||||||
|
|
||||||
|
if ($index === false) {
|
||||||
|
// ユーザーIDを追加
|
||||||
|
$favoriteList[] = $userid;
|
||||||
|
|
||||||
|
send_notification(safetext($post['account']),$userid,"".$userid."さんがいいねしました!",safetext($post['ueuse']),"/!".$uniqid."","favorite");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// ユーザーIDを削除
|
||||||
|
array_splice($favoriteList, $index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新しいいいね情報を更新
|
||||||
|
$newFavorite = implode(',', $favoriteList);
|
||||||
|
$updateQuery = $pdo->prepare("UPDATE ueuse SET favorite = :favorite WHERE uniqid = :uniqid");
|
||||||
|
$updateQuery->bindValue(':favorite', $newFavorite, PDO::PARAM_STR);
|
||||||
|
$updateQuery->bindValue(':uniqid', $uniqid, PDO::PARAM_STR);
|
||||||
|
$res = $updateQuery->execute();
|
||||||
|
|
||||||
|
if ($res) {
|
||||||
|
$pdo->commit();
|
||||||
|
return [true, "いいねに成功しました", $newFavorite];
|
||||||
|
} else {
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "addFavorite", $uniqid, "いいねに失敗しました", 3);
|
||||||
|
return [false, "いいねに失敗しました", $post['favorite']];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$pdo->rollBack();
|
||||||
|
return [false, "投稿が見つかりませんでした", null];
|
||||||
|
}
|
||||||
|
} catch(PDOException $e) {
|
||||||
|
actionLog($userid, "error", "addFavorite", $uniqid, $e, 4);
|
||||||
|
return [false, "データベースエラー", null];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getFavorite($pdo, $uniqid){
|
||||||
|
if (!(empty($pdo)) && !(empty($uniqid))){
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 投稿のいいね情報を取得
|
||||||
|
$stmt = $pdo->prepare("SELECT account,ueuse,favorite FROM ueuse WHERE uniqid = :uniqid");
|
||||||
|
$stmt->bindValue(':uniqid', $uniqid, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$post = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
if (!(empty($post))) {
|
||||||
|
return [true, "いいねを取得しました", $post['favorite']];
|
||||||
|
} else {
|
||||||
|
return [false, "投稿が見つかりませんでした", null];
|
||||||
|
}
|
||||||
|
} catch(PDOException $e) {
|
||||||
|
actionLog(null, "error", "getFavorite", $uniqid, $e, 4);
|
||||||
|
return [false, "データベースエラー", null];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getUserData($pdo, $userid) {
|
||||||
|
$query = $pdo->prepare("SELECT * FROM account WHERE userid = :userid");
|
||||||
|
$query->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||||
|
$query->execute();
|
||||||
|
return $query->fetch();
|
||||||
|
}
|
||||||
|
function actionLog($userid, $type, $place, $target, $content, $importance){
|
||||||
|
|
||||||
|
if(empty($userid)){
|
||||||
|
$userid = "uwuzu-fromsys";
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($importance) {
|
||||||
|
case 0:
|
||||||
|
$importance_level = 0;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$importance_level = 1;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$importance_level = 2;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$importance_level = 3;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$importance_level = 4;
|
||||||
|
break;
|
||||||
|
case "none":
|
||||||
|
$importance_level = 0;
|
||||||
|
break;
|
||||||
|
case "low":
|
||||||
|
$importance_level = 1;
|
||||||
|
break;
|
||||||
|
case "middle":
|
||||||
|
$importance_level = 2;
|
||||||
|
break;
|
||||||
|
case "high":
|
||||||
|
$importance_level = 3;
|
||||||
|
break;
|
||||||
|
case "critical":
|
||||||
|
$importance_level = 4;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$importance_level = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($type)){
|
||||||
|
$type = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($target)){
|
||||||
|
$target = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($content)){
|
||||||
|
$content = "none";
|
||||||
|
}
|
||||||
|
if(is_array($content)){
|
||||||
|
$content = implode(', ', $content);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($place)){
|
||||||
|
$place = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
// データベースに接続
|
||||||
|
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) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(empty($pdo))){
|
||||||
|
$uniqid = createUniqId();
|
||||||
|
$datetime = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
// トランザクション開始
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
|
||||||
|
try {
|
||||||
|
// SQL作成
|
||||||
|
$stmt = $pdo->prepare("INSERT INTO actionlog (uniqid, userid, type, place, target, content, importance, datetime) VALUES (:uniqid, :userid, :type, :place, :target, :content, :importance, :datetime)");
|
||||||
|
|
||||||
|
$stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':userid', $userid, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':type', $type, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':place', $place, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$stmt->bindParam(':target', $target, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':content', $content, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':importance', $importance_level, PDO::PARAM_INT);
|
||||||
|
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
||||||
|
$res = $stmt->execute();
|
||||||
|
if($res){
|
||||||
|
$pdo->commit();
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$pdo->rollBack();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch(Exception $e) {
|
||||||
|
// エラーが発生した時はロールバック
|
||||||
|
// ここでログを残そうとすると無限ループ入るのでなし
|
||||||
|
$pdo->rollBack();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
function safetext($text){
|
function safetext($text){
|
||||||
// テキストの安全化
|
// テキストの安全化
|
||||||
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false);
|
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false);
|
||||||
}
|
}
|
||||||
|
function decode_yajirushi($postText){
|
||||||
|
$postText = str_replace('←', '←', $postText);
|
||||||
|
$postText = str_replace('↓', '↓', $postText);
|
||||||
|
$postText = str_replace('↑', '↑', $postText);
|
||||||
|
$postText = str_replace('→', '→', $postText);
|
||||||
|
return $postText;
|
||||||
|
}
|
||||||
function deleteDirectory($dir) {
|
function deleteDirectory($dir) {
|
||||||
//ディレクトリを一括で消すやつ
|
//ディレクトリを一括で消すやつ
|
||||||
if (!is_dir($dir)) {
|
if (!is_dir($dir)) {
|
||||||
@@ -1416,4 +1858,42 @@ function val_AddOtherSettings($dataname, $data, $jsontext){
|
|||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
//ユーザーのOther_Settingsが既にあるかないか(なければ空のJSONを追加)
|
||||||
|
function is_OtherSettings($pdo, $userid, $add = true){
|
||||||
|
$other_settings = getUserData($pdo, $userid)["other_settings"];
|
||||||
|
if(empty($other_settings)){
|
||||||
|
if($add === true){
|
||||||
|
$new_data = [];
|
||||||
|
$new_json = json_encode($new_data);
|
||||||
|
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
try {
|
||||||
|
// UPDATE文を実行してフォロー情報を更新
|
||||||
|
$updateQuery = $pdo->prepare("UPDATE account SET other_settings = :other_settings WHERE userid = :userid");
|
||||||
|
$updateQuery->bindValue(':other_settings', $new_json, PDO::PARAM_STR);
|
||||||
|
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||||
|
$res = $updateQuery->execute();
|
||||||
|
|
||||||
|
if($res){
|
||||||
|
$pdo->commit();
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "is_OtherSettings", null, "空のOtherSettingsを追加できませんでした", 3);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// ロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "is_OtherSettings", null, $e, 4);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
+97
-23
@@ -78,28 +78,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -134,28 +134,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -323,7 +323,8 @@ if ("serviceWorker" in navigator) {
|
|||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
<div class="tlchange">
|
<div class="tlchange">
|
||||||
<button class="btn on" id="timeline_local">ローカル</button>
|
<button class="btn" id="timeline_foryou">おすすめ</button>
|
||||||
|
<button class="btn" id="timeline_local">ローカル</button>
|
||||||
<button class="btn" id="timeline_follow">フォロー</button>
|
<button class="btn" id="timeline_follow">フォロー</button>
|
||||||
</div>
|
</div>
|
||||||
<?php if( !empty($error_message) ): ?>
|
<?php if( !empty($error_message) ): ?>
|
||||||
@@ -470,20 +471,55 @@ $(document).ready(function() {
|
|||||||
var account_id = '<?php echo $loginid; ?>';
|
var account_id = '<?php echo $loginid; ?>';
|
||||||
|
|
||||||
var pageNumber = 1;
|
var pageNumber = 1;
|
||||||
var isLoading = false;
|
var isLoading = false;
|
||||||
var mode = "local";
|
|
||||||
|
|
||||||
loadPosts();
|
var mode = getCookie('mode') || "local";
|
||||||
|
|
||||||
function loadPosts() {
|
if (mode == "foryou") {
|
||||||
if (isLoading) return;
|
$('#timeline_foryou').addClass('on');
|
||||||
isLoading = true;
|
$('#timeline_local').removeClass('on');
|
||||||
|
$('#timeline_follow').removeClass('on');
|
||||||
|
} else if (mode == "local") {
|
||||||
|
$('#timeline_foryou').removeClass('on');
|
||||||
|
$('#timeline_local').addClass('on');
|
||||||
|
$('#timeline_follow').removeClass('on');
|
||||||
|
} else if (mode == "follow") {
|
||||||
|
$('#timeline_foryou').removeClass('on');
|
||||||
|
$('#timeline_local').removeClass('on');
|
||||||
|
$('#timeline_follow').addClass('on');
|
||||||
|
}
|
||||||
|
loadPosts();
|
||||||
|
|
||||||
|
function setCookie(name, value, days) {
|
||||||
|
var expires = "";
|
||||||
|
if (days) {
|
||||||
|
var date = new Date();
|
||||||
|
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||||
|
expires = "; expires=" + date.toUTCString();
|
||||||
|
}
|
||||||
|
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCookie(name) {
|
||||||
|
var nameEQ = name + "=";
|
||||||
|
var ca = document.cookie.split(';');
|
||||||
|
for (var i = 0; i < ca.length; i++) {
|
||||||
|
var c = ca[i];
|
||||||
|
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
||||||
|
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadPosts() {
|
||||||
|
if (isLoading) return;
|
||||||
|
isLoading = true;
|
||||||
$("#loading").show();
|
$("#loading").show();
|
||||||
if(mode == "local"){
|
if (mode == "local") {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '../nextpage/nextpage.php', // PHPファイルへのパス
|
url: '../nextpage/nextpage.php', // PHPファイルへのパス
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: { page: pageNumber, userid: userid , account_id: account_id },
|
data: { page: pageNumber, userid: userid, account_id: account_id },
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
timeout: 300000,
|
timeout: 300000,
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
@@ -492,17 +528,17 @@ $(document).ready(function() {
|
|||||||
isLoading = false;
|
isLoading = false;
|
||||||
$("#loading").hide();
|
$("#loading").hide();
|
||||||
},
|
},
|
||||||
error: function (xhr, textStatus, errorThrown) { // エラーと判定された場合
|
error: function(xhr, textStatus, errorThrown) { // エラーと判定された場合
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
$("#loading").hide();
|
$("#loading").hide();
|
||||||
$("#error").show();
|
$("#error").show();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}else if(mode == "follow"){
|
} else if (mode == "follow") {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '../nextpage/ftlpage.php', // PHPファイルへのパス
|
url: '../nextpage/ftlpage.php', // PHPファイルへのパス
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: { page: pageNumber, userid: userid , account_id: account_id },
|
data: { page: pageNumber, userid: userid, account_id: account_id },
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
timeout: 300000,
|
timeout: 300000,
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
@@ -511,15 +547,49 @@ $(document).ready(function() {
|
|||||||
isLoading = false;
|
isLoading = false;
|
||||||
$("#loading").hide();
|
$("#loading").hide();
|
||||||
},
|
},
|
||||||
error: function (xhr, textStatus, errorThrown) { // エラーと判定された場合
|
error: function(xhr, textStatus, errorThrown) { // エラーと判定された場合
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
$("#loading").hide();
|
$("#loading").hide();
|
||||||
$("#error").show();
|
$("#error").show();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
} else if (mode == "foryou") {
|
||||||
}
|
$.ajax({
|
||||||
|
url: '../nextpage/foryoupage.php', // PHPファイルへのパス
|
||||||
|
method: 'GET',
|
||||||
|
data: { page: pageNumber, userid: userid, account_id: account_id },
|
||||||
|
dataType: 'html',
|
||||||
|
timeout: 300000,
|
||||||
|
success: function(response) {
|
||||||
|
$('#postContainer').append(response);
|
||||||
|
pageNumber++;
|
||||||
|
isLoading = false;
|
||||||
|
$("#loading").hide();
|
||||||
|
},
|
||||||
|
error: function(xhr, textStatus, errorThrown) { // エラーと判定された場合
|
||||||
|
isLoading = false;
|
||||||
|
$("#loading").hide();
|
||||||
|
$("#error").show();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#timeline_foryou").on('click', function(event) {
|
||||||
|
$('#timeline_foryou').addClass('on');
|
||||||
|
$('#timeline_local').removeClass('on');
|
||||||
|
$('#timeline_follow').removeClass('on');
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
$("#postContainer").empty();
|
||||||
|
pageNumber = 1;
|
||||||
|
mode = "foryou";
|
||||||
|
setCookie('mode', mode, 28);
|
||||||
|
loadPosts();
|
||||||
|
});
|
||||||
|
|
||||||
$("#timeline_local").on('click', function(event) {
|
$("#timeline_local").on('click', function(event) {
|
||||||
|
$('#timeline_foryou').removeClass('on');
|
||||||
$('#timeline_local').addClass('on');
|
$('#timeline_local').addClass('on');
|
||||||
$('#timeline_follow').removeClass('on');
|
$('#timeline_follow').removeClass('on');
|
||||||
|
|
||||||
@@ -527,9 +597,12 @@ $(document).ready(function() {
|
|||||||
$("#postContainer").empty();
|
$("#postContainer").empty();
|
||||||
pageNumber = 1;
|
pageNumber = 1;
|
||||||
mode = "local";
|
mode = "local";
|
||||||
|
setCookie('mode', mode, 28);
|
||||||
loadPosts();
|
loadPosts();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#timeline_follow").on('click', function(event) {
|
$("#timeline_follow").on('click', function(event) {
|
||||||
|
$('#timeline_foryou').removeClass('on');
|
||||||
$('#timeline_local').removeClass('on');
|
$('#timeline_local').removeClass('on');
|
||||||
$('#timeline_follow').addClass('on');
|
$('#timeline_follow').addClass('on');
|
||||||
|
|
||||||
@@ -537,6 +610,7 @@ $(document).ready(function() {
|
|||||||
$("#postContainer").empty();
|
$("#postContainer").empty();
|
||||||
pageNumber = 1;
|
pageNumber = 1;
|
||||||
mode = "follow";
|
mode = "follow";
|
||||||
|
setCookie('mode', mode, 28);
|
||||||
loadPosts();
|
loadPosts();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ console.log(
|
|||||||
"",
|
"",
|
||||||
);
|
);
|
||||||
console.log(
|
console.log(
|
||||||
"自分で意図して行っていないのであれば%c今直ぐにこのツールを閉じて作業を中断してください。%c\n中断後、安全性の観点からセッショントークンの再生成をすることを強く推奨します。\nセッショントークンの再生性は以下のリンクより行えます。"+sesstoken_reset_url,
|
"自分で意図して行っていないのであれば%c今直ぐにこのツールを閉じて作業を中断してください。%c\n中断後、安全性の観点からセッショントークンの再生成をすることを強く推奨します。\nセッショントークンの再生性は以下のリンクより行えます。\n"+sesstoken_reset_url,
|
||||||
"color:#FF4848; font-weight: bold;",
|
"color:#FF4848; font-weight: bold;",
|
||||||
"",
|
"",
|
||||||
);
|
);
|
||||||
|
|||||||
+4
-4
@@ -264,10 +264,10 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
|
|
||||||
if(check_mime($temp_file) == "image/webp"){
|
if(check_mime($temp_file) == "image/webp"){
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$new_userid.'.webp';
|
$newFilename = createUniqId() . '-'.$new_userid.'.webp';
|
||||||
}else{
|
}else{
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$new_userid.'.' . $extension;
|
$newFilename = createUniqId() . '-'.$new_userid.'.' . $extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
@@ -316,10 +316,10 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
|
|
||||||
if(check_mime($temp_file) == "image/webp"){
|
if(check_mime($temp_file) == "image/webp"){
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$new_userid.'.webp';
|
$newFilename = createUniqId() . '-'.$new_userid.'.webp';
|
||||||
}else{
|
}else{
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$new_userid.'.' . $extension;
|
$newFilename = createUniqId() . '-'.$new_userid.'.' . $extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$localFilePathhead = 'img/deficon/icon.png';
|
$localFilePathhead = 'img/deficon/icon.png';
|
||||||
|
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.png';
|
$newFilename = createUniqId() . '-'.$userid.'.png';
|
||||||
|
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'usericons/' . $newFilename;
|
$uploadedPath = 'usericons/' . $newFilename;
|
||||||
@@ -226,10 +226,10 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
|
|
||||||
if(check_mime($uploadedFile['tmp_name']) == "image/webp"){
|
if(check_mime($uploadedFile['tmp_name']) == "image/webp"){
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.webp';
|
$newFilename = createUniqId() . '-'.$userid.'.webp';
|
||||||
}else{
|
}else{
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.' . $extension;
|
$newFilename = createUniqId() . '-'.$userid.'.' . $extension;
|
||||||
}
|
}
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'usericons/' . $newFilename;
|
$uploadedPath = 'usericons/' . $newFilename;
|
||||||
@@ -262,7 +262,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$localFilePathhead = 'img/defhead/head.png';
|
$localFilePathhead = 'img/defhead/head.png';
|
||||||
|
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.png';
|
$newFilename = createUniqId() . '-'.$userid.'.png';
|
||||||
|
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'userheads/' . $newFilename;
|
$uploadedPath = 'userheads/' . $newFilename;
|
||||||
@@ -403,6 +403,8 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$enc_mailadds = "";
|
$enc_mailadds = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$other_settings = [];
|
||||||
|
$other_settings_json = json_encode($other_settings);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@@ -415,7 +417,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$loginid = hash('sha3-512', $LoginIdBytes);
|
$loginid = hash('sha3-512', $LoginIdBytes);
|
||||||
|
|
||||||
// SQL作成
|
// SQL作成
|
||||||
$stmt = $pdo->prepare("INSERT INTO account (username, userid, password, loginid, mailadds, profile, iconname, headname, role, datetime, admin, encryption_ivkey) VALUES (:username, :userid, :password, :loginid, :mailadds, :profile, :iconname, :headname, :role, :datetime, :admin ,:encryption_ivkey)");
|
$stmt = $pdo->prepare("INSERT INTO account (username, userid, password, loginid, mailadds, profile, iconname, headname, role, datetime, admin, encryption_ivkey, other_settings) VALUES (:username, :userid, :password, :loginid, :mailadds, :profile, :iconname, :headname, :role, :datetime, :admin, :encryption_ivkey, :other_settings)");
|
||||||
|
|
||||||
// アイコン画像
|
// アイコン画像
|
||||||
$stmt->bindValue(':iconname', $iconName, PDO::PARAM_STR);
|
$stmt->bindValue(':iconname', $iconName, PDO::PARAM_STR);
|
||||||
@@ -432,6 +434,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$stmt->bindParam(':profile', $profile, PDO::PARAM_STR);
|
$stmt->bindParam(':profile', $profile, PDO::PARAM_STR);
|
||||||
$stmt->bindParam(':role', $role, PDO::PARAM_STR);
|
$stmt->bindParam(':role', $role, PDO::PARAM_STR);
|
||||||
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':other_settings', $other_settings_json, PDO::PARAM_STR);
|
||||||
|
|
||||||
$stmt->bindParam(':encryption_ivkey', $iv, PDO::PARAM_STR);
|
$stmt->bindParam(':encryption_ivkey', $iv, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
|
|
||||||
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id']) && isset($_GET['search_
|
|||||||
|
|
||||||
$itemsPerPage = 50;
|
$itemsPerPage = 50;
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
// データベース接続の設定
|
// データベース接続の設定
|
||||||
|
|||||||
@@ -0,0 +1,315 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require('../db.php');
|
||||||
|
require("../function/function.php");
|
||||||
|
|
||||||
|
|
||||||
|
require('view.php');
|
||||||
|
|
||||||
|
// データベースに接続
|
||||||
|
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) {
|
||||||
|
// 接続エラーのときエラー内容を取得する
|
||||||
|
$error_message[] = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
||||||
|
$userid = safetext($_GET['userid']);
|
||||||
|
$loginid = safetext($_GET['account_id']);
|
||||||
|
|
||||||
|
// データベース接続の設定
|
||||||
|
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
|
||||||
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||||
|
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||||
|
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
|
||||||
|
));
|
||||||
|
|
||||||
|
$query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||||
|
|
||||||
|
$query->execute(array(':userid' => $userid));
|
||||||
|
|
||||||
|
$result2 = $query->fetch();
|
||||||
|
|
||||||
|
if(!(empty($result2["loginid"]))){
|
||||||
|
if($result2["loginid"] === $loginid){
|
||||||
|
|
||||||
|
$aduserinfoQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role,sacinfo,blocklist,bookmark FROM account WHERE userid = :userid");
|
||||||
|
$aduserinfoQuery->bindValue(':userid', safetext($userid));
|
||||||
|
$aduserinfoQuery->execute();
|
||||||
|
$res = $aduserinfoQuery->fetch();
|
||||||
|
$myblocklist = safetext($res["blocklist"]);
|
||||||
|
$mybookmark = safetext($res["bookmark"]);
|
||||||
|
|
||||||
|
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
||||||
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
|
$messages = array();
|
||||||
|
|
||||||
|
if (!empty($pdo)) {
|
||||||
|
//------------------------------------------すべてのユーズを取得----------------------------------------------
|
||||||
|
$all_sql = "SELECT ueuse.*
|
||||||
|
FROM ueuse
|
||||||
|
LEFT JOIN account ON ueuse.account = account.userid
|
||||||
|
WHERE ueuse.rpuniqid = '' AND account.role != 'ice'
|
||||||
|
ORDER BY ueuse.datetime DESC
|
||||||
|
LIMIT :offset, :itemsPerPage";
|
||||||
|
|
||||||
|
$all_stmt = $pdo->prepare($all_sql);
|
||||||
|
$all_stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||||
|
$all_stmt->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT);
|
||||||
|
$all_stmt->execute();
|
||||||
|
|
||||||
|
while ($row = $all_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$all_messages[] = $row;
|
||||||
|
}
|
||||||
|
if(empty($all_messages)){
|
||||||
|
$all_messages = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------------------人気なユーズを取得(バズってるやつ)----------------------------------------------
|
||||||
|
$day_count_sql = "SELECT ueuse.*
|
||||||
|
FROM ueuse
|
||||||
|
LEFT JOIN account ON ueuse.account = account.userid
|
||||||
|
WHERE ueuse.datetime >= NOW() - INTERVAL 7 DAY AND ueuse.rpuniqid = '' AND account.role != 'ice'
|
||||||
|
ORDER BY ueuse.datetime DESC
|
||||||
|
LIMIT 1000";
|
||||||
|
$cnt_stmt = $pdo->prepare($day_count_sql);
|
||||||
|
$cnt_stmt->execute();
|
||||||
|
$Before7daysPosts = $cnt_stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
// 結果が15件に満たない場合
|
||||||
|
if(count($Before7daysPosts) < 15){
|
||||||
|
$get_day = 90;
|
||||||
|
}elseif(count($Before7daysPosts) > 15 && count($Before7daysPosts) < 150){
|
||||||
|
$get_day = 31;
|
||||||
|
}elseif(count($Before7daysPosts) > 150 && count($Before7daysPosts) < 750){
|
||||||
|
$get_day = 7;
|
||||||
|
}elseif(count($Before7daysPosts) > 750){
|
||||||
|
$get_day = 5;
|
||||||
|
}else{
|
||||||
|
$get_day = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
$get_day = $get_day * (2 ** floor($pageNumber / 3));
|
||||||
|
|
||||||
|
$pop_sql = "SELECT
|
||||||
|
ueuse.*,
|
||||||
|
(LENGTH(ueuse.favorite) - LENGTH(REPLACE(ueuse.favorite, ',', '')) - 1) AS favorite_count,
|
||||||
|
(SELECT COUNT(*) FROM ueuse AS reuse WHERE reuse.ruuniqid = ueuse.uniqid) AS reuse_count,
|
||||||
|
((LENGTH(ueuse.favorite) - LENGTH(REPLACE(ueuse.favorite, ',', '')) - 1) +
|
||||||
|
(SELECT COUNT(*) FROM ueuse AS reuse WHERE reuse.ruuniqid = ueuse.uniqid)) AS total_score
|
||||||
|
FROM
|
||||||
|
ueuse
|
||||||
|
LEFT JOIN account ON ueuse.account = account.userid
|
||||||
|
WHERE
|
||||||
|
ueuse.datetime >= NOW() - INTERVAL :getday DAY
|
||||||
|
AND
|
||||||
|
ueuse.rpuniqid = ''
|
||||||
|
AND
|
||||||
|
account.role != 'ice'
|
||||||
|
ORDER BY
|
||||||
|
total_score DESC
|
||||||
|
LIMIT :offset, :itemsPerPage;
|
||||||
|
";
|
||||||
|
|
||||||
|
$pop_stmt = $pdo->prepare($pop_sql);
|
||||||
|
$pop_stmt->bindValue(':getday', $get_day, PDO::PARAM_INT);
|
||||||
|
$pop_stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||||
|
$pop_stmt->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT);
|
||||||
|
$pop_stmt->execute();
|
||||||
|
|
||||||
|
while ($row = $pop_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$pop_messages[] = $row;
|
||||||
|
}
|
||||||
|
if(empty($flw_messages)){
|
||||||
|
$pop_messages = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------------------フォローしているユーザーから取得----------------------------------------------
|
||||||
|
$followList = explode(',', getUserData($pdo, $userid)["follow"]);
|
||||||
|
|
||||||
|
foreach ($followList as $followUserId) {
|
||||||
|
$flw_sql = "SELECT ueuse.*
|
||||||
|
FROM ueuse
|
||||||
|
LEFT JOIN account ON ueuse.account = account.userid
|
||||||
|
WHERE ueuse.rpuniqid = '' AND account.role != 'ice' AND ueuse.account = :follow_account AND ueuse.datetime >= NOW() - INTERVAL :getday DAY
|
||||||
|
ORDER BY ueuse.datetime DESC
|
||||||
|
LIMIT :offset, :itemsPerPage";
|
||||||
|
|
||||||
|
$flw_stmt = $pdo->prepare($flw_sql);
|
||||||
|
$flw_stmt->bindValue(':getday', $get_day, PDO::PARAM_INT);
|
||||||
|
$flw_stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||||
|
$flw_stmt->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT);
|
||||||
|
$flw_stmt->bindValue(':follow_account', $followUserId, PDO::PARAM_STR);
|
||||||
|
$flw_stmt->execute();
|
||||||
|
|
||||||
|
while ($row = $flw_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$flw_messages[] = $row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!(empty($flw_messages))){
|
||||||
|
usort($flw_messages, function($a, $b) {
|
||||||
|
return strtotime($b['datetime']) - strtotime($a['datetime']);
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
$flw_messages = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------------------いいねやリユーズを頻繁にするような好きっぽそうなユーザーの投稿を取得--------------------------------------
|
||||||
|
$fav_sql = "SELECT ueuse.*,
|
||||||
|
(LENGTH(ueuse.favorite) - LENGTH(REPLACE(ueuse.favorite, ',', '')) - 1) AS favorite_count
|
||||||
|
FROM ueuse
|
||||||
|
WHERE FIND_IN_SET(:userid, ueuse.favorite) > 0
|
||||||
|
ORDER BY ueuse.datetime DESC
|
||||||
|
LIMIT 100
|
||||||
|
";
|
||||||
|
$fav_stmt = $pdo->prepare($fav_sql);
|
||||||
|
$fav_stmt->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||||
|
$fav_stmt->execute();
|
||||||
|
while ($row = $fav_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$fav_ueuse_lists[] = $row;
|
||||||
|
}
|
||||||
|
if(!(empty($fav_ueuse_lists))){
|
||||||
|
$many_fav_accounts = array_column($fav_ueuse_lists, 'account');
|
||||||
|
$many_fav_account_counts = array_count_values($many_fav_accounts);
|
||||||
|
arsort($many_fav_account_counts);
|
||||||
|
$top_fav_accounts = array_slice($many_fav_account_counts, 0, 15, true);
|
||||||
|
|
||||||
|
foreach ($top_fav_accounts as $favUserId => $count) {
|
||||||
|
$favget_sql = "SELECT ueuse.*
|
||||||
|
FROM ueuse
|
||||||
|
LEFT JOIN account ON ueuse.account = account.userid
|
||||||
|
WHERE ueuse.rpuniqid = '' AND account.role != 'ice' AND ueuse.account = :fav_account AND ueuse.datetime >= NOW() - INTERVAL :getday DAY
|
||||||
|
ORDER BY ueuse.datetime DESC
|
||||||
|
LIMIT :offset, :itemsPerPage";
|
||||||
|
|
||||||
|
$favget_stmt = $pdo->prepare($favget_sql);
|
||||||
|
$favget_stmt->bindValue(':getday', $get_day, PDO::PARAM_INT);
|
||||||
|
$favget_stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||||
|
$favget_stmt->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT);
|
||||||
|
$favget_stmt->bindValue(':fav_account', $favUserId, PDO::PARAM_STR);
|
||||||
|
$favget_stmt->execute();
|
||||||
|
|
||||||
|
while ($row = $favget_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$favget_messages[] = $row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(empty($favget_messages)){
|
||||||
|
$favget_messages = [];
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$favget_messages = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
//基本的には人気・フォロー中・いいねする事が多いユーザーのユーズでTLを構成するけど全部出きったらLTLと同じにする
|
||||||
|
if(empty($pop_messages) && empty($flw_messages) && empty($favget_messages)){
|
||||||
|
$messages = $all_messages;
|
||||||
|
}elseif(count(array_merge($pop_messages, $flw_messages, $favget_messages)) < 15){
|
||||||
|
$total_messages = array_unique(array_merge($all_messages, $pop_messages, $flw_messages, $favget_messages), SORT_REGULAR);
|
||||||
|
shuffle($total_messages);
|
||||||
|
$messages = array_slice($total_messages, 0, 15);
|
||||||
|
}else{
|
||||||
|
$total_messages = array_unique(array_merge($pop_messages, $flw_messages, $favget_messages), SORT_REGULAR);
|
||||||
|
shuffle($total_messages);
|
||||||
|
$messages = array_slice($total_messages, 0, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||||
|
foreach ($messages as &$message) {
|
||||||
|
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||||
|
$userQuery->bindValue(':userid', $message["account"]);
|
||||||
|
$userQuery->execute();
|
||||||
|
$userData = $userQuery->fetch();
|
||||||
|
|
||||||
|
if ($userData) {
|
||||||
|
$message['iconname'] = $userData['iconname'];
|
||||||
|
$message['headname'] = $userData['headname'];
|
||||||
|
$message['username'] = $userData['username'];
|
||||||
|
$message['sacinfo'] = $userData['sacinfo'];
|
||||||
|
$message['role'] = $userData['role'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//リプライ数取得
|
||||||
|
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||||
|
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||||
|
$rpQuery->execute();
|
||||||
|
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
if ($rpData){
|
||||||
|
$message['reply_count'] = $rpData['reply_count'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//リユーズ数取得
|
||||||
|
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||||
|
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||||
|
$ruQuery->execute();
|
||||||
|
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
if ($ruData){
|
||||||
|
$message['reuse_count'] = $ruData['reuse_count'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//adsystem------------------
|
||||||
|
|
||||||
|
$message['ads'] = "false";
|
||||||
|
|
||||||
|
$today = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
|
$adsQuery = $pdo->prepare("SELECT * FROM ads WHERE start_date < :today AND limit_date > :today ORDER BY rand()");
|
||||||
|
$adsQuery->bindValue(':today', $today);
|
||||||
|
$adsQuery->execute();
|
||||||
|
$adsresult = $adsQuery->fetch();
|
||||||
|
if(!(empty($adsresult))){
|
||||||
|
$message['ads'] = "true";
|
||||||
|
$message['ads_url'] = $adsresult["url"];
|
||||||
|
$message['ads_img_url'] = $adsresult["image_url"];
|
||||||
|
$message['ads_memo'] = $adsresult["memo"];
|
||||||
|
}
|
||||||
|
//--------------------------
|
||||||
|
|
||||||
|
if(!empty($messages)){
|
||||||
|
foreach ($messages as $value) {
|
||||||
|
if (false === strpos($myblocklist, ','.safetext($value['account']))) {
|
||||||
|
if(!($value["role"] === "ice")){
|
||||||
|
$fav = $value['favorite']; // コンマで区切られたユーザーIDを含む変数
|
||||||
|
|
||||||
|
// コンマで区切って配列に分割し、要素数を数える
|
||||||
|
$favIds = explode(',', $fav);
|
||||||
|
$value["favcnt"] = count($favIds)-1;
|
||||||
|
|
||||||
|
$value["bookmark"] = $mybookmark;
|
||||||
|
|
||||||
|
$messageDisplay = new MessageDisplay($value, $userid); // $userid をコンストラクタに渡す
|
||||||
|
$messageDisplay->display();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($message['ads'] === "true"){
|
||||||
|
echo '<div class="ads"><a href = "' . safetext($message['ads_url']) . '" target="_blank"><img src="' . safetext($message['ads_img_url']) . '" title="' . safetext($message['ads_memo']) . '"></a></div>';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
echo '<div class="tokonone" id="noueuse"><p>ユーズがありません</p></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdo = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
echo '<div class="tokonone" id="noueuse"><p>取得に失敗しました。</p></div>';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
echo '<div class="tokonone" id="noueuse"><p>取得に失敗しました。</p></div>';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
echo '<div class="tokonone" id="noueuse"><p>取得に失敗しました。</p></div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -49,6 +49,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
|
|
||||||
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
|
|
||||||
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
|
|
||||||
$itemsPerPage = 15; // 1ページあたりの投稿数
|
$itemsPerPage = 15; // 1ページあたりの投稿数
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|||||||
+16
-3
@@ -42,6 +42,13 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
$keyword = safetext(isset($_GET['keyword'])) ? safetext($_GET['keyword']) : '';
|
$keyword = safetext(isset($_GET['keyword'])) ? safetext($_GET['keyword']) : '';
|
||||||
$userid = safetext($_GET['userid']);
|
$userid = safetext($_GET['userid']);
|
||||||
|
|
||||||
|
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
||||||
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|
||||||
if (!empty($pdo)) {
|
if (!empty($pdo)) {
|
||||||
@@ -64,20 +71,26 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
$username = $matches[1];
|
$username = $matches[1];
|
||||||
$searchKeyword = $matches[2];
|
$searchKeyword = $matches[2];
|
||||||
|
|
||||||
$messageQuery = $dbh->prepare("SELECT * FROM ueuse WHERE account = :username AND (ueuse LIKE :searchKeyword OR abi LIKE :searchKeyword) ORDER BY datetime DESC");
|
$messageQuery = $dbh->prepare("SELECT * FROM ueuse WHERE account = :username AND (ueuse LIKE :searchKeyword OR abi LIKE :searchKeyword) ORDER BY datetime DESC LIMIT :offset, :itemsPerPage");
|
||||||
$messageQuery->bindValue(':username', $username, PDO::PARAM_STR);
|
$messageQuery->bindValue(':username', $username, PDO::PARAM_STR);
|
||||||
$messageQuery->bindValue(':searchKeyword', '%' . $searchKeyword . '%', PDO::PARAM_STR);
|
$messageQuery->bindValue(':searchKeyword', '%' . $searchKeyword . '%', PDO::PARAM_STR);
|
||||||
|
$messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||||
|
$messageQuery->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT);
|
||||||
$messageQuery->execute();
|
$messageQuery->execute();
|
||||||
$message_array = $messageQuery->fetchAll();
|
$message_array = $messageQuery->fetchAll();
|
||||||
} else {
|
} else {
|
||||||
$messageQuery = $dbh->prepare("SELECT * FROM ueuse WHERE ueuse LIKE :keyword OR abi LIKE :keyword ORDER BY datetime DESC");
|
$messageQuery = $dbh->prepare("SELECT * FROM ueuse WHERE ueuse LIKE :keyword OR abi LIKE :keyword ORDER BY datetime DESC LIMIT :offset, :itemsPerPage");
|
||||||
$messageQuery->bindValue(':keyword', '%' . $keyword . '%', PDO::PARAM_STR);
|
$messageQuery->bindValue(':keyword', '%' . $keyword . '%', PDO::PARAM_STR);
|
||||||
|
$messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||||
|
$messageQuery->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT);
|
||||||
$messageQuery->execute();
|
$messageQuery->execute();
|
||||||
$message_array = $messageQuery->fetchAll();
|
$message_array = $messageQuery->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_keyword = str_replace('@', '', $keyword);
|
$user_keyword = str_replace('@', '', $keyword);
|
||||||
$usersQuery = $dbh->prepare("SELECT * FROM account WHERE username LIKE :keyword OR userid LIKE :keyword OR profile LIKE :keyword ORDER BY datetime DESC");
|
$usersQuery = $dbh->prepare("SELECT * FROM account WHERE username LIKE :keyword OR userid LIKE :keyword OR profile LIKE :keyword ORDER BY datetime DESC LIMIT :offset, :itemsPerPage");
|
||||||
|
$usersQuery->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||||
|
$usersQuery->bindValue(':itemsPerPage', $itemsPerPage, PDO::PARAM_INT);
|
||||||
$usersQuery->bindValue(':keyword', '%' . $user_keyword . '%', PDO::PARAM_STR);
|
$usersQuery->bindValue(':keyword', '%' . $user_keyword . '%', PDO::PARAM_STR);
|
||||||
$usersQuery->execute();
|
$usersQuery->execute();
|
||||||
$users_array = $usersQuery->fetchAll();
|
$users_array = $usersQuery->fetchAll();
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
|
|
||||||
$itemsPerPage = 15; // 1ページあたりの投稿数
|
$itemsPerPage = 15; // 1ページあたりの投稿数
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
|
|
||||||
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
|
|
||||||
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ if (isset($_GET['userid']) && isset($_GET['account_id'])) {
|
|||||||
|
|
||||||
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
$itemsPerPage = 15; // 1ページあたりのユーズ数
|
||||||
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
$pageNumber = safetext(isset($_GET['page'])) ? safetext(intval($_GET['page'])) : 1;
|
||||||
|
if($pageNumber <= 0 || (!(is_numeric($pageNumber)))){
|
||||||
|
$pageNumber = 1;
|
||||||
|
}
|
||||||
$offset = ($pageNumber - 1) * $itemsPerPage;
|
$offset = ($pageNumber - 1) * $itemsPerPage;
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|||||||
@@ -2,13 +2,7 @@
|
|||||||
require("../../function/function.php");
|
require("../../function/function.php");
|
||||||
$serversettings_file = "../../server/serversettings.ini";
|
$serversettings_file = "../../server/serversettings.ini";
|
||||||
$serversettings = parse_ini_file($serversettings_file, true);
|
$serversettings = parse_ini_file($serversettings_file, true);
|
||||||
function decode_yajirushi($postText){
|
|
||||||
$postText = str_replace('←', '←', $postText);
|
|
||||||
$postText = str_replace('↓', '↓', $postText);
|
|
||||||
$postText = str_replace('↑', '↑', $postText);
|
|
||||||
$postText = str_replace('→', '→', $postText);
|
|
||||||
return $postText;
|
|
||||||
}
|
|
||||||
if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
||||||
header("Content-Type: application/activity+json");
|
header("Content-Type: application/activity+json");
|
||||||
header("charset=utf-8");
|
header("charset=utf-8");
|
||||||
@@ -77,7 +71,7 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
|||||||
"software" => array(
|
"software" => array(
|
||||||
"name" => "uwuzu",
|
"name" => "uwuzu",
|
||||||
"version" => "".str_replace("\r", '', $uwuzuinfo[1])."",
|
"version" => "".str_replace("\r", '', $uwuzuinfo[1])."",
|
||||||
"homepage" => "https://www.uwuzu.com/",
|
"homepage" => "https://docs.uwuzu.xyz/",
|
||||||
"repository" => "https://github.com/Daichimarukana/uwuzu",
|
"repository" => "https://github.com/Daichimarukana/uwuzu",
|
||||||
),
|
),
|
||||||
"protocols" => [
|
"protocols" => [
|
||||||
|
|||||||
@@ -67,28 +67,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -123,28 +123,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
+8
-8
@@ -69,28 +69,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -125,28 +125,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -66,28 +66,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -122,28 +122,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -78,28 +78,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -134,28 +134,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -371,6 +371,7 @@ require('../logout/logout.php');
|
|||||||
- アイコン<br>
|
- アイコン<br>
|
||||||
- ヘッダー<br>
|
- ヘッダー<br>
|
||||||
- メールアドレス</p>
|
- メールアドレス</p>
|
||||||
|
<p>アカウントの移行後このサーバーのアカウントは自動凍結されます。</p>
|
||||||
<?php
|
<?php
|
||||||
if($migration == true){?>
|
if($migration == true){?>
|
||||||
<?php if($userData['role']==='ice'){ ?>
|
<?php if($userData['role']==='ice'){ ?>
|
||||||
|
|||||||
@@ -66,28 +66,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -122,28 +122,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
+9
-9
@@ -72,28 +72,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -128,28 +128,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -561,7 +561,7 @@ require('../logout/logout.php');
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<h1>API</h1>
|
<h1>API</h1>
|
||||||
<p>APIの使用方法はuwuzu.comよりAPIドキュメントをご確認ください。</p>
|
<p>APIの使用方法はdocs.uwuzu.xyzよりAPIドキュメントをご確認ください。</p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(empty($userData['token'])){
|
if(empty($userData['token'])){
|
||||||
|
|||||||
+8
-8
@@ -70,28 +70,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -126,28 +126,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -112,45 +112,50 @@ if(!($userid == null)){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( empty($error_message) ) {
|
if( empty($error_message) ) {
|
||||||
// トランザクション開始
|
$other_settings_me = is_OtherSettings($pdo, $userid);
|
||||||
$pdo->beginTransaction();
|
if($other_settings_me === true){
|
||||||
|
// トランザクション開始
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
|
||||||
|
$hashpassword = uwuzu_password_hash($password);
|
||||||
|
|
||||||
$hashpassword = uwuzu_password_hash($password);
|
try {
|
||||||
|
// SQL作成
|
||||||
try {
|
$stmt = $pdo->prepare("UPDATE account SET password = :password WHERE userid = :userid;");
|
||||||
// SQL作成
|
|
||||||
$stmt = $pdo->prepare("UPDATE account SET password = :password WHERE userid = :userid;");
|
// 他の値をセット
|
||||||
|
$stmt->bindParam(':password', $hashpassword, PDO::PARAM_STR);
|
||||||
// 他の値をセット
|
|
||||||
$stmt->bindParam(':password', $hashpassword, PDO::PARAM_STR);
|
// 条件を指定
|
||||||
|
// 以下の部分を適切な条件に置き換えてください
|
||||||
// 条件を指定
|
$stmt->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||||
// 以下の部分を適切な条件に置き換えてください
|
|
||||||
$stmt->bindValue(':userid', $userid, PDO::PARAM_STR);
|
// SQLクエリの実行
|
||||||
|
$res = $stmt->execute();
|
||||||
// SQLクエリの実行
|
|
||||||
$res = $stmt->execute();
|
// コミット
|
||||||
|
$res = $pdo->commit();
|
||||||
// コミット
|
|
||||||
$res = $pdo->commit();
|
} catch (Exception $e) {
|
||||||
|
|
||||||
} catch (Exception $e) {
|
// エラーが発生した時はロールバック
|
||||||
|
$pdo->rollBack();
|
||||||
// エラーが発生した時はロールバック
|
}
|
||||||
$pdo->rollBack();
|
|
||||||
}
|
if ($res) {
|
||||||
|
$msg = "お使いのアカウントのパスワードがパスワードの復元により変更されました。\n変更した覚えがない場合はパスワードを変更し、セッショントークンを再生成してください。";
|
||||||
if ($res) {
|
send_notification($userid,"uwuzu-fromsys","🔴アカウントのパスワードが復元により変更されました。🔴",$msg,"/others", "system");
|
||||||
$msg = "お使いのアカウントのパスワードがパスワードの復元により変更されました。\n変更した覚えがない場合はパスワードを変更し、セッショントークンを再生成してください。";
|
|
||||||
send_notification($userid,"uwuzu-fromsys","🔴アカウントのパスワードが復元により変更されました。🔴",$msg,"/others", "system");
|
$_SESSION['userid'] = "";
|
||||||
|
$url = 'donerecovery.php';
|
||||||
$_SESSION['userid'] = "";
|
header('Location: ' . $url, true, 303);
|
||||||
$url = 'donerecovery.php';
|
|
||||||
header('Location: ' . $url, true, 303);
|
// すべての出力を終了
|
||||||
|
exit;
|
||||||
// すべての出力を終了
|
} else {
|
||||||
exit;
|
$error_message[] = 'パスワードの更新に失敗しました。(REGISTERED_DAME)';
|
||||||
} else {
|
}
|
||||||
|
}else{
|
||||||
$error_message[] = 'パスワードの更新に失敗しました。(REGISTERED_DAME)';
|
$error_message[] = 'パスワードの更新に失敗しました。(REGISTERED_DAME)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<p>JavaScriptを無効にしている状態での使用はできません。</p>
|
<p>JavaScriptを無効にしている状態での使用はできません。</p>
|
||||||
<p>詳細は下記のリンクよりご確認ください。</p>
|
<p>詳細は下記のリンクよりご確認ください。</p>
|
||||||
|
|
||||||
<a href="https://uwuzu.com/docs/uwuzusupport" class="infobtn">詳細</a>
|
<a href="https://docs.uwuzu.xyz/docs/uwuzusupport" class="infobtn">詳細</a>
|
||||||
<div class="p2">JS_BLOCKED_ERROR</div>
|
<div class="p2">JS_BLOCKED_ERROR</div>
|
||||||
|
|
||||||
<div class="center_text">
|
<div class="center_text">
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
そして、タイムライン上部のメニューから「フォロー」というタイムラインも見ることが可能です。<br>
|
そして、タイムライン上部のメニューから「フォロー」というタイムラインも見ることが可能です。<br>
|
||||||
それぞれの機能はこんな感じ!<br>
|
それぞれの機能はこんな感じ!<br>
|
||||||
<br>
|
<br>
|
||||||
|
- おすすめ … おすすめタイムラインの略称で、人気のユーズや自分が多くいいねしているユーザーのユーズなどが表示されます!<br>
|
||||||
- ローカル … ローカルタイムラインの略称で、同じサーバーにいる全員のユーズが表示されます。(uwuzu v1.3.5以前はLTL)<br>
|
- ローカル … ローカルタイムラインの略称で、同じサーバーにいる全員のユーズが表示されます。(uwuzu v1.3.5以前はLTL)<br>
|
||||||
- フォロー … フォロータイムラインの略称で、自分のフォローしているユーザーのユーズが表示されます。(uwuzu v1.3.5以前はFTL)<br>
|
- フォロー … フォロータイムラインの略称で、自分のフォローしているユーザーのユーズが表示されます。(uwuzu v1.3.5以前はFTL)<br>
|
||||||
</p>
|
</p>
|
||||||
@@ -114,7 +115,7 @@
|
|||||||
<div class="page" id="page8" style="display:none;">
|
<div class="page" id="page8" style="display:none;">
|
||||||
<h1>お疲れ様でした!</h1>
|
<h1>お疲れ様でした!</h1>
|
||||||
<p style="text-align: center;">チュートリアルは終了です!<br>
|
<p style="text-align: center;">チュートリアルは終了です!<br>
|
||||||
まだ、このチュートリアルで紹介できていないuwuzuの機能や使い方も多くあるので、もっとuwuzuについて知りたい方はぜひuwuzu.comをご覧ください。</p>
|
まだ、このチュートリアルで紹介できていないuwuzuの機能や使い方も多くあるので、もっとuwuzuについて知りたい方はぜひdocs.uwuzu.xyzをご覧ください。</p>
|
||||||
<div class="btm_area">
|
<div class="btm_area">
|
||||||
<div class="iro_btn backcolor" id="back">戻る</div>
|
<div class="iro_btn backcolor" id="back">戻る</div>
|
||||||
<div class="iro_btn" id="end">閉じる</div>
|
<div class="iro_btn" id="end">閉じる</div>
|
||||||
|
|||||||
+34
-14
@@ -68,28 +68,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -124,28 +124,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -339,45 +339,49 @@ $pdo = null;
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var userid = '<?php echo $userid; ?>';
|
var userid = '<?php echo $userid; ?>';
|
||||||
var account_id = '<?php echo $loginid; ?>';
|
var account_id = '<?php echo $loginid; ?>';
|
||||||
|
var pageNumber = 1;
|
||||||
|
|
||||||
if(ueusetext.value){
|
if(ueusetext.value){
|
||||||
|
$('#postContainer').empty();
|
||||||
|
pageNumber = 1;
|
||||||
loadPosts();
|
loadPosts();
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '.search_btn', function(event) {
|
$(document).on('click', '.search_btn', function(event) {
|
||||||
|
$('#postContainer').empty();
|
||||||
|
pageNumber = 1;
|
||||||
loadPosts();
|
loadPosts();
|
||||||
});
|
});
|
||||||
|
|
||||||
window.document.onkeydown = function(event){
|
window.document.onkeydown = function(event){
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
|
$('#postContainer').empty();
|
||||||
|
pageNumber = 1;
|
||||||
loadPosts();
|
loadPosts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var isLoading = false;
|
var isLoading = false;
|
||||||
|
|
||||||
function loadPosts() {
|
function loadPosts() {
|
||||||
if (isLoading) return;
|
if (isLoading) return;
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
$("#loading").show();
|
$("#loading").show();
|
||||||
|
|
||||||
var ueusetext = document.getElementById('ueusetext');
|
var ueusetext = document.getElementById('ueusetext');
|
||||||
var keyword = ueusetext.value;
|
var keyword = ueusetext.value;
|
||||||
|
|
||||||
// 前回の検索結果をクリア
|
|
||||||
$('#postContainer').empty();
|
|
||||||
|
|
||||||
// 新しいキーワードで検索を実行
|
// 新しいキーワードで検索を実行
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '../nextpage/searchpage.php', // PHPファイルへのパス
|
url: '../nextpage/searchpage.php', // PHPファイルへのパス
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: { keyword: keyword, userid: userid , account_id: account_id},
|
data: {page: pageNumber, keyword: keyword, userid: userid , account_id: account_id},
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
timeout: 300000,
|
timeout: 300000,
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
$('#postContainer').append(response);
|
$('#postContainer').append(response);
|
||||||
$("#loading").hide();
|
$("#loading").hide();
|
||||||
|
pageNumber++;
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
},
|
},
|
||||||
error: function (xhr, textStatus, errorThrown) { // エラーと判定された場合
|
error: function (xhr, textStatus, errorThrown) { // エラーと判定された場合
|
||||||
@@ -388,6 +392,22 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('.outer').on('scroll', function() {
|
||||||
|
var innerHeight = $('.inner').innerHeight(), //内側の要素の高さ
|
||||||
|
outerHeight = $('.outer').innerHeight(), //外側の要素の高さ
|
||||||
|
outerBottom = innerHeight - outerHeight; //内側の要素の高さ - 外側の要素の高さ
|
||||||
|
if (outerBottom <= $('.outer').scrollTop()) {
|
||||||
|
var elem = document.getElementById("noueuse");
|
||||||
|
|
||||||
|
if (elem === null){
|
||||||
|
// 存在しない場合の処理
|
||||||
|
loadPosts();
|
||||||
|
} else {
|
||||||
|
// 存在する場合の処理
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$(document).on('click', '.favbtn, .favbtn_after', function(event) {
|
$(document).on('click', '.favbtn, .favbtn_after', function(event) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uwuzu
|
uwuzu
|
||||||
1.4.8
|
1.4.9
|
||||||
2024/11/14
|
2024/12/27
|
||||||
daichimarukana,putonfps
|
daichimarukana,putonfps
|
||||||
@@ -1,6 +1,40 @@
|
|||||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||||
|
|
||||||
|
## Version 1.4.9 (Funium)
|
||||||
|
2024/12/27
|
||||||
|
fix: 通報時に管理者に通知が来ない可能性がある問題を修正しました。
|
||||||
|
fix: ユーズ取得が正常にできない可能性のある問題を修正しました!
|
||||||
|
fix: 特定の場合においてフォロー・アンフォロー・ブロック・ブロック解除ができない問題を修正しました。
|
||||||
|
chg: 検索時に動作が重たくならないよう改良しました!
|
||||||
|
chg: 一部UIを変更しました!
|
||||||
|
chg: ホームを開いた際に最後に使用したタイムラインを開くようにしました!
|
||||||
|
chg: 自動ログインの持続期間を2週間から4週間に伸ばしました!
|
||||||
|
chg: アップロードされた画像などに付与されるIDをよりユニークなものにしました!
|
||||||
|
new: おすすめタイムラインを実装しました!
|
||||||
|
new: いいねができるAPIを追加しました!(詳細はdocs.uwuzu.xyzをご覧ください)
|
||||||
|
new: ログ機能を追加しました!
|
||||||
|
現状ユーズなどSQL操作関数に発生するエラーなどをログとして残します。
|
||||||
|
ログは次の5段階で評価されます。
|
||||||
|
- INFO: システム的に問題なく、通常使用で発生しうるエラーやログなど
|
||||||
|
- NOTICE: ちょっぴり重要なエラーなど
|
||||||
|
- WARNING: 通常起こり得ないはずだけど動作に大きな支障をきたすエラーなど
|
||||||
|
- ERROR: uwuzu側の問題により指定された動作が行われなかったなど、深刻なエラー
|
||||||
|
- CRITICAL: データベースエラーなど解決の見込みのないエラーなど
|
||||||
|
この機能はまだ動作が保証できないため試験的なものとなります。
|
||||||
|
なお、この機能を使用するにはデータベースの更新が必要となります。
|
||||||
|
データベースに新規でactionlogというテーブルを追加してください。
|
||||||
|
- sysid(int):AUTO_INCREMENT:システムID
|
||||||
|
- uniqid(varchar(256)):指定なし:ユニークID
|
||||||
|
- userid(varchar(512)):指定なし:実行ユーザーID
|
||||||
|
- type(varchar(512)):指定なし:errorやinfoなどの種別
|
||||||
|
- place(varchar(512)):指定なし:発生場所
|
||||||
|
- target(varchar(512)):指定なし:実行ターゲット
|
||||||
|
- content(mediumtext):指定なし:ログ本文
|
||||||
|
- importance(int):指定なし:重要度
|
||||||
|
- datetime(datetime):指定なし:記録日時
|
||||||
|
uwuzu_database.sqlは更新済みです。
|
||||||
|
|
||||||
## Version 1.4.8 (Funium)
|
## Version 1.4.8 (Funium)
|
||||||
2024/11/14
|
2024/11/14
|
||||||
fix: アップデート時にフォルダの階層が更新されない問題を修正しました!!
|
fix: アップデート時にフォルダの階層が更新されない問題を修正しました!!
|
||||||
|
|||||||
@@ -77,28 +77,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -133,28 +133,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
+12
-12
@@ -75,28 +75,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -131,28 +131,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -491,10 +491,10 @@ if( !empty($_POST['img1btn_submit']) ) {
|
|||||||
|
|
||||||
if(check_mime($uploadedFile['tmp_name']) == "image/webp"){
|
if(check_mime($uploadedFile['tmp_name']) == "image/webp"){
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.webp';
|
$newFilename = createUniqId() . '-'.$userid.'.webp';
|
||||||
}else{
|
}else{
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.' . $extension;
|
$newFilename = createUniqId() . '-'.$userid.'.' . $extension;
|
||||||
}
|
}
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'userheads/' . $newFilename;
|
$uploadedPath = 'userheads/' . $newFilename;
|
||||||
@@ -582,10 +582,10 @@ if( !empty($_POST['img2btn_submit']) ) {
|
|||||||
|
|
||||||
if(check_mime($uploadedFile['tmp_name']) == "image/webp"){
|
if(check_mime($uploadedFile['tmp_name']) == "image/webp"){
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.webp';
|
$newFilename = createUniqId() . '-'.$userid.'.webp';
|
||||||
}else{
|
}else{
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '-'.$userid.'.' . $extension;
|
$newFilename = createUniqId() . '-'.$userid.'.' . $extension;
|
||||||
}
|
}
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'usericons/' . $newFilename;
|
$uploadedPath = 'usericons/' . $newFilename;
|
||||||
|
|||||||
@@ -71,28 +71,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -127,28 +127,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -0,0 +1,347 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$serversettings_file = "../server/serversettings.ini";
|
||||||
|
$serversettings = parse_ini_file($serversettings_file, true);
|
||||||
|
|
||||||
|
function random_code($length = 8){
|
||||||
|
return substr(str_shuffle('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, $length);
|
||||||
|
}
|
||||||
|
|
||||||
|
require('../db.php');
|
||||||
|
require("../function/function.php");
|
||||||
|
|
||||||
|
|
||||||
|
// 変数の初期化
|
||||||
|
$datetime = array();
|
||||||
|
$user_name = null;
|
||||||
|
$message = array();
|
||||||
|
$message_data = null;
|
||||||
|
$error_message = array();
|
||||||
|
$pdo = null;
|
||||||
|
$stmt = null;
|
||||||
|
$res = null;
|
||||||
|
$option = null;
|
||||||
|
|
||||||
|
session_name('uwuzu_s_id');
|
||||||
|
session_set_cookie_params([
|
||||||
|
'lifetime' => 0,
|
||||||
|
'path' => '/',
|
||||||
|
'domain' => '',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
'samesite' => 'Lax'
|
||||||
|
]);
|
||||||
|
session_start();
|
||||||
|
session_regenerate_id(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) {
|
||||||
|
|
||||||
|
// 接続エラーのときエラー内容を取得する
|
||||||
|
$error_message[] = $e->getMessage();
|
||||||
|
}
|
||||||
|
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
||||||
|
|
||||||
|
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||||
|
$passQuery->bindValue(':userid', safetext($_SESSION['userid']));
|
||||||
|
$passQuery->execute();
|
||||||
|
$res = $passQuery->fetch();
|
||||||
|
if(empty($res["userid"])){
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] == $res["userid"]){
|
||||||
|
// セッションに値をセット
|
||||||
|
$userid = safetext($res['userid']); // セッションに格納されている値をそのままセット
|
||||||
|
$username = safetext($res['username']); // セッションに格納されている値をそのままセット
|
||||||
|
$loginid = safetext($res["loginid"]);
|
||||||
|
$role = safetext($res["role"]);
|
||||||
|
$sacinfo = safetext($res["sacinfo"]);
|
||||||
|
$myblocklist = safetext($res["blocklist"]);
|
||||||
|
$myfollowlist = safetext($res["follow"]);
|
||||||
|
$_SESSION['admin_login'] = true;
|
||||||
|
$_SESSION['userid'] = $userid;
|
||||||
|
$_SESSION['username'] = $username;
|
||||||
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
|
setcookie('userid', $userid, [
|
||||||
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
|
'path' => '/',
|
||||||
|
'samesite' => 'lax',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
]);
|
||||||
|
setcookie('username', $username,[
|
||||||
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
|
'path' => '/',
|
||||||
|
'samesite' => 'lax',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
]);
|
||||||
|
setcookie('loginid', $res["loginid"],[
|
||||||
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
|
'path' => '/',
|
||||||
|
'samesite' => 'lax',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
]);
|
||||||
|
setcookie('admin_login', true,[
|
||||||
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
|
'path' => '/',
|
||||||
|
'samesite' => 'lax',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
]);
|
||||||
|
}else{
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||||
|
|
||||||
|
$passQuery = $pdo->prepare("SELECT username,userid,loginid,follow,admin,role,sacinfo,blocklist FROM account WHERE userid = :userid");
|
||||||
|
$passQuery->bindValue(':userid', safetext($_COOKIE['userid']));
|
||||||
|
$passQuery->execute();
|
||||||
|
$res = $passQuery->fetch();
|
||||||
|
if(empty($res["userid"])){
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] == $res["userid"]){
|
||||||
|
// セッションに値をセット
|
||||||
|
$userid = safetext($res['userid']); // クッキーから取得した値をセット
|
||||||
|
$username = safetext($res['username']); // クッキーから取得した値をセット
|
||||||
|
$loginid = safetext($res["loginid"]);
|
||||||
|
$role = safetext($res["role"]);
|
||||||
|
$sacinfo = safetext($res["sacinfo"]);
|
||||||
|
$myblocklist = safetext($res["blocklist"]);
|
||||||
|
$myfollowlist = safetext($res["follow"]);
|
||||||
|
$_SESSION['admin_login'] = true;
|
||||||
|
$_SESSION['userid'] = $userid;
|
||||||
|
$_SESSION['username'] = $username;
|
||||||
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
|
setcookie('userid', $userid,[
|
||||||
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
|
'path' => '/',
|
||||||
|
'samesite' => 'lax',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
]);
|
||||||
|
setcookie('username', $username,[
|
||||||
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
|
'path' => '/',
|
||||||
|
'samesite' => 'lax',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
]);
|
||||||
|
setcookie('loginid', $res["loginid"],[
|
||||||
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
|
'path' => '/',
|
||||||
|
'samesite' => 'lax',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
]);
|
||||||
|
setcookie('admin_login', true,[
|
||||||
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
|
'path' => '/',
|
||||||
|
'samesite' => 'lax',
|
||||||
|
'secure' => true,
|
||||||
|
'httponly' => true,
|
||||||
|
]);
|
||||||
|
}else{
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// ログインが許可されていない場合、ログインページにリダイレクト
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if(empty($userid)){
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if(empty($username)){
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!($res["admin"] === "yes")){
|
||||||
|
header("Location: ../login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'");
|
||||||
|
$notiQuery->bindValue(':userid', $userid);
|
||||||
|
$notiQuery->execute();
|
||||||
|
$notiData = $notiQuery->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
$notificationcount = $notiData['notification_count'];
|
||||||
|
|
||||||
|
require('../logout/logout.php');
|
||||||
|
|
||||||
|
if (!empty($pdo)) {
|
||||||
|
$sql = "SELECT * FROM actionlog ORDER BY datetime DESC LIMIT 100";
|
||||||
|
$allactionlog = $pdo->query($sql);
|
||||||
|
|
||||||
|
while ($row = $allactionlog->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$logs[] = $row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ja">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<link rel="stylesheet" href="../css/home.css">
|
||||||
|
<script src="../js/jquery-min.js"></script>
|
||||||
|
<script src="../js/unsupported.js"></script>
|
||||||
|
<script src="../js/console_notice.js"></script>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||||
|
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
|
||||||
|
<title>ログ - <?php echo safetext($serversettings["serverinfo"]["server_name"]);?></title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<?php require('../require/leftbox.php');?>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<?php if( !empty($error_message) ): ?>
|
||||||
|
<ul class="errmsg">
|
||||||
|
<?php foreach( $error_message as $value ): ?>
|
||||||
|
<p>・ <?php echo $value; ?></p>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="admin_settings">
|
||||||
|
<?php require('settings_left_menu.php');?>
|
||||||
|
|
||||||
|
<div class="admin_right">
|
||||||
|
<div class="formarea">
|
||||||
|
<h1>ログ</h1>
|
||||||
|
<p>直近100件のログを表示します。</p>
|
||||||
|
<div class="p2">この機能はベータ版機能であり、今後変更や削除が行われるおそれがあります。</div>
|
||||||
|
<?php if(!(empty($logs))){?>
|
||||||
|
<?php foreach ($logs as $value) {
|
||||||
|
switch ($value["importance"]){
|
||||||
|
case 0:
|
||||||
|
$importance = "INFO";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$importance = "NOTICE";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$importance = "WARNING";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$importance = "ERROR";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$importance = "CRITICAL";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$importance = "INFO";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="actionlog">
|
||||||
|
<details>
|
||||||
|
<summary><span class="<?php echo safetext($importance);?>"><?php echo safetext($importance);?></span><?php echo safetext($value["type"]);?> | <?php echo safetext($value["place"]);?></summary>
|
||||||
|
<p>種別: <?php echo safetext($value["type"]);?></p>
|
||||||
|
<p>発生場所: <?php echo safetext($value["place"]);?></p>
|
||||||
|
<p>発生日時: <?php echo safetext($value["datetime"]);?></p>
|
||||||
|
<p>実行ユーザー: <?php echo safetext($value["userid"]);?></p>
|
||||||
|
<p>ターゲット: <?php echo safetext($value["target"]);?></p>
|
||||||
|
<hr>
|
||||||
|
<p>内容</p>
|
||||||
|
<p><?php echo safetext($value["content"]);?></p>
|
||||||
|
<hr>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
<?php }?>
|
||||||
|
<?php }else{?>
|
||||||
|
<p>ログはありません</p>
|
||||||
|
<?php }?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<?php require('../require/rightbox.php');?>
|
||||||
|
<?php require('../require/botbox.php');?>
|
||||||
|
<?php require('../require/noscript_modal.php');?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function checkForm(inputElement) {
|
||||||
|
var str = inputElement.value;
|
||||||
|
while (str.match(/[^A-Za-z\d_]/)) {
|
||||||
|
str = str.replace(/[^A-Za-z\d_]/, "");
|
||||||
|
}
|
||||||
|
inputElement.value = str;
|
||||||
|
}
|
||||||
|
|
||||||
|
var modal = document.getElementById('account_addrole_Modal');
|
||||||
|
var deleteButton = document.getElementById('deleteButton');
|
||||||
|
var cancelButton = document.getElementById('cancelButton'); // 追加
|
||||||
|
var modalMain = $('.modal-content');
|
||||||
|
|
||||||
|
document.getElementById("addrole").addEventListener('click', function(){
|
||||||
|
modal.style.display = 'block';
|
||||||
|
modalMain.addClass("slideUp");
|
||||||
|
modalMain.removeClass("slideDown");
|
||||||
|
|
||||||
|
deleteButton.addEventListener('click', () => {
|
||||||
|
modalMain.removeClass("slideUp");
|
||||||
|
modalMain.addClass("slideDown");
|
||||||
|
window.setTimeout(function(){
|
||||||
|
modal.style.display = 'none';
|
||||||
|
}, 150);
|
||||||
|
});
|
||||||
|
|
||||||
|
cancelButton.addEventListener('click', () => { // 追加
|
||||||
|
modalMain.removeClass("slideUp");
|
||||||
|
modalMain.addClass("slideDown");
|
||||||
|
window.setTimeout(function(){
|
||||||
|
modal.style.display = 'none';
|
||||||
|
}, 150);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var modal2 = document.getElementById('account_delrole_Modal');
|
||||||
|
var delrole_deleteButton = document.getElementById('delrole_deleteButton');
|
||||||
|
var delrole_cancelButton = document.getElementById('delrole_cancelButton'); // 追加
|
||||||
|
var modalMain = $('.modal-content');
|
||||||
|
|
||||||
|
document.getElementById("delrole").addEventListener('click', function(){
|
||||||
|
modal2.style.display = 'block';
|
||||||
|
modalMain.addClass("slideUp");
|
||||||
|
modalMain.removeClass("slideDown");
|
||||||
|
|
||||||
|
delrole_deleteButton.addEventListener('click', () => {
|
||||||
|
modalMain.removeClass("slideUp");
|
||||||
|
modalMain.addClass("slideDown");
|
||||||
|
window.setTimeout(function(){
|
||||||
|
modal2.style.display = 'none';
|
||||||
|
}, 150);
|
||||||
|
});
|
||||||
|
|
||||||
|
delrole_cancelButton.addEventListener('click', () => { // 追加
|
||||||
|
modalMain.removeClass("slideUp");
|
||||||
|
modalMain.addClass("slideDown");
|
||||||
|
window.setTimeout(function(){
|
||||||
|
modal2.style.display = 'none';
|
||||||
|
}, 150);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
@@ -70,28 +70,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -126,28 +126,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -68,28 +68,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -124,28 +124,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -212,7 +212,7 @@ if( !empty($_POST['btn_submit']) ) {
|
|||||||
$extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION);
|
$extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION);
|
||||||
|
|
||||||
// 新しいファイル名を生成(uniqid + 拡張子)
|
// 新しいファイル名を生成(uniqid + 拡張子)
|
||||||
$newFilename = uniqid() . '.' . $extension;
|
$newFilename = createUniqId() . '.' . $extension;
|
||||||
|
|
||||||
// 保存先のパスを生成
|
// 保存先のパスを生成
|
||||||
$uploadedPath = 'emojiimage/' . $newFilename;
|
$uploadedPath = 'emojiimage/' . $newFilename;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ if (isset($_FILES['update_zip']) && isset($_POST['userid']) && isset($_POST['acc
|
|||||||
$uploadFile = $uploadDir . '/' . basename($_FILES['update_zip']['name']);
|
$uploadFile = $uploadDir . '/' . basename($_FILES['update_zip']['name']);
|
||||||
|
|
||||||
if (move_uploaded_file($_FILES['update_zip']['tmp_name'], $uploadFile)) {
|
if (move_uploaded_file($_FILES['update_zip']['tmp_name'], $uploadFile)) {
|
||||||
$extractPath = $uploadDir . '/uwuzu_update_' . uniqid();
|
$extractPath = $uploadDir . '/uwuzu_update_' . createUniqId();
|
||||||
|
|
||||||
$zip = new ZipArchive;
|
$zip = new ZipArchive;
|
||||||
if ($zip->open($uploadFile) == true) {
|
if ($zip->open($uploadFile) == true) {
|
||||||
|
|||||||
@@ -72,28 +72,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -128,28 +128,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -83,28 +83,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -139,28 +139,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -82,28 +82,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -138,28 +138,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -83,28 +83,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -139,28 +139,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -83,28 +83,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -139,28 +139,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -89,28 +89,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -145,28 +145,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
<?php // メールサーバーの情報
|
<?php // メールサーバーの情報
|
||||||
define( 'MAIL_CHKS', '');// trueならPHPMailerが有効
|
define( 'MAIL_CHKS', 'true');// trueならPHPMailerが有効
|
||||||
|
|
||||||
define( 'MAIL_ADDS', '');
|
define( 'MAIL_ADDS', 'localhoster@uwuzu.net');
|
||||||
define( 'MAIL_HOST', '');
|
define( 'MAIL_HOST', 'smtp.gmail.com');
|
||||||
define( 'MAIL_PORT', '');
|
define( 'MAIL_PORT', '587');
|
||||||
define( 'MAIL_USER', '');
|
define( 'MAIL_USER', 'mjiusong25@gmail.com');
|
||||||
define( 'MAIL_PASS', '');
|
define( 'MAIL_PASS', 'dnjspbevwckrpzex');
|
||||||
define( 'MAIL_SSL_', '');
|
define( 'MAIL_SSL_', 'TLS');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -70,28 +70,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -126,28 +126,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -82,28 +82,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -138,28 +138,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -12,5 +12,6 @@
|
|||||||
<a href="maintenance_admin" class="admin_leftbtn">メンテナンス</a>
|
<a href="maintenance_admin" class="admin_leftbtn">メンテナンス</a>
|
||||||
<a href="plugin_admin" class="admin_leftbtn">プラグイン</a>
|
<a href="plugin_admin" class="admin_leftbtn">プラグイン</a>
|
||||||
<a href="update_admin" class="admin_leftbtn">アップデート</a>
|
<a href="update_admin" class="admin_leftbtn">アップデート</a>
|
||||||
|
<a href="actionlog_admin" class="admin_leftbtn">ログ</a>
|
||||||
</div>
|
</div>
|
||||||
<?php ?>
|
<?php ?>
|
||||||
@@ -66,28 +66,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -122,28 +122,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -70,28 +70,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -126,28 +126,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
@@ -70,28 +70,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -126,28 +126,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -263,6 +263,7 @@ if( !empty($_POST['send_ice_submit']) ) {
|
|||||||
|
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "send_ice_submit", $touserid, $e, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
//凍結通知メール
|
//凍結通知メール
|
||||||
@@ -315,13 +316,16 @@ if( !empty($_POST['send_ice_submit']) ) {
|
|||||||
|
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "send_ice_submit", $touserid, $e, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
actionLog($userid, "info", "send_ice_submit", $touserid, $touserid."さんを".$userid."さんが凍結しました", 0);
|
||||||
header("Location:useradmin");
|
header("Location:useradmin");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
$error_message[] = '凍結に失敗しました。(USER_ICE_DAME)';
|
$error_message[] = '凍結に失敗しました。(USER_ICE_DAME)';
|
||||||
|
actionLog($userid, "error", "send_ice_submit", $touserid, $error_message, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( !empty($_POST['send_water_submit']) ) {
|
if( !empty($_POST['send_water_submit']) ) {
|
||||||
@@ -354,6 +358,7 @@ if( !empty($_POST['send_water_submit']) ) {
|
|||||||
$error_message[] = "えらー(ERROR)";
|
$error_message[] = "えらー(ERROR)";
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "send_water_submit", $touserid, $e, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
//凍結通知メール
|
//凍結通知メール
|
||||||
@@ -406,13 +411,16 @@ if( !empty($_POST['send_water_submit']) ) {
|
|||||||
$error_message[] = "えらー(ERROR)";
|
$error_message[] = "えらー(ERROR)";
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "send_water_submit", $touserid, $e, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
actionLog($userid, "info", "send_water_submit", $touserid, $touserid."さんを".$userid."さんが解凍しました", 0);
|
||||||
header("Location:useradmin");
|
header("Location:useradmin");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
$error_message[] = '解凍に失敗しました。(USER_WATER_DAME)';
|
$error_message[] = '解凍に失敗しました。(USER_WATER_DAME)';
|
||||||
|
actionLog($userid, "error", "send_water_submit", $touserid, $error_message, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -568,13 +576,16 @@ if( !empty($_POST['send_ban_submit']) ) {
|
|||||||
|
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
actionLog($userid, "error", "send_ban_submit", $userId2, $e, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
actionLog($userid, "info", "send_ban_submit", $userId2, $userid."さんが".$userId2."さんをBANしました", 4);
|
||||||
header("Location:useradmin");
|
header("Location:useradmin");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
$error_message[] = 'アカウント削除に失敗しました。(ACCOUNT_DELETE_DAME)';
|
$error_message[] = 'アカウント削除に失敗しました。(ACCOUNT_DELETE_DAME)';
|
||||||
|
actionLog($userid, "error", "send_ban_submit", $userId2, $error_message, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -81,28 +81,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -137,28 +137,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ if($errcode == "UNSUPPORTED_BROWSER"){
|
|||||||
<br>詳細は下記のリンクよりご確認ください。</p>
|
<br>詳細は下記のリンクよりご確認ください。</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="https://uwuzu.com/docs/uwuzusupport" class="infobtn">詳細</a>
|
<a href="https://docs.uwuzu.xyz/docs/uwuzusupport" class="infobtn">詳細</a>
|
||||||
|
|
||||||
<div class="maintext">
|
<div class="maintext">
|
||||||
<h3>エラー内容</h3>
|
<h3>エラー内容</h3>
|
||||||
|
|||||||
+80
-6
@@ -1,14 +1,88 @@
|
|||||||
{
|
{
|
||||||
"software": "uwuzu",
|
"software": "uwuzu",
|
||||||
"version": "1.4.8",
|
"version": "1.4.9",
|
||||||
"release_date": "2024-11-14",
|
"release_date": "2024/12/27",
|
||||||
"release_notes": "このアップデートでは設定画面で発生する重大なバグが修正されています。\n早急なアップデートを推奨します。",
|
"release_notes": "このアップデートではおすすめタイムラインの追加やフォローできない問題の修正などが含まれます!",
|
||||||
"notices": "アップデートの前にデータのバックアップを行うことをおすすめします!",
|
"notices": "アップデートの前にSQLの構造の更新を行ってください!\nデータのバックアップを行うことをおすすめします!",
|
||||||
"files": {
|
"files": {
|
||||||
"overwrite": [
|
"overwrite": [
|
||||||
"/settings/index.php",
|
"/actor/index.php",
|
||||||
"/settings_admin/update_admin.php",
|
"/admin/addadmin.php",
|
||||||
|
"/admin/index.php",
|
||||||
|
"/api/favorite/change.php",
|
||||||
|
"/api/favorite/get.php",
|
||||||
|
"/api/me/index.php",
|
||||||
|
"/api/ueuse/create.php",
|
||||||
|
"/api/ueuse/delete.php",
|
||||||
|
"/api/ueuse/get.php",
|
||||||
|
"/api/ueuse/index.php",
|
||||||
|
"/api/ueuse/mentions.php",
|
||||||
|
"/api/ueuse/replies.php",
|
||||||
|
"/api/ueuse/search.php",
|
||||||
|
"/api/users/follow.php",
|
||||||
|
"/api/users/index.php",
|
||||||
|
"/api/users/unfollow.php",
|
||||||
|
"/api/v1/instance.php",
|
||||||
|
"/api/migration-api.php",
|
||||||
|
"/bookmark/index.php",
|
||||||
|
"/css/home.css",
|
||||||
|
"/emoji/index.php",
|
||||||
|
"/favorite/favorite.php",
|
||||||
"/function/function.php",
|
"/function/function.php",
|
||||||
|
"/home/index.php",
|
||||||
|
"/js/console_notice.js",
|
||||||
|
"/migration/index.php",
|
||||||
|
"/nextpage/bookmark.php",
|
||||||
|
"/nextpage/emojiview.php",
|
||||||
|
"/nextpage/foryoupage.php",
|
||||||
|
"/nextpage/ftlpage.php",
|
||||||
|
"/nextpage/nextpage.php",
|
||||||
|
"/nextpage/notification.php",
|
||||||
|
"/nextpage/searchpage.php",
|
||||||
|
"/nextpage/ueusepage.php",
|
||||||
|
"/nextpage/userlikepage.php",
|
||||||
|
"/nextpage/usermediapage.php",
|
||||||
|
"/nextpage/userpage.php",
|
||||||
|
"/nodeinfo/2.1/index.php",
|
||||||
|
"/notice/addnotice.php",
|
||||||
|
"/notice/index.php",
|
||||||
|
"/notification/index.php",
|
||||||
|
"/others/account_migration.php",
|
||||||
|
"/others/account_migration_done.php",
|
||||||
|
"/others/index.php",
|
||||||
|
"/others/token.php",
|
||||||
|
"/passrecovery/startrecovery.php",
|
||||||
|
"/require/noscript_modal.php",
|
||||||
|
"/require/tutorial.php",
|
||||||
|
"/search/index.php",
|
||||||
|
"/settings/addauthcode.php",
|
||||||
|
"/settings/index.php",
|
||||||
|
"/settings/success.php",
|
||||||
|
"/settings_admin/api/update_query.php",
|
||||||
|
"/settings_admin/actionlog_admin.php",
|
||||||
|
"/settings_admin/ad_admin.php",
|
||||||
|
"/settings_admin/addemoji_admin.php",
|
||||||
|
"/settings_admin/codeadmin.php",
|
||||||
|
"/settings_admin/customize_admin.php",
|
||||||
|
"/settings_admin/maintenance_admin.php",
|
||||||
|
"/settings_admin/moderation_admin.php",
|
||||||
|
"/settings_admin/overview_admin.php",
|
||||||
|
"/settings_admin/plugin_admin.php",
|
||||||
|
"/settings_admin/role_admin.php",
|
||||||
|
"/settings_admin/serveradmin.php",
|
||||||
|
"/settings_admin/settings_left_menu.php",
|
||||||
|
"/settings_admin/update_admin.php",
|
||||||
|
"/settings_admin/useradmin.php",
|
||||||
|
"/settings_admin/userinfo.php",
|
||||||
|
"/ueuse/index.php",
|
||||||
|
"/user/index.php",
|
||||||
|
"/user/report.php",
|
||||||
|
"/user/success.php",
|
||||||
|
"/authlogin.php",
|
||||||
|
"/check.php",
|
||||||
|
"/new.php",
|
||||||
|
"/unsupported.php",
|
||||||
|
"/uwuzu_error_code.txt",
|
||||||
"/server/uwuzuabout.txt",
|
"/server/uwuzuabout.txt",
|
||||||
"/server/uwuzuinfo.txt",
|
"/server/uwuzuinfo.txt",
|
||||||
"/server/uwuzurelease.txt"
|
"/server/uwuzurelease.txt"
|
||||||
|
|||||||
+37
-173
@@ -70,28 +70,28 @@ if (isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username, [
|
setcookie('username', $username, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"], [
|
setcookie('loginid', $res["loginid"], [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true, [
|
setcookie('admin_login', true, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -124,28 +124,28 @@ if (isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username, [
|
setcookie('username', $username, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"], [
|
setcookie('loginid', $res["loginid"], [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true, [
|
setcookie('admin_login', true, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -205,7 +205,7 @@ if (!empty($pdo)) {
|
|||||||
// SQL実行
|
// SQL実行
|
||||||
$rerole->execute();
|
$rerole->execute();
|
||||||
|
|
||||||
$userdata = $rerole->fetch(); // ここでデータベースから取得した値を $role に代入する
|
$userdata = $rerole->fetch();
|
||||||
|
|
||||||
$roleDataArray = array();
|
$roleDataArray = array();
|
||||||
|
|
||||||
@@ -300,183 +300,43 @@ if (!empty($pdo)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['follow'])) {
|
if (!empty($_POST['follow'])) {
|
||||||
// トランザクションを開始
|
$res_follow = follow_user($pdo, $userData['userid'], $userid);
|
||||||
$pdo->beginTransaction();
|
if($res_follow === false){
|
||||||
try {
|
|
||||||
// フォローボタンが押された場合の処理
|
|
||||||
$followerList = explode(',', $userdata['follower']);
|
|
||||||
if (!(in_array($userid, $followerList))) {
|
|
||||||
// 自分が相手をフォローしていない場合、相手のfollowerカラムと自分のfollowカラムを更新
|
|
||||||
$followerList[] = $userid;
|
|
||||||
$newFollowerList = implode(',', $followerList);
|
|
||||||
|
|
||||||
// UPDATE文を実行してフォロー情報を更新
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR);
|
|
||||||
$res = $updateQuery->execute();
|
|
||||||
|
|
||||||
// 自分のfollowカラムを更新
|
|
||||||
$myflwlist = explode(',', $myfollowlist);
|
|
||||||
$myflwlist[] = $userData['userid'];
|
|
||||||
$newFollowList = implode(',', array_unique($myflwlist));
|
|
||||||
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':follow', $newFollowList, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
|
||||||
$res_follow = $updateQuery->execute();
|
|
||||||
|
|
||||||
send_notification($userData["userid"], $userid, "🎉" . $userid . "さんにフォローされました!🎉", "" . $userid . "さんにフォローされました。", "/@" . $userid . "", "follow");
|
|
||||||
|
|
||||||
if ($res && $res_follow) {
|
|
||||||
$pdo->commit();
|
|
||||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
||||||
header("Location:" . $url);
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
|
||||||
// ロールバック
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
||||||
|
}else{
|
||||||
|
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||||
|
header("Location:" . $url);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
} elseif (!empty($_POST['unfollow'])) {
|
} elseif (!empty($_POST['unfollow'])) {
|
||||||
// トランザクションを開始
|
$res_unfollow = unfollow_user($pdo, $userData['userid'], $userid);
|
||||||
$pdo->beginTransaction();
|
if($res_unfollow === false){
|
||||||
try {
|
|
||||||
// フォロー解除ボタンが押された場合の処理
|
|
||||||
$followerList = explode(',', $userdata['follower']);
|
|
||||||
if (in_array($userid, $followerList)) {
|
|
||||||
// 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新
|
|
||||||
$followerList = array_diff($followerList, array($userid));
|
|
||||||
$newFollowerList = implode(',', $followerList);
|
|
||||||
|
|
||||||
// UPDATE文を実行してフォロー情報を更新
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR);
|
|
||||||
$res = $updateQuery->execute();
|
|
||||||
|
|
||||||
$myflwlist = explode(',', $myfollowlist);
|
|
||||||
$delfollowList = array_diff($myflwlist, array($userData['userid']));
|
|
||||||
$deluserid = implode(',', $delfollowList);
|
|
||||||
|
|
||||||
// 自分のfollowカラムから相手のユーザーIDを削除
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':follow', $deluserid, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
|
||||||
$res_follow = $updateQuery->execute();
|
|
||||||
|
|
||||||
if ($res && $res_follow) {
|
|
||||||
// コミット
|
|
||||||
$pdo->commit();
|
|
||||||
|
|
||||||
// リダイレクト
|
|
||||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
||||||
header("Location:" . $url);
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
// ロールバック
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
|
||||||
}
|
|
||||||
|
|
||||||
$stmt = null;
|
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
|
||||||
// ロールバック
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
||||||
|
}else{
|
||||||
|
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||||
|
header("Location:" . $url);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!empty($_POST['send_block_submit'])) {
|
if (!empty($_POST['send_block_submit'])) {
|
||||||
|
$res_block = block_user($pdo, $userData['userid'], $userid);
|
||||||
$pdo->beginTransaction();
|
if($res_block === false){
|
||||||
try {
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET blocklist = CONCAT_WS(',', blocklist, :blocklist) WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':blocklist', $userData["userid"], PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
|
||||||
$res_block = $updateQuery->execute();
|
|
||||||
|
|
||||||
// フォロー解除ボタンが押された場合の処理
|
|
||||||
$followerList = explode(',', $userdata['follower']);
|
|
||||||
if (in_array($userid, $followerList)) {
|
|
||||||
// 自分が相手をフォローしている場合、相手のfollowerカラムと自分のfollowカラムを更新
|
|
||||||
$followerList = array_diff($followerList, array($userid));
|
|
||||||
$newFollowerList = implode(',', $followerList);
|
|
||||||
|
|
||||||
// UPDATE文を実行してフォロー情報を更新
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follower = :follower WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':follower', $newFollowerList, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userData['userid'], PDO::PARAM_STR);
|
|
||||||
$res = $updateQuery->execute();
|
|
||||||
|
|
||||||
$myflwlist = explode(',', $myfollowlist);
|
|
||||||
$delfollowList = array_diff($myflwlist, array($userData['userid']));
|
|
||||||
$deluserid = implode(',', $delfollowList);
|
|
||||||
// 自分のfollowカラムから相手のユーザーIDを削除
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET follow = :follow WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':follow', $deluserid, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
|
||||||
$res_follow = $updateQuery->execute();
|
|
||||||
|
|
||||||
if ($res && $res_follow) {
|
|
||||||
$pdo->commit();
|
|
||||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
||||||
header("Location:" . $url);
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
|
||||||
}
|
|
||||||
|
|
||||||
$stmt = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($res_block) {
|
|
||||||
$pdo->commit();
|
|
||||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
||||||
header("Location:" . $url);
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
|
||||||
// ロールバック
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
||||||
|
}else{
|
||||||
|
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||||
|
header("Location:" . $url);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
} elseif (!empty($_POST['send_un_block_submit'])) {
|
} elseif (!empty($_POST['send_un_block_submit'])) {
|
||||||
$pdo->beginTransaction();
|
$res_unblock = unblock_user($pdo, $userData['userid'], $userid);
|
||||||
try {
|
if($res_unblock === false){
|
||||||
$myblklist = explode(',', $myblocklist);
|
|
||||||
$delblkList = array_diff($myblklist, array($userData['userid']));
|
|
||||||
$deluserid = implode(',', $delblkList);
|
|
||||||
// 自分のfollowカラムから相手のユーザーIDを削除
|
|
||||||
$updateQuery = $pdo->prepare("UPDATE account SET blocklist = :blocklist WHERE userid = :userid");
|
|
||||||
$updateQuery->bindValue(':blocklist', $deluserid, PDO::PARAM_STR);
|
|
||||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
|
||||||
$res_block = $updateQuery->execute();
|
|
||||||
|
|
||||||
if ($res_block) {
|
|
||||||
$pdo->commit();
|
|
||||||
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
||||||
header("Location:" . $url);
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
|
||||||
// ロールバック
|
|
||||||
$pdo->rollBack();
|
|
||||||
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
$error_message[] = '更新に失敗しました。(REGISTERED_DAME)';
|
||||||
|
}else{
|
||||||
|
$url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||||
|
header("Location:" . $url);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -799,6 +659,7 @@ $pdo = null;
|
|||||||
<div id="FollowerUserModal" class="modal">
|
<div id="FollowerUserModal" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<p><?php echo replaceProfileEmojiImages(safetext($userData["username"])); ?>さんをフォローしているユーザー</p>
|
<p><?php echo replaceProfileEmojiImages(safetext($userData["username"])); ?>さんをフォローしているユーザー</p>
|
||||||
|
<div class="modal-follow-area">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($follower_userdata)) {
|
if (!empty($follower_userdata)) {
|
||||||
foreach ($follower_userdata as $value) {
|
foreach ($follower_userdata as $value) {
|
||||||
@@ -816,6 +677,7 @@ $pdo = null;
|
|||||||
echo "<p>" . replaceProfileEmojiImages(safetext($userData["username"])) . "さんは誰にもフォローされていません。</p>";
|
echo "<p>" . replaceProfileEmojiImages(safetext($userData["username"])) . "さんは誰にもフォローされていません。</p>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</div>
|
||||||
<div class="btn_area">
|
<div class="btn_area">
|
||||||
<input type="button" id="CloseButton4" class="fbtn" value="閉じる">
|
<input type="button" id="CloseButton4" class="fbtn" value="閉じる">
|
||||||
</div>
|
</div>
|
||||||
@@ -825,6 +687,7 @@ $pdo = null;
|
|||||||
<div id="FollowUserModal" class="modal">
|
<div id="FollowUserModal" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<p><?php echo replaceProfileEmojiImages(safetext($userData["username"])); ?>さんがフォローしているユーザー</p>
|
<p><?php echo replaceProfileEmojiImages(safetext($userData["username"])); ?>さんがフォローしているユーザー</p>
|
||||||
|
<div class="modal-follow-area">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($follow_userdata)) {
|
if (!empty($follow_userdata)) {
|
||||||
foreach ($follow_userdata as $value) {
|
foreach ($follow_userdata as $value) {
|
||||||
@@ -842,6 +705,7 @@ $pdo = null;
|
|||||||
echo "<p>" . replaceProfileEmojiImages(safetext($userData["username"])) . "さんは誰もフォローしていません。</p>";
|
echo "<p>" . replaceProfileEmojiImages(safetext($userData["username"])) . "さんは誰もフォローしていません。</p>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</div>
|
||||||
<div class="btn_area">
|
<div class="btn_area">
|
||||||
<input type="button" id="CloseButton5" class="fbtn" value="閉じる">
|
<input type="button" id="CloseButton5" class="fbtn" value="閉じる">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+13
-13
@@ -69,28 +69,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -125,28 +125,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -257,21 +257,21 @@ if (!empty($_POST['report'])) {
|
|||||||
$url = "/settings_admin/useradmin";
|
$url = "/settings_admin/useradmin";
|
||||||
$category = "system";
|
$category = "system";
|
||||||
|
|
||||||
send_notification($fromuserid, $touserid2, $title, $msg, $url, $category);
|
send_notification($touserid2, $fromuserid, $title, $msg, $url, $category);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
|
|
||||||
// エラーが発生した時はロールバック
|
// エラーが発生した時はロールバック
|
||||||
|
actionLog($userid, "error", "report", $touserid, $e, 4);
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $res ) {
|
if( $res ) {
|
||||||
header("Location:success?q=".var_dump($admin_res["userid"]));
|
header("Location:success");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
$error_message[] = $e->getMessage();
|
$error_message[] = "通報に失敗しました。(REGISTED_DAME)";
|
||||||
|
actionLog($userid, "error", "report", $touserid, "通報に失敗しました", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
// プリペアドステートメントを削除
|
// プリペアドステートメントを削除
|
||||||
|
|||||||
+8
-8
@@ -66,28 +66,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid, [
|
setcookie('userid', $userid, [
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
@@ -122,28 +122,28 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] == true) {
|
|||||||
$_SESSION['username'] = $username;
|
$_SESSION['username'] = $username;
|
||||||
$_SESSION['loginid'] = $res["loginid"];
|
$_SESSION['loginid'] = $res["loginid"];
|
||||||
setcookie('userid', $userid,[
|
setcookie('userid', $userid,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('username', $username,[
|
setcookie('username', $username,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('loginid', $res["loginid"],[
|
setcookie('loginid', $res["loginid"],[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
]);
|
]);
|
||||||
setcookie('admin_login', true,[
|
setcookie('admin_login', true,[
|
||||||
'expires' => time() + 60 * 60 * 24 * 14,
|
'expires' => time() + 60 * 60 * 24 * 28,
|
||||||
'path' => '/',
|
'path' => '/',
|
||||||
'samesite' => 'lax',
|
'samesite' => 'lax',
|
||||||
'secure' => true,
|
'secure' => true,
|
||||||
|
|||||||
+31
-1
@@ -3,7 +3,7 @@
|
|||||||
-- https://www.phpmyadmin.net/
|
-- https://www.phpmyadmin.net/
|
||||||
--
|
--
|
||||||
-- ホスト: 127.0.0.1
|
-- ホスト: 127.0.0.1
|
||||||
-- 生成日時: 2024-11-14 11:59:48
|
-- 生成日時: 2024-12-27 08:43:51
|
||||||
-- サーバのバージョン: 10.4.32-MariaDB
|
-- サーバのバージョン: 10.4.32-MariaDB
|
||||||
-- PHP のバージョン: 8.2.12
|
-- PHP のバージョン: 8.2.12
|
||||||
|
|
||||||
@@ -56,6 +56,24 @@ CREATE TABLE `account` (
|
|||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- テーブルの構造 `actionlog`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `actionlog` (
|
||||||
|
`sysid` int(11) NOT NULL,
|
||||||
|
`uniqid` varchar(256) NOT NULL,
|
||||||
|
`userid` varchar(512) NOT NULL,
|
||||||
|
`type` varchar(512) NOT NULL,
|
||||||
|
`place` varchar(512) NOT NULL,
|
||||||
|
`target` varchar(512) NOT NULL,
|
||||||
|
`content` mediumtext NOT NULL,
|
||||||
|
`importance` int(11) NOT NULL,
|
||||||
|
`datetime` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
--
|
||||||
-- テーブルの構造 `ads`
|
-- テーブルの構造 `ads`
|
||||||
--
|
--
|
||||||
@@ -214,6 +232,12 @@ CREATE TABLE `ueuse` (
|
|||||||
ALTER TABLE `account`
|
ALTER TABLE `account`
|
||||||
ADD PRIMARY KEY (`sysid`);
|
ADD PRIMARY KEY (`sysid`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- テーブルのインデックス `actionlog`
|
||||||
|
--
|
||||||
|
ALTER TABLE `actionlog`
|
||||||
|
ADD PRIMARY KEY (`sysid`);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- テーブルのインデックス `ads`
|
-- テーブルのインデックス `ads`
|
||||||
--
|
--
|
||||||
@@ -278,6 +302,12 @@ ALTER TABLE `ueuse`
|
|||||||
ALTER TABLE `account`
|
ALTER TABLE `account`
|
||||||
MODIFY `sysid` int(11) NOT NULL AUTO_INCREMENT;
|
MODIFY `sysid` int(11) NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- テーブルの AUTO_INCREMENT `actionlog`
|
||||||
|
--
|
||||||
|
ALTER TABLE `actionlog`
|
||||||
|
MODIFY `sysid` int(11) NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- テーブルの AUTO_INCREMENT `ads`
|
-- テーブルの AUTO_INCREMENT `ads`
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ no_reply_destination - リプライ先のユーズが存在しない際に表示
|
|||||||
migration_bad_success - アカウントの移行後に移行の完了処理が正常に完了できなかった際に表示されます。
|
migration_bad_success - アカウントの移行後に移行の完了処理が正常に完了できなかった際に表示されます。
|
||||||
already_been_completed - 処理が既に完了している場合に表示されます。
|
already_been_completed - 処理が既に完了している場合に表示されます。
|
||||||
you_cant_it_to_yourself - 自分に対して行えない処理を行おうとした際に表示されます。
|
you_cant_it_to_yourself - 自分に対して行えない処理を行おうとした際に表示されます。
|
||||||
|
could_not_complete - 処理を完了できなかった場合に表示されます。
|
||||||
|
|
||||||
----------(UWUZU ERR CODE)----------
|
----------(UWUZU ERR CODE)----------
|
||||||
FILE_DEKASUGUI_PHP_INI_KAKUNIN - php.iniで設定されているファイルサイズ上限を上回っている時に表示されます。
|
FILE_DEKASUGUI_PHP_INI_KAKUNIN - php.iniで設定されているファイルサイズ上限を上回っている時に表示されます。
|
||||||
|
|||||||
Reference in New Issue
Block a user