キケッツ掲示板のリポジトリです. https://bbs.kekec.wiki
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.

index.frm.php 15 KiB

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