mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu version 1.2.19
This commit is contained in:
+166
-164
@@ -42,9 +42,10 @@ try {
|
||||
$error_message[] = $e->getMessage();
|
||||
}
|
||||
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', $_SESSION['userid']);
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -55,6 +56,8 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
$loginid = $res["loginid"];
|
||||
$role = $res["role"];
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -87,7 +90,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', $_COOKIE['userid']);
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -98,6 +101,8 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
$loginid = $res["loginid"];
|
||||
$role = $res["role"];
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -448,28 +453,30 @@ if ("serviceWorker" in navigator) {
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="sendbox">
|
||||
<textarea id="ueuse" placeholder="いまどうしてる?" name="ueuse"><?php if( !empty($_SESSION['ueuse']) ){ echo htmlspecialchars( $_SESSION['ueuse'], ENT_QUOTES, 'UTF-8'); } ?></textarea>
|
||||
<p>画像のEXIF情報(位置情報など)は削除されません。<br>情報漏洩に気をつけてくださいね…</p>
|
||||
<div class="fxbox">
|
||||
<label for="upload_images" id="images">
|
||||
<img src="../img/sysimage/image_1.svg">
|
||||
<input type="file" name="upload_images" id ="upload_images" accept="image/*">
|
||||
</label>
|
||||
<label for="upload_images2" id="images2">
|
||||
<img src="../img/sysimage/image_1.svg">
|
||||
<input type="file" name="upload_images2" id ="upload_images2" accept="image/*">
|
||||
</label>
|
||||
<label for="upload_videos1" id="videos1">
|
||||
<img src="../img/sysimage/video_1.svg">
|
||||
<input type="file" name="upload_videos1" id ="upload_videos1" accept="video/*">
|
||||
</label>
|
||||
<?php if(!($role ==="ice")){?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="sendbox">
|
||||
<textarea id="ueuse" placeholder="いまどうしてる?" name="ueuse"><?php if( !empty($ueuse) ){ echo htmlspecialchars($ueuse, ENT_QUOTES, 'UTF-8'); } ?></textarea>
|
||||
<p>画像のEXIF情報(位置情報など)は削除されません。<br>情報漏洩に気をつけてくださいね…</p>
|
||||
<div class="fxbox">
|
||||
<label for="upload_images" id="images">
|
||||
<img src="../img/sysimage/image_1.svg">
|
||||
<input type="file" name="upload_images" id ="upload_images" accept="image/*">
|
||||
</label>
|
||||
<label for="upload_images2" id="images2">
|
||||
<img src="../img/sysimage/image_1.svg">
|
||||
<input type="file" name="upload_images2" id ="upload_images2" accept="image/*">
|
||||
</label>
|
||||
<label for="upload_videos1" id="videos1">
|
||||
<img src="../img/sysimage/video_1.svg">
|
||||
<input type="file" name="upload_videos1" id ="upload_videos1" accept="video/*">
|
||||
</label>
|
||||
|
||||
<input type="submit" class="ueusebtn" name="btn_submit" value="ユーズする">
|
||||
<input type="submit" class="ueusebtn" name="btn_submit" value="ユーズする">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<?php }?>
|
||||
<script>
|
||||
document.getElementById("upload_videos1").addEventListener('change', function(e){
|
||||
var file_reader = new FileReader();
|
||||
@@ -551,167 +558,151 @@ if ("serviceWorker" in navigator) {
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
loadPosts();
|
||||
loadPosts();
|
||||
|
||||
var pageNumber = 1;
|
||||
var isLoading = false;
|
||||
var pageNumber = 1;
|
||||
var isLoading = false;
|
||||
|
||||
function loadPosts() {
|
||||
if (isLoading) return;
|
||||
isLoading = true;
|
||||
$("#loading").show();
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
$.ajax({
|
||||
url: '../nextpage/ftlpage.php', // PHPファイルへのパス
|
||||
method: 'GET',
|
||||
data: { page: pageNumber, userid: userid },
|
||||
dataType: 'html',
|
||||
success: function(response) {
|
||||
$('#postContainer').append(response);
|
||||
pageNumber++;
|
||||
isLoading = false;
|
||||
$("#loading").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('.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;
|
||||
}
|
||||
function loadPosts() {
|
||||
if (isLoading) return;
|
||||
isLoading = true;
|
||||
$("#loading").show();
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
$.ajax({
|
||||
url: '../nextpage/nextpage.php', // PHPファイルへのパス
|
||||
method: 'GET',
|
||||
data: { page: pageNumber, userid: userid },
|
||||
dataType: 'html',
|
||||
success: function(response) {
|
||||
$('#postContainer').append(response);
|
||||
pageNumber++;
|
||||
isLoading = false;
|
||||
$("#loading").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', '.favbtn, .favbtn_after', function(event) {
|
||||
$('.outer').on('scroll', function() {
|
||||
var innerHeight = $('.inner').innerHeight(), //内側の要素の高さ
|
||||
outerHeight = $('.outer').innerHeight(), //外側の要素の高さ
|
||||
outerBottom = innerHeight - outerHeight; //内側の要素の高さ - 外側の要素の高さ
|
||||
if (outerBottom <= $('.outer').scrollTop()) {
|
||||
var elem = document.getElementById("noueuse");
|
||||
|
||||
event.preventDefault();
|
||||
if (elem === null){
|
||||
// 存在しない場合の処理
|
||||
loadPosts();
|
||||
} else {
|
||||
// 存在する場合の処理
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var postUniqid = $(this).data('uniqid');
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var likeCountElement = $(this).find('.like-count'); // いいね数を表示する要素
|
||||
$(document).on('click', '.favbtn, .favbtn_after', function(event) {
|
||||
|
||||
var isLiked = $(this).hasClass('favbtn_after'); // 現在のいいねの状態を判定
|
||||
event.preventDefault();
|
||||
|
||||
var $this = $(this); // ボタン要素を変数に格納
|
||||
var postUniqid = $(this).data('uniqid');
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var account_id = '<?php echo $loginid; ?>';
|
||||
var likeCountElement = $(this).find('.like-count'); // いいね数を表示する要素
|
||||
|
||||
var isLiked = $(this).hasClass('favbtn_after'); // 現在のいいねの状態を判定
|
||||
|
||||
var $this = $(this); // ボタン要素を変数に格納
|
||||
|
||||
$.ajax({
|
||||
url: '../favorite/favorite.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: postUniqid, userid: userid, account_id: account_id }, // ここに自分のユーザーIDを指定
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
// いいね成功時の処理
|
||||
if (isLiked) {
|
||||
$this.removeClass('favbtn_after'); // クラスを削除していいねを取り消す
|
||||
$this.find('img').attr('src', '../img/sysimage/favorite_1.svg'); // 画像を元の画像に戻す
|
||||
} else {
|
||||
$this.addClass('favbtn_after'); // クラスを追加していいねを追加する
|
||||
$this.find('img').attr('src', '../img/sysimage/favorite_2.svg'); // 画像を新しい画像に置き換える
|
||||
}
|
||||
|
||||
var newFavoriteList = response.newFavorite.split(',');
|
||||
var likeCount = newFavoriteList.length - 1;
|
||||
likeCountElement.text(likeCount); // いいね数を更新
|
||||
} else {
|
||||
// いいね失敗時の処理
|
||||
}
|
||||
}.bind(this), // コールバック内でthisが適切な要素を指すようにbindする
|
||||
error: 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 account_id = '<?php echo $loginid; ?>';
|
||||
var postElement = $(this).closest('.ueuse');
|
||||
|
||||
deleteButton.addEventListener('click', () => {
|
||||
modalMain.removeClass("slideUp");
|
||||
modalMain.addClass("slideDown");
|
||||
window.setTimeout(function(){
|
||||
modal.style.display = 'none';
|
||||
}, 150);
|
||||
|
||||
$.ajax({
|
||||
url: '../favorite/favorite.php',
|
||||
url: '../delete/delete.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: postUniqid, userid: userid }, // ここに自分のユーザーIDを指定
|
||||
data: { uniqid: uniqid2, userid: userid, account_id: account_id },
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
// いいね成功時の処理
|
||||
if (isLiked) {
|
||||
$this.removeClass('favbtn_after'); // クラスを削除していいねを取り消す
|
||||
$this.find('img').attr('src', '../img/sysimage/favorite_1.svg'); // 画像を元の画像に戻す
|
||||
} else {
|
||||
$this.addClass('favbtn_after'); // クラスを追加していいねを追加する
|
||||
$this.find('img').attr('src', '../img/sysimage/favorite_2.svg'); // 画像を新しい画像に置き換える
|
||||
}
|
||||
|
||||
var newFavoriteList = response.newFavorite.split(',');
|
||||
var likeCount = newFavoriteList.length - 1;
|
||||
likeCountElement.text(likeCount); // いいね数を更新
|
||||
postElement.remove();
|
||||
} else {
|
||||
// いいね失敗時の処理
|
||||
// 削除失敗時の処理
|
||||
}
|
||||
}.bind(this), // コールバック内でthisが適切な要素を指すようにbindする
|
||||
error: function() {
|
||||
},
|
||||
error: 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');
|
||||
|
||||
|
||||
|
||||
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 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 },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
postElement.remove();
|
||||
} else {
|
||||
// 削除失敗時の処理
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
// エラー時の処理
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
cancelButton.addEventListener('click', () => { // 追加
|
||||
modalMain.removeClass("slideUp");
|
||||
modalMain.addClass("slideDown");
|
||||
window.setTimeout(function(){
|
||||
modal.style.display = 'none';
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
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');
|
||||
var modalMain = $('.modal-content');
|
||||
|
||||
$(document).on('click', '.addabi', function (event) {
|
||||
$(document).on('click', '.addabi', function (event) {
|
||||
|
||||
abimodal.style.display = 'block';
|
||||
modalMain.addClass("slideUp");
|
||||
@@ -733,7 +724,9 @@ $(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; ?>';
|
||||
var account_id = '<?php echo $loginid; ?>';
|
||||
|
||||
if(abitext == ""){
|
||||
modalMain.removeClass("slideUp");
|
||||
@@ -745,25 +738,34 @@ $(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, account_id: account_id },
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
var osho_gats = document.getElementById('osho_gats');
|
||||
$(document).on('click', '.os_exit_btn', function (event) {
|
||||
document.cookie = "event=done; max-age=86400";
|
||||
osho_gats.style.display = 'none';
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
+34
-25
@@ -44,7 +44,7 @@ try {
|
||||
|
||||
if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', $_SESSION['userid']);
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -55,6 +55,8 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
// セッションに値をセット
|
||||
$userid = $_SESSION['userid']; // セッションに格納されている値をそのままセット
|
||||
$username = $_SESSION['username']; // セッションに格納されている値をそのままセット
|
||||
$loginid = $res["loginid"];
|
||||
$role = $res["role"];
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -87,7 +89,7 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
|
||||
} elseif (isset($_COOKIE['admin_login']) && $_COOKIE['admin_login'] == true) {
|
||||
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin FROM account WHERE userid = :userid");
|
||||
$passQuery = $pdo->prepare("SELECT username,userid,loginid,admin,role FROM account WHERE userid = :userid");
|
||||
$passQuery->bindValue(':userid', $_COOKIE['userid']);
|
||||
$passQuery->execute();
|
||||
$res = $passQuery->fetch();
|
||||
@@ -98,6 +100,8 @@ if(isset($_SESSION['admin_login']) && $_SESSION['admin_login'] === true) {
|
||||
// セッションに値をセット
|
||||
$userid = $_COOKIE['userid']; // クッキーから取得した値をセット
|
||||
$username = $_COOKIE['username']; // クッキーから取得した値をセット
|
||||
$loginid = $res["loginid"];
|
||||
$role = $res["role"];
|
||||
$_SESSION['admin_login'] = true;
|
||||
$_SESSION['userid'] = $userid;
|
||||
$_SESSION['username'] = $username;
|
||||
@@ -480,28 +484,30 @@ if ("serviceWorker" in navigator) {
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="sendbox">
|
||||
<textarea id="ueuse" placeholder="いまどうしてる?" name="ueuse"><?php if( !empty($ueuse) ){ echo htmlspecialchars($ueuse, ENT_QUOTES, 'UTF-8'); } ?></textarea>
|
||||
<p>画像のEXIF情報(位置情報など)は削除されません。<br>情報漏洩に気をつけてくださいね…</p>
|
||||
<div class="fxbox">
|
||||
<label for="upload_images" id="images">
|
||||
<img src="../img/sysimage/image_1.svg">
|
||||
<input type="file" name="upload_images" id ="upload_images" accept="image/*">
|
||||
</label>
|
||||
<label for="upload_images2" id="images2">
|
||||
<img src="../img/sysimage/image_1.svg">
|
||||
<input type="file" name="upload_images2" id ="upload_images2" accept="image/*">
|
||||
</label>
|
||||
<label for="upload_videos1" id="videos1">
|
||||
<img src="../img/sysimage/video_1.svg">
|
||||
<input type="file" name="upload_videos1" id ="upload_videos1" accept="video/*">
|
||||
</label>
|
||||
<?php if(!($role ==="ice")){?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="sendbox">
|
||||
<textarea id="ueuse" placeholder="いまどうしてる?" name="ueuse"><?php if( !empty($ueuse) ){ echo htmlspecialchars($ueuse, ENT_QUOTES, 'UTF-8'); } ?></textarea>
|
||||
<p>画像のEXIF情報(位置情報など)は削除されません。<br>情報漏洩に気をつけてくださいね…</p>
|
||||
<div class="fxbox">
|
||||
<label for="upload_images" id="images">
|
||||
<img src="../img/sysimage/image_1.svg">
|
||||
<input type="file" name="upload_images" id ="upload_images" accept="image/*">
|
||||
</label>
|
||||
<label for="upload_images2" id="images2">
|
||||
<img src="../img/sysimage/image_1.svg">
|
||||
<input type="file" name="upload_images2" id ="upload_images2" accept="image/*">
|
||||
</label>
|
||||
<label for="upload_videos1" id="videos1">
|
||||
<img src="../img/sysimage/video_1.svg">
|
||||
<input type="file" name="upload_videos1" id ="upload_videos1" accept="video/*">
|
||||
</label>
|
||||
|
||||
<input type="submit" class="ueusebtn" name="btn_submit" value="ユーズする">
|
||||
<input type="submit" class="ueusebtn" name="btn_submit" value="ユーズする">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<?php }?>
|
||||
<script>
|
||||
document.getElementById("upload_videos1").addEventListener('change', function(e){
|
||||
var file_reader = new FileReader();
|
||||
@@ -632,6 +638,7 @@ $(document).ready(function() {
|
||||
|
||||
var postUniqid = $(this).data('uniqid');
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var account_id = '<?php echo $loginid; ?>';
|
||||
var likeCountElement = $(this).find('.like-count'); // いいね数を表示する要素
|
||||
|
||||
var isLiked = $(this).hasClass('favbtn_after'); // 現在のいいねの状態を判定
|
||||
@@ -641,7 +648,7 @@ $(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '../favorite/favorite.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: postUniqid, userid: userid }, // ここに自分のユーザーIDを指定
|
||||
data: { uniqid: postUniqid, userid: userid, account_id: account_id }, // ここに自分のユーザーIDを指定
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
@@ -683,6 +690,7 @@ $(document).ready(function() {
|
||||
|
||||
var uniqid2 = $(this).attr('data-uniqid2');
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var account_id = '<?php echo $loginid; ?>';
|
||||
var postElement = $(this).closest('.ueuse');
|
||||
|
||||
deleteButton.addEventListener('click', () => {
|
||||
@@ -695,7 +703,7 @@ $(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '../delete/delete.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: uniqid2, userid: userid },
|
||||
data: { uniqid: uniqid2, userid: userid, account_id: account_id },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
@@ -748,6 +756,7 @@ $(document).ready(function() {
|
||||
var abitext = document.getElementById("abitexts").value;
|
||||
var usernames = '<?php echo $username; ?>';
|
||||
var userid = '<?php echo $userid; ?>';
|
||||
var account_id = '<?php echo $loginid; ?>';
|
||||
|
||||
if(abitext == ""){
|
||||
modalMain.removeClass("slideUp");
|
||||
@@ -759,7 +768,7 @@ $(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '../abi/addabi.php',
|
||||
method: 'POST',
|
||||
data: { uniqid: uniqid2, abitext: abitext, username: usernames, userid: userid },
|
||||
data: { uniqid: uniqid2, abitext: abitext, username: usernames, userid: userid, account_id: account_id },
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
console.log(response); // レスポンス内容をコンソールに表示
|
||||
|
||||
Reference in New Issue
Block a user