Last modified by Super Admin on 2026/04/05 18:59

From version Icon 41.1 Icon
edited by Super Admin
on 2026/03/10 22:25
Change comment: There is no comment for this version
To version Icon 42.1 Icon
edited by Super Admin
on 2026/03/12 12:20
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -1091,7 +1091,9 @@
1091 1091   var csrfEl = document.querySelector('input[name="form_token"]');
1092 1092   var csrfToken = csrfEl ? csrfEl.value : '';
1093 1093   var xhr = new XMLHttpRequest();
1094 - xhr.open('GET', '/bin/SeitokaiCode/EditPost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken), true);
1094 + xhr.open('POST', '/bin/SeitokaiCode/EditPost?outputSyntax=plain', true);
1095 + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
1096 + var editPostData = 'schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken);
1095 1095   xhr.onload = function() {
1096 1096   try {
1097 1097   var res = JSON.parse(xhr.responseText);
... ... @@ -1104,7 +1104,7 @@
1104 1104   } catch(e) { alert('編集に失敗しました'); }
1105 1105   };
1106 1106   xhr.onerror = function() { alert('通信エラーが発生しました'); };
1107 - xhr.send();
1109 + xhr.send(editPostData);
1108 1108  }
1109 1109  
1110 1110  // 投稿の削除(確認ダイアログ付き)
... ... @@ -1111,7 +1111,9 @@
1111 1111  function confirmDeletePost(schoolPage, postObjNum, token) {
1112 1112   if (!confirm('この投稿を削除しますか?\\n削除後は「この投稿は削除されました」と表示されます。')) return;
1113 1113   var xhr = new XMLHttpRequest();
1114 - xhr.open('GET', '/bin/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true);
1116 + xhr.open('POST', '/bin/SeitokaiCode/DeletePost?outputSyntax=plain', true);
1117 + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
1118 + var deletePostData = 'schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token);
1115 1115   xhr.onload = function() {
1116 1116   try {
1117 1117   var res = JSON.parse(xhr.responseText);
... ... @@ -1124,7 +1124,7 @@
1124 1124   } catch(e) { alert('削除に失敗しました'); }
1125 1125   };
1126 1126   xhr.onerror = function() { alert('通信エラーが発生しました'); };
1127 - xhr.send();
1131 + xhr.send(deletePostData);
1128 1128  }
1129 1129  </script>
1130 1130  {{/html}}