キケッツ掲示板のリポジトリです.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 

298 lines
14 KiB

  1. <!DOCTYPE html>
  2. <html lang="ja">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="robots" content="noindex">
  6. <title><?= ($title == '') ? '' : ($title . ' - ') ?>キケッツチャンネル お絵描き掲示板(跡地)</title>
  7. <link rel="stylesheet" type="text/css" href="./styles/style.css">
  8. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
  9. <script defer src="https://use.fontawesome.com/releases/v5.15.4/js/all.js"></script>
  10. <script src="./scripts/colour-pad.js"></script>
  11. </head>
  12. <body>
  13. <!-- <div style="font-size: 500%">
  14. メンテ中
  15. </div> -->
  16. <div id="modal" class="modal">
  17. <div class="modal-content">
  18. <h3>Canvas のサイズを変更</h3>
  19. <form>
  20. <div style="margin-bottom: 16px">
  21. <div>
  22. <label for="width">幅:</label>
  23. <input type="number" id="change-width" name="width" value="480" min="32" max="640">
  24. <label>(32 〜 640)</label>
  25. </div>
  26. <div>
  27. <label for="height">高さ:</label>
  28. <input type="number" id="change-height" name="height" value="480" min="24" max="480">
  29. <label>(24 〜 480)</label>
  30. </div>
  31. </div>
  32. <button type="button" onclick="closeModal ()">取消</button>
  33. <button type="button" onclick="applyResolution ()">適用</button>
  34. </form>
  35. </div>
  36. </div>
  37. <h1><a href="."><img src="./assets/kusobbs.gif" alt="クソ掲示板" style="width: 398px"></a></h1>
  38. <div style="text-align: center"><a href="#" onclick="PauseMusic ()" id="mute">&emsp;</a></div>
  39. <?php if ($thread == -1): ?>
  40. <form action="./modules/make_thread.php" method="POST">
  41. スレ名:<input type="text" name="thread-name"><br>
  42. スレ内容:<textarea name="thread-explain"></textarea><br>
  43. <input type="submit" value="スレ立て" disabled>
  44. </form>
  45. <?php if ($result = $mysqli -> query ("SELECT * FROM threads WHERE id <> 1 ORDER BY latest DESC")): ?>
  46. <?php while ($row = $result -> fetch_assoc ()): ?>
  47. <table width="90%">
  48. <thead>
  49. <tr><td class="header"><a href="?thread=<?= $row['id'] ?>"><?= $row['title'] ?></a>&emsp;更新:1<?= $row['latest'] ?>&emsp;<?= $row['length'] ?> レス</td></tr>
  50. </thead>
  51. <?php if ($row['explain'] != '<p></p>'): ?>
  52. <tbody>
  53. <tr><td><?= $row['explain'] ?></td></tr>
  54. </tbody>
  55. <?php endif ?>
  56. </table>
  57. <?php endwhile ?>
  58. <?php endif ?>
  59. <?php else: ?>
  60. <table width="90%">
  61. <thead>
  62. <tr><td class="header"><?= $title ?></td></tr>
  63. </thead>
  64. <?php if ($explain != '<p></p>'): ?>
  65. <tbody>
  66. <tr><td><?= $explain ?></td></tr>
  67. </tbody>
  68. <?php endif ?>
  69. </table>
  70. <form id="message-form">
  71. <label>名前:</label><input type="text" id="user-name" name="name"><br>
  72. <label>削除用パスワード:</label><input type="password" id="password" name="password">
  73. <!-- <textarea id="message" name="message"></textarea> -->
  74. </form>
  75. <div id="paint">
  76. <div style="display: flex; justify-content: center">
  77. <div class="button-area" style="margin-right: 64px">
  78. <button id="new">新規作成</button>
  79. <button id="send" disabled>送信</button>
  80. <button id="save" disabled>ダウンロード</button>
  81. <button id="change-size">サイズ変更</button>
  82. </div>
  83. <div class="button-area" style="vertical-align: middle">
  84. <button id="undo">←</button>
  85. <button id="redo">→</button>
  86. </div>
  87. </div>
  88. <div style="display: flex; width: max-content; flex-direction: column">
  89. <div class="radio">
  90. <form id="mode">
  91. <label>モード:</label>
  92. <label><input type="radio" name="mode" value="pen" id="pen" checked>ペン</label>
  93. <label><input type="radio" name="mode" value="rubber" id="rubber">消しゴム</label>
  94. <label><input type="radio" name="mode" value="bucket" id="bucket">塗りつぶし</label>
  95. </form>
  96. </div>
  97. <div class="radio">
  98. <label>取込み:</label>
  99. <input id="load" type="file" onChange="LoadFile (this.files)">
  100. </div>
  101. <div class="radio">
  102. <form id="colour">
  103. <label>色:</label>
  104. <button id="colour-picker" type="button" onclick="cmanCP_JS_open(this)" cmanCPat="def_color:cns=#000000,rc_form:RGBA,rc_func:changeColour">選択</button>
  105. <label id="irorororo">黒</label>
  106. </form>
  107. </div>
  108. <div class="radio">
  109. <form id="size">
  110. <label>太さ:</label>
  111. <label><input type="radio" name="size" value="1">1</label>
  112. <label><input type="radio" name="size" value="2">2</label>
  113. <label><input type="radio" name="size" value="3" checked>3</label>
  114. <label><input type="radio" name="size" value="5">5</label>
  115. <label><input type="radio" name="size" value="7">7</label>
  116. <label><input type="radio" name="size" value="10">10</label>
  117. <label><input type="radio" name="size" value="15">15</label>
  118. <label><input type="radio" name="size" value="0">指定:
  119. <input style="width: 2em" type="number" name="size" id="size-free" value="57"></label>
  120. </form>
  121. </div>
  122. <div class="radio">
  123. <form id="layer">
  124. <label>レイア:</label>
  125. <label><input onclick="reDraw ()" type="radio" name="layer" value="0" checked>基底</label>
  126. <label><input onclick="reDraw ()" type="radio" name="layer" value="1">1</label>
  127. <label><input onclick="reDraw ()" type="radio" name="layer" value="2">2</label>
  128. <button type="button" name="del">削除</button>
  129. <button type="button" name="down">下へ</button>
  130. <button type="button" name="up">上へ</button>
  131. <button type="button" name="add">追加</button>
  132. <br>
  133. <label><input onclick="reDraw ()" type="checkbox" name="sep">レイアを分けて表示</label>
  134. </form>
  135. </div>
  136. </div>
  137. <div class="canvas-area" id="canvas-area">
  138. <canvas id="canvas" width="480" height="480"></canvas>
  139. <!-- <canvas id="canvas1" width="480" height="480"></canvas> -->
  140. <!-- <canvas id="canvas2" width="480" height="480"></canvas> -->
  141. </div>
  142. </div>
  143. <form name="sort">
  144. <label>
  145. 並べ替え:
  146. <select id="sort" style="font-size: 24px">
  147. <option value="time-desc"<?= ($sort == 'td') ? ' selected="selected"' : '' ?>>投稿が新しい順</option>
  148. <option value="evaluate-good"<?= ($sort == 'eg') ? ' selected="selected"' : '' ?>>評価が高い順</option>
  149. <option value="time-asc"<?= ($sort == 'ta') ? ' selected="selected"' : '' ?>>投稿が古い順</option>
  150. <option value="evaluate-bad"<?= ($sort == 'eb') ? ' selected="selected"' : '' ?>>評価が低い順</option>
  151. </select>
  152. </label>
  153. </form>
  154. <div id="bbs">
  155. <?php
  156. if ($result = $mysqli -> query ("
  157. SELECT
  158. response_id as id, name, message, date, image, held, deleted, pass, good, bad, good - bad as evaluate
  159. FROM
  160. responses
  161. WHERE
  162. thread_id = $thread
  163. ORDER BY
  164. " . (($sort == 'td')
  165. ? 'id DESC'
  166. : (($sort == 'eg')
  167. ? 'evaluate DESC, id DESC'
  168. : (($sort == 'ta')
  169. ? 'id ASC'
  170. : (($sort == 'eb')
  171. ? 'evaluate ASC, id DESC'
  172. : 'id DESC')))))):
  173. ?>
  174. <?php while ($row = $result -> fetch_assoc ()): ?>
  175. <table width="90%" id="<?= $row['id'] ?>">
  176. <thead>
  177. <tr>
  178. <td class="header">
  179. <div style="margin: 0 8px">
  180. <div style="float: left"><?= $row['id'] ?>:
  181. <?= (($row['name'] == '')
  182. ? '名なしさん'
  183. : $row['name']) ?>
  184. </div>
  185. <div style="text-align: right">
  186. 1<?= date ('Y/m/d H:i:s', strtotime ($row['date'])) ?>
  187. </div>
  188. </div>
  189. <div style="display: grid;
  190. grid-template-columns: auto <?= ($row['good'] + $row['bad'] == 0) ? '.48fr' : ((.96 * $row['bad'] / ($row['good'] + $row['bad'])) . 'fr') ?> <?= ($row['good'] + $row['bad'] == 0) ? '.48fr' : ((.96 * $row['good'] / ($row['good'] + $row['bad'])) . 'fr') ?> auto;
  191. align-items: center;
  192. margin-top: 8px;
  193. margin-left: auto;
  194. margin-right: auto;
  195. width: 90%;
  196. font-size: 80%">
  197. <div style="grid-columns: 1; text-align: left;">
  198. <a style="color: blue; white-space: nowrap" title="低評価"
  199. tabindex="-1">
  200. <i class="fas fa-thumbs-down"></i>&thinsp;<?= $row['bad'] ?>
  201. </a>
  202. </div>
  203. <div style="grid-columns: 2;
  204. background-color: blue;
  205. text-align: center;
  206. height: 40%">
  207. &nbsp;
  208. </div>
  209. <div style="grid-columns: 3;
  210. background-color: red;
  211. text-align: center;
  212. height: 40%">
  213. &nbsp;
  214. </div>
  215. <div style="grid-columns: 4; text-align: right">
  216. <a style="color: red" title="高評価" tabindex="-1">
  217. <?= $row['good'] ?>&thinsp;<i class="fas fa-thumbs-up"></i>
  218. </a>
  219. </div>
  220. </div>
  221. </td>
  222. </tr>
  223. </thead>
  224. <tbody>
  225. <?php if ($row['deleted']): ?>
  226. <tr><td><p>削除されました.</p></td></tr>
  227. <?php elseif ($row['held']): ?>
  228. <tr><td><p>確認中です.</p></td></tr>
  229. <?php else: ?>
  230. <tr><td class="illust" style="display: grid; grid-template-columns: .375fr auto .375fr; align-items: end"><div style="grid-columns: 1"></div><div style="grid-columns: 2; text-align: center"><img style="border: solid 1px"src="<?= $dir . $row['image'] ?>"></div><div style="grid-columns: 3; justify-self: end; margin-right: 8px; margin-bottom: 8px; font-size: 80%"><a href="#del" onclick="deletePost (<?= $row['id'] ?>)">削除</a></div></td></tr>
  231. <?php endif ?>
  232. </tbody>
  233. </table>
  234. <?php endwhile ?>
  235. <?php
  236. // MySQL を閉ぢる.
  237. $result -> close ();
  238. endif;
  239. ?>
  240. </div>
  241. <h3 id="del">レス削除</h3>
  242. 削除したいレス番号と削除用パスワードを入力して &ldquo;削除&rdquo; を押してください.<br>
  243. <label>レス番号:</label><input type="text" id="del-id"><br>
  244. <label>削除用パスワード:</label><input type="password" id="del-pass"><br>
  245. <button id="delete" onclick="deletePostReally ()">削除</button>
  246. <?php endif ?>
  247. <hr>
  248. <footer>
  249. <div class="copyright">
  250. &copy; このペィジへの投稿は,すべて,パブリック・ドメインとします.
  251. </div>
  252. </footer>
  253. <canvas style="display: none" width="1" height="1" id="work"></canvas>
  254. <canvas style="display: none" width="480" height="480" id="canvas-perfect"></canvas>
  255. <script type="text/javascript" src="./scripts/script.js"></script>
  256. <?php if ($thread != -1): ?>
  257. <script type="text/javascript" src="./scripts/paint.js"></script>
  258. <?php endif ?>
  259. </body>
  260. </html>