mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-05 03:24:41 +00:00
uwuzu version 1.2.18
This commit is contained in:
+13
-2
@@ -1,7 +1,16 @@
|
||||
<?php
|
||||
require('../db.php');
|
||||
|
||||
if (htmlentities(isset($_POST['uniqid'])) && htmlentities(isset($_POST['abitext']))) {
|
||||
if (htmlentities(isset($_POST['uniqid'])) && htmlentities(isset($_POST['abitext'])) && htmlentities(isset($_POST['userid']))) {
|
||||
session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$ses_userid = $_SESSION['userid'];
|
||||
|
||||
$userid = htmlentities($_POST['userid']);
|
||||
|
||||
if($userid === $ses_userid){
|
||||
$postUniqid = htmlentities($_POST['uniqid']);
|
||||
$abitext = htmlentities($_POST['abitext']);
|
||||
$username = htmlentities($_POST['username']);
|
||||
@@ -40,10 +49,11 @@ if (htmlentities(isset($_POST['uniqid'])) && htmlentities(isset($_POST['abitext'
|
||||
|
||||
$pdo->beginTransaction();
|
||||
|
||||
$stmt = $pdo->prepare("UPDATE ueuse SET abi = :abi, abidate = :abidate WHERE uniqid = :uniqid");
|
||||
$stmt = $pdo->prepare("UPDATE ueuse SET abi = :abi, abidate = :abidate WHERE uniqid = :uniqid AND account = :userid");
|
||||
$stmt->bindValue(':abi', $abitext, PDO::PARAM_STR);
|
||||
$stmt->bindValue(':abidate', $abidate, PDO::PARAM_STR);
|
||||
$stmt->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR);
|
||||
$stmt->bindValue(':userid', $ses_userid, PDO::PARAM_STR);
|
||||
|
||||
// SQLクエリの実行
|
||||
$res = $stmt->execute();
|
||||
@@ -115,5 +125,6 @@ if (htmlentities(isset($_POST['uniqid'])) && htmlentities(isset($_POST['abitext'
|
||||
echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
+6
-1
@@ -92,6 +92,7 @@ if(isset($_GET['token'])&&isset($_GET['ueuse'])) {
|
||||
$datetime = date("Y-m-d H:i:s");
|
||||
$uniqid = createUniqId();
|
||||
$abi = "none";
|
||||
$nones = "none";
|
||||
|
||||
// トランザクション開始
|
||||
$pdo->beginTransaction();
|
||||
@@ -99,13 +100,17 @@ if(isset($_GET['token'])&&isset($_GET['ueuse'])) {
|
||||
try {
|
||||
|
||||
// SQL作成
|
||||
$stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ueuse, datetime, abi) VALUES (:username, :account, :uniqid, :ueuse, :datetime, :abi)");
|
||||
$stmt = $pdo->prepare("INSERT INTO ueuse (username, account, uniqid, ueuse, photo1, photo2, video1, datetime, abi) VALUES (:username, :account, :uniqid, :ueuse, :photo1, :photo2, :video1, :datetime, :abi)");
|
||||
|
||||
$stmt->bindParam(':username', $username, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':account', $userid, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':uniqid', $uniqid, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':ueuse', $ueuse, PDO::PARAM_STR);
|
||||
|
||||
$stmt->bindParam(':photo1', $nones, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':photo2', $nones, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':video1', $nones, PDO::PARAM_STR);
|
||||
|
||||
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
||||
|
||||
$stmt->bindParam(':abi', $abi, PDO::PARAM_STR);
|
||||
|
||||
+37
-2
@@ -1,15 +1,48 @@
|
||||
<?php
|
||||
require('../db.php');
|
||||
|
||||
if (isset($_POST['uniqid'])){
|
||||
if (isset($_POST['uniqid']) && isset($_POST['userid'])){
|
||||
session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$userid = $_SESSION['userid'];
|
||||
|
||||
$postUserid = htmlentities($_POST['userid']);
|
||||
$postUniqid = htmlentities($_POST['uniqid']);
|
||||
|
||||
if($userid === $postUserid){
|
||||
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();
|
||||
}
|
||||
// データベース接続の設定
|
||||
$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 ueuse WHERE uniqid = :uniqid limit 1');
|
||||
|
||||
$query->execute(array(':uniqid' => $postUniqid));
|
||||
|
||||
$result = $query->fetch();
|
||||
|
||||
if($result["account"] === $postUserid){
|
||||
try {
|
||||
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS);
|
||||
|
||||
// 削除クエリを実行
|
||||
$deleteQuery = $pdo->prepare("DELETE FROM ueuse WHERE uniqid = :uniqid");
|
||||
$deleteQuery = $pdo->prepare("DELETE FROM ueuse WHERE uniqid = :uniqid AND account = :userid");
|
||||
$deleteQuery->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR);
|
||||
$deleteQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||
$res = $deleteQuery->execute();
|
||||
|
||||
if ($res) {
|
||||
@@ -23,5 +56,7 @@ if (isset($_POST['uniqid'])){
|
||||
echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
+3
-3
@@ -53,7 +53,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -61,7 +61,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -96,7 +96,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
+3
-3
@@ -51,7 +51,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -59,7 +59,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -94,7 +94,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
@@ -2,9 +2,16 @@
|
||||
require('../db.php');
|
||||
|
||||
if (htmlentities(isset($_POST['uniqid'])) && htmlentities(isset($_POST['userid']))) {
|
||||
session_name('uwuzu_s_id');
|
||||
session_start();
|
||||
session_regenerate_id(true);
|
||||
|
||||
$ses_userid = $_SESSION['userid'];
|
||||
|
||||
$postUniqid = htmlentities($_POST['uniqid']);
|
||||
$userId = htmlentities($_POST['userid']);
|
||||
|
||||
if($userId === $ses_userid){
|
||||
try {
|
||||
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS);
|
||||
|
||||
@@ -50,6 +57,7 @@ if (htmlentities(isset($_POST['uniqid'])) && htmlentities(isset($_POST['userid']
|
||||
echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo json_encode(['success' => false, 'error' => '必要なパラメータが提供されていません。']);
|
||||
exit;
|
||||
|
||||
+3
-3
@@ -51,7 +51,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -59,7 +59,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -94,7 +94,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
+6
-24
@@ -51,7 +51,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -94,7 +94,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
@@ -682,6 +682,7 @@ $(document).ready(function() {
|
||||
modalMain.removeClass("slideDown");
|
||||
|
||||
var uniqid2 = $(this).attr('data-uniqid2');
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var postElement = $(this).closest('.ueuse');
|
||||
|
||||
deleteButton.addEventListener('click', () => {
|
||||
@@ -694,7 +695,7 @@ $(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '../delete/delete.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: uniqid2 },
|
||||
data: { uniqid: uniqid2, userid: userid },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
@@ -718,26 +719,6 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var more_modal = document.getElementById('myMoreModal');
|
||||
var m_cancelButton = document.getElementById('m_c_button'); // 追加
|
||||
var modalMain = $('.modal-content');
|
||||
|
||||
$(document).on('click', '.more_btn', function (event) {
|
||||
more_modal.style.display = 'block';
|
||||
modalMain.addClass("slideUp");
|
||||
modalMain.removeClass("slideDown");
|
||||
|
||||
m_cancelButton.addEventListener('click', () => {
|
||||
modalMain.removeClass("slideUp");
|
||||
modalMain.addClass("slideDown");
|
||||
window.setTimeout(function(){
|
||||
more_modal.style.display = 'none';
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var abimodal = document.getElementById('myAbiModal');
|
||||
var AbiAddButton = document.getElementById('AbiAddButton');
|
||||
var AbiCancelButton = document.getElementById('AbiCancelButton');
|
||||
@@ -766,6 +747,7 @@ $(document).ready(function() {
|
||||
|
||||
var abitext = document.getElementById("abitexts").value;
|
||||
var usernames = '<?php echo $username; ?>';
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
|
||||
if(abitext == ""){
|
||||
modalMain.removeClass("slideUp");
|
||||
@@ -777,7 +759,7 @@ $(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '../abi/addabi.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: uniqid2, abitext: abitext, username: usernames },
|
||||
data: { uniqid: uniqid2, abitext: abitext, username: usernames, userid: userid },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
console.log(response); // レスポンス内容をコンソールに表示
|
||||
|
||||
@@ -53,7 +53,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -61,7 +61,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -96,7 +96,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
@@ -55,7 +55,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -63,7 +63,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -98,7 +98,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
+3
-3
@@ -66,7 +66,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -74,7 +74,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -109,7 +109,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
+3
-3
@@ -50,7 +50,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -58,7 +58,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -93,7 +93,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
+3
-3
@@ -51,7 +51,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -59,7 +59,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -94,7 +94,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
uwuzu
|
||||
1.2.17
|
||||
2023/09/05
|
||||
1.2.18
|
||||
2023/09/06
|
||||
daichimarukana,putonfps
|
||||
@@ -1,6 +1,11 @@
|
||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||
|
||||
## Version 1.2.18
|
||||
リリース日:2023/09/06
|
||||
脆弱性を修正しました。
|
||||
APIより投稿したユーズがアカウントのメディア欄に表示されてしまう問題を修正しました。
|
||||
|
||||
## Version 1.2.17
|
||||
リリース日:2023/09/05
|
||||
OpenAI社によるGPTBotのクロールを拒否する設定項目を追加しました。
|
||||
|
||||
@@ -63,7 +63,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -71,7 +71,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -106,7 +106,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
+3
-3
@@ -53,7 +53,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -61,7 +61,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -96,7 +96,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
@@ -74,7 +74,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -82,7 +82,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -117,7 +117,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
@@ -50,7 +50,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -58,7 +58,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -93,7 +93,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
|
||||
+26
-10
@@ -56,7 +56,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -64,7 +64,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -99,7 +99,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
@@ -663,20 +663,28 @@ $(document).ready(function() {
|
||||
var modal = document.getElementById('myDelModal');
|
||||
var deleteButton = document.getElementById('deleteButton');
|
||||
var cancelButton = document.getElementById('cancelButton'); // 追加
|
||||
var modalMain = $('.modal-content');
|
||||
|
||||
$(document).on('click', '.delbtn', function (event) {
|
||||
modal.style.display = 'block';
|
||||
modalMain.addClass("slideUp");
|
||||
modalMain.removeClass("slideDown");
|
||||
|
||||
var uniqid2 = $(this).attr('data-uniqid2');
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var postElement = $(this).closest('.ueuse');
|
||||
|
||||
deleteButton.addEventListener('click', () => {
|
||||
modalMain.removeClass("slideUp");
|
||||
modalMain.addClass("slideDown");
|
||||
window.setTimeout(function(){
|
||||
modal.style.display = 'none';
|
||||
}, 150);
|
||||
|
||||
$.ajax({
|
||||
url: '../delete/delete.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: uniqid2 },
|
||||
data: { uniqid: uniqid2, userid: userid },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
@@ -692,14 +700,18 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
cancelButton.addEventListener('click', () => { // 追加
|
||||
modalMain.removeClass("slideUp");
|
||||
modalMain.addClass("slideDown");
|
||||
window.setTimeout(function(){
|
||||
modal.style.display = 'none';
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var abimodal = document.getElementById('myAbiModal');
|
||||
var AbiAddButton = document.getElementById('AbiAddButton');
|
||||
var AbiCancelButton = document.getElementById('AbiCancelButton');
|
||||
var modalMain = $('.modal-content');
|
||||
|
||||
$(document).on('click', '.addabi', function (event) {
|
||||
|
||||
@@ -723,7 +735,8 @@ $(document).ready(function() {
|
||||
event.preventDefault();
|
||||
|
||||
var abitext = document.getElementById("abitexts").value;
|
||||
var username = "<?php echo $username?>";
|
||||
var usernames = '<?php echo $username; ?>';
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
|
||||
if(abitext == ""){
|
||||
modalMain.removeClass("slideUp");
|
||||
@@ -735,20 +748,23 @@ $(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '../abi/addabi.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: uniqid2, abitext: abitext, username: username},
|
||||
data: { uniqid: uniqid2, abitext: abitext, username: usernames, userid: userid },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
console.log(response); // レスポンス内容をコンソールに表示
|
||||
if (response.success) {
|
||||
abimodal.style.display = 'none';
|
||||
postAbiElement.remove();
|
||||
|
||||
console.log(response);
|
||||
} else {
|
||||
|
||||
abimodal.style.display = 'none';
|
||||
postAbiElement.remove();
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
|
||||
console.log(error);
|
||||
abimodal.style.display = 'none';
|
||||
postAbiElement.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+7
-26
@@ -54,7 +54,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"]){
|
||||
}elseif($_SESSION['loginid'] === $res["loginid"] && $_SESSION['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
@@ -62,7 +62,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
$_SESSION['loginid'] = $res["loginid"];
|
||||
setcookie('userid', $userid,[
|
||||
setcookie('userid', $userid, [
|
||||
'expires' => time() + 60 * 60 * 24 * 14,
|
||||
'path' => '/',
|
||||
'samesite' => 'lax',
|
||||
@@ -97,7 +97,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
if(empty($res["userid"])){
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"]){
|
||||
}elseif($_COOKIE['loginid'] === $res["loginid"] && $_COOKIE['userid'] === $res["userid"]){
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
@@ -762,7 +762,6 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
|
||||
|
||||
var modal = document.getElementById('myDelModal');
|
||||
var deleteButton = document.getElementById('deleteButton');
|
||||
var cancelButton = document.getElementById('cancelButton'); // 追加
|
||||
@@ -774,6 +773,7 @@ $(document).ready(function() {
|
||||
modalMain.removeClass("slideDown");
|
||||
|
||||
var uniqid2 = $(this).attr('data-uniqid2');
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var postElement = $(this).closest('.ueuse');
|
||||
|
||||
deleteButton.addEventListener('click', () => {
|
||||
@@ -786,7 +786,7 @@ $(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '../delete/delete.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: uniqid2 },
|
||||
data: { uniqid: uniqid2, userid: userid },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
@@ -810,26 +810,6 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var more_modal = document.getElementById('myMoreModal');
|
||||
var m_cancelButton = document.getElementById('m_c_button'); // 追加
|
||||
var modalMain = $('.modal-content');
|
||||
|
||||
$(document).on('click', '.more_btn', function (event) {
|
||||
more_modal.style.display = 'block';
|
||||
modalMain.addClass("slideUp");
|
||||
modalMain.removeClass("slideDown");
|
||||
|
||||
m_cancelButton.addEventListener('click', () => {
|
||||
modalMain.removeClass("slideUp");
|
||||
modalMain.addClass("slideDown");
|
||||
window.setTimeout(function(){
|
||||
more_modal.style.display = 'none';
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var abimodal = document.getElementById('myAbiModal');
|
||||
var AbiAddButton = document.getElementById('AbiAddButton');
|
||||
var AbiCancelButton = document.getElementById('AbiCancelButton');
|
||||
@@ -858,6 +838,7 @@ $(document).ready(function() {
|
||||
|
||||
var abitext = document.getElementById("abitexts").value;
|
||||
var usernames = '<?php echo $username; ?>';
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
|
||||
if(abitext == ""){
|
||||
modalMain.removeClass("slideUp");
|
||||
@@ -869,7 +850,7 @@ $(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '../abi/addabi.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: uniqid2, abitext: abitext, username: usernames },
|
||||
data: { uniqid: uniqid2, abitext: abitext, username: usernames, userid: userid },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
console.log(response); // レスポンス内容をコンソールに表示
|
||||
|
||||
Reference in New Issue
Block a user